Search code examples
google-app-enginevideo-streaminghigh-loadweb-trafficchatroom

Is Google Application Engine a good platform for a high-traffic chat website?


I'm looking to create a high-traffic chat website, possibly with video streaming with some image manipulation happening on the server.

Scanning over the Channel API (http://code.google.com/appengine/docs/python/channel/overview.html) has made me hopeful this can be done without AJAX polling, and the general opinion is that GAE is very scalable.

I still have a few concerns:

1) Can it support tens of thousands simultaneous users that interact with each other in real-time without lagging? Is there a cap on CPU usage?

2) I'll (probably) be writing it on top of the J2EE framework. Does GAE guarantee that each new request will have access to a global in-memory datastore that will be available as long as the application is running on the server ("ServletContext" in Java-speak) and will be storing possibly gigabytes of data? Is there a memory cap?

3) Will the full J2SE and J2EE stack be available? Will I be able to include just any library I wish?

4) Are there better solutions for this kind of issue than GAE? I've been thinking about renting several dedicated servers, but this will go into the thousands/month...

Thanks in advance!


Solution

  • To address your questions in order:

    1. Yes, it can support tens of thousands of simultaneous users. I hope you're not expecting all of them to interact with each other simultaneously, though - fanning out 10,000 updates per user event isn't going to be terribly practical. CPU is a billed quota, so there's no cap as long as you pay for your usage.
    2. The App Engine datastore is on-disk, not in-memory. Apps have access to the datastore (which is persistent) and memcache (which is in-memory, but a cache). Both are global across the whole app, not just the instance. Like CPU quota, there's no firm cap - you get what you pay for.
    3. There's a whitelist of core JRE classes that excludes some functionality that would be unsafe to sandbox. Other than that, you can run whatever you want.
    4. I think App Engine will suit your app quite well, with the exception of video streaming: There's not currently any App Engine based solution for that, so you'd have to use an external service for it. A major pro of App Engine is that the costs scale with usage, so you only pay for what you use.