Are there any hosted services for Socket.IO (or alternatives)? - google-app-engine

I have a web application running on Google App Engine and need to provide near real time updates to connected web clients. One way would be to use the Google App Engine Channels API, but I'm a bit uneasy about using a proprietary solution.
Are there any reliable hosted services allowing for clients to connect using Socket.IO (with all its supported fallback protocols), and a web server solution running on Google App Engine to publish notifications to it? Any other alternatives that offers the same functionality?

You looking for something like beaconpush.com?

I have the same problem as you.
I've thought about using the Channel API as well however the free quota is quite low (100 channels created per day, each client is one channel).
Here's the solution I'm building:
All of the server logic runs in app engine python runtime
app engine serves all the html and client code
I run a node.js socket.io server on dotcloud (using their free tier)
the node.js server sets up an http server that listens to get requests on a few special url endpoints (ie: myapp-on.dotcloud.com/room/[room_id]) and when it gets called it triggers the socket.io broadcast to the appropriate clients
html clients generated on app engine connect to my myapp-on.dotcloud.com
All user input in the client is sent to app engine via a normal ajax post/get
when the app engine server code needs to push something to the client it makes a url fetch on the appropriate url (myapp-on.dotcloud.com/room/[room_id]) that triggers a message push via socket.io to the connected clients
I'm yet to implement this, but sounds like a workable plan
the idea is to keep all the logic in app engine and only use the socket.io server as a message pusher

Related

Is there a way to limit only allow incoming requests from other App Engine services?

I have four services running within the same app on App Engine. I have a frontend SvelteKit application, and three backend services. If possible, I'd like to set up security in such a way that the backend services will only accept HTTP requests from the frontend application (which sends all API requests via its Node server).
Is there a way of doing this without spending a load of money on a Serverless VPC Access connector?
Ideally I want to keep these all within the same GCP project as well. So far the only solution I can come up with is to ship the services with a secret that they check against when receiving a request, but there must be a better way to do it.
Take a look at Identity Aware Proxy
Pay attention to the part of the above documentation that says
In order to make a resource publicly-accessible (while sibling resources are restricted), grant the IAP-secured Web App User role to allUsers or allAuthenticatedUsers.
Per your use case, your front-end application will be available to the public while your 3 backend services will only be available to the front-end application
Since your backend services are now secured (via IAP), you have to programmatically invoke them in your front end. See documentation on how to do that.

Google replacement for CloudMqtt

We have an IoT project here
Facts:
We have our app running on Google App Engine, PHP runtime.
The clients are raspberry pi or similar boards.
We are using cloudmqtt (www.cloudmqtt.com) to generate a push event on our C client app, which then runs the sync process with the server
Is there a google cloud replacement for what we are doing?
We tried Google Push/Sub, but our C app needed to be polling the service.
We would love to use Google Cloud Messaging but we could not find any way to use it for push notifications for the client.
Basically, we need to send push messages to a raspberry pi, what would you recommend for that? (remember our server is on GAE)
GCM handle polling mechanisms on its own and should let you push notifications as well as messages to the client. Try debugging your application using documentation.
During I/O 2016, they also launched Firebase Cloud Messaging (FCM) which is basically a newer version of GCM, and is the recommended product to use.
But if you wanted to use your deployment rather than a service, you can use Google Compute Engine instances to deploy EMQTTD which is a highly scalable MQTT broker written in Erlang.

Proxy Google Cloud Endpoints

We need to migrate from one app engine project to another (due to the constraints put in place for changing region).
The ideal solution would just be to proxy all requests through to the new server however we are using Google Cloud Endpoints which are intercepted by the server and delivered as POST requests.
We can't redirect as we have mobile apps relying on the API.
Does anyone have a solution (rather than proxying every API method we have) to proxy to a new server?
I would write a ServletFilter on the old app that intercepts /_ah/spi/* and forwards it to the new app, also on /_ah/spi/*. Keep in mind that you'll have to keep the existing Endpoints code in place, or the proxy will delete your configuration and not forward anything.

Can I Use Google App Engine as XMPP Gateway

I have a Cloud App hosted on Windows Azure and I need to integrate XMPP with the service. Can I use GAE's XMPP API to achieve this? I'll need to be able to create new Jabber IDs and send & receive messages from other clients like GTalk.
As far as I know, GAE only supports Java, Python and my expertise is limited to .NET & C#; so, I'll have to make my Azure App to communicate with the GAE.
Finally, can I use GAE as an alternative to running ejabbered on Windows Azure Virtual Machines or Amazon EC2?
Thanks in advance... :)
You could but it would be very limited. You may be better off running ejabbered somewhere else.
With GAE's XMPP API, your username selection is rather limited. See the GAE XMPP Overview API documentation.
Your Cloud App would need to send and receive messages from your GAE app via HTTP accesses. This is no big deal for sending, but you'll have to work your own way of receiving messages. You could buffer your messages to the datstore and poll for messages. You could use the Channel API to receive messages directly, but so far the Channel API client is only available in Javascript, so your app would need some sort of javascript interpreter to use the client.
You will be able to send/receive messages from other XMPP addresses like GTalk clients.

Does Google App Engine Support JAVA Proxy API's?

I have a question surrounding the REST service. I have an application written in C# , i want to put this application onto the cloud. I have a small problem, My Application has a built in C# API. I want to interact with my application and Google app engine. I want to develop a JAVA PROXY on top of GAE so that it can interact with my application using REST protocol and performs CRUD operations on Cloud and returns back data to my application.
Is it possible to do this ? to what i know is that SANDBOX feature doesn't allow us to directly interact with the App Engine.
Any suggestion on this.........
Thanks Heaps
Suraj
You don't need Java Proxy API in order to make http requests to another server (I guess you did not have java's Proxy class in mind?).
Yes, AppEngine can make HTTP/REST requests to other servers via URL Fetch java API.

Resources