Pregunta

I just made my first application on App Engine which is a single page that says "hello" when I access it.

But I wonder if I can make an application server, so that different programs can connect to it, by different ports.

For example, Amazon EC2 I can have a program running, that attends multiple requests from other programs by Sockets.

I can do this in Google App Engine?

Thank you.

¿Fue útil?

Solución

You should probably be using Google Compute Engine for this sort of thing. https://developers.google.com/compute/

Otros consejos

You can indeed use sockets, but there are some restrictions.

You can read about those restrictions here: https://developers.google.com/appengine/docs/python/sockets/

But the most relevant point is this:

You can’t create a listen socket; you can only create outbound sockets.

So it looks like you'll have to use Amazon's service if inbound sockets are what you are after.

What kind of API do you want to expose?

You can host AJAX-style APIs via HTTP on app engine. Just create handlers that accept JSON POST requests.

If you require sockets support, then Compute Engine is currently your best bet.

Also, check out Google Cloud Endpoints for creating API backends.

The real advantage of App Engine is in its scalability - if you write your application to best practises, you can handle nearly any amount of traffic. With a service like EC2/GCE/some VPS, you end up handling a lot of scalability issues yourself.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top