So far I have been using Twisted to simultaneously serve a lot of mobile clients (Android, iPhone) with their HTTP requests exchanging JSON messages.
For my next project I'd like to try out Google App Engine, but I'm wondering if it is capable of doing the same or if I should rather go with a custom built solution again.
Certainly. App Engine will scale your application up as the load increases automatically and will be spread over many machines. The web api they have is pretty nice too. You don't have to worry about deferreds either because it scales by bringing more instances up instead of making things asynchronous.
BTW: I have web services hosted on app engine that are consumed by iPhone.
Related
I'm building a small educational web application. Along with other features like discussion forums, registered users will be able to view streaming videos. I'll be using Google App Engine's webapp2 framework for back-end development (with python). I want to specifically ask that how can I integrate video streaming into my application? I'm fairly new to web development and have a basic working knowledge of App Engine. I'll be using Google's Datastore to store all the app's data, but where do I store my videos that the app serves to users? I don't want to make the video content publicly available (e.g. YouTube), so what's the way to go?
I'm aware that GAE's Blobstore is dedicated to serving large files (e.g. videos) so will it be appropriate for this purpose? What are some other options?
Yes, Blobstore is fine. You can also use Google Cloud Storage, either directly or through the Blobstore API
Plenty of related Q&As to study, many contain code snippets: https://stackoverflow.com/search?q=[google-app-engine]+video+streaming
.
I am currently working with MS Azure. There I have a worker role and a web role. In worker role I start an infinite loop to process some data continously. The web role is performing the interaction with the client. There I use a MVC Framework, which on server side is written in C# and on client side in Javascript.
Now I'm interested in GAE engine. I read a lot about the app engine. I want to build an application in Python. But I don't really understand the architecture. Is there a counterpart in the project structure like the worker and web role in Azure?
The closest thing to what you want is what Google App Engine calls modules. Modules are (roughly) pools of instances that can be set up with different runtimes and performance characteristics:
https://cloud.google.com/appengine/docs/python/modules/
I'm not an expert with Azure, but the big difference I see between GAE's approach and Azure's is that, unlike in Azure, "back-end modules" (not an official term) in GAE are still basically web services at heart. Everything in the module is still basically written as HTTP handlers. So, the main ways you control that module are via HTTP: using push queues to hit HTTP endpoints, using cron to trigger HTTP endpoints that read from pull queues/the datastore/Google Cloud Storage, and/or making HTTP requests from your "front-end module" directly to your "back-end module".
Note that Google App Engine historically provided the concept of "backends" and "backend instances" that you could use for much the same purpose as modules for longer-running background processes. However, the module system is more flexible, and it is now recommended.
yes there is. look at backend and frontend instances. your question is too broad to go into more detail. in general the backend type of instance is used for long running tasks but you could also do everyrhing in the frontend instance.
Disclaimer: I am a novice programmer
I am currently following a tutorial: http://www.raywenderlich.com/3932/networking-tutorial-for-ios-how-to-create-a-socket-based-iphone-app-and-server
To build a chat application on the iPhone using socket servers. For other purposes, I am using Google App Engine to maintain the backend of my app and hold onto other pieces of data. It only makes sense to have all my backend code located in one area so I was wondering whether Google App Engine will support my socket Programming as there seems to be quite a few restrictions as such: https://developers.google.com/appengine/docs/python/sockets/#limitations-and-restrictions
In fact it almost looks as if there are too many restrictions, however google on the page said that there are "Libraries that import socket, such as poplib or nntplib, and that don't violate the limitations and restrictions listed below, should work without modification." meaning that there are things that I can do to modify my work to allow it to work on the Google App Engine.
My Question: Is it possible to use my learning of socket programming to maintain a backend for my chat on the google app engine? If there is, how do I modify my file if I need to. If there isn't, what app server should I look into so that I can at least hold my chat backend on another server if not at google app engine. If you think that I should take another method altogether to implement chat in my iPhone app, I would love to hear that as well. Thank you for your input.
I think you shall not open the socket yourself, you should use APNS on iPhone and Google Cloud Messaging on Android, so it's not your app that will open (send keepalives, reopen when closed, reopen when connectivity change, etc...) the TCP socket. Also you'll be able to receive data (be spawned) when even if your app is closed.
Received messages (from APNS/GCM) can contains the actual data, or simply be a "Hey, you may go check for messages on the server". To send message you may simply use an HTTP request.
I am currently working on a project where we need to establish communication like an ESB, between a REST API and the apps services on a small scale.
Scenario:
Assume a web app front end (e.g. Django/Python or Ruby/Rails) and services that are accessible via a HTTP RESTful request.
How can I:
make it configurable which web services are called on a web request depending on the request and not requiring code changes (through keys for example)
encapsulate or implement the services in a way to make it easy to manage them e.g. start/stop etc.
I have been looking at spring.io, but cant work out whether this could be used for the this??
I am open to all suggestions,
Thanks
From what I understand, you want an authorisation solution.
In Rails, Pundit and CanCanCan are very popular. You could also implement it from scratch. Here is a screencast to help you get started.
I want to develop an extremely lightweight web service with a RESTful JSON API. I will do all the session management on the server side. The solution will receive several 100k (or more) API calls an hour and return (compressed) JSON as response, it should be able to scale effortlessly.
Security is naturally important, but I want to avoid heavy weight frameworks like Django etc, and preferably will use a webserver like nginx or lighttpd instead of Apache.
At the server end, this is all I need:
user session management
security (protection against atleast the more common attacks such as cross site request forgery etc)
url routing
http utilities (e.g. compression)
I am aware of web2py, but its deployment options seems 'not well though out' at best - so far, I have been unable to get it to work with Apache, despite following the user manuals.
Can anyone suggest a python framework (and web server) best suited for this task?
if you want to go really lightweight, you might try wsgi itself without a framework, or maybe Flask. I understand wsgi runs on lighttpd, you'll get some hits on a Google search.
Try Pyramid. It's fast, lightweight and with a lot of options to configure your enviroment as you like...