What to use instead of websockets on standard app engine?

Viewed 92

I want to open a websocket to update the progress bar on the client side. I am using standard app engine environment and want to keep it. I've seen some complicated workarounds to get the websocket functionality.

How else can I achieve the effect of the real time progress bar update? Is there any other technology I can use? I write the application in Golang.

1 Answers

There is no official way to use websockets for App Engine standard, if you want to use only App Engine you would need to switch to flex.

Still, even if websockets are available for GAE flex, I recommend you to use Cloud Run as you have more flexibility with it. Migrating from App Engine to Cloud Run does not require big changes on the application. These are some resources you can use to simplify this process.

As mentioned in the comments, another option is to use polling. When using polling you are constantly requesting the slow process for status checks and you can then update the progress bar with the results.

Although, depending on your use case, the best option might be to just make this process asynchronous instead of synchronous. This way you should not need to be updating this progress bar at all. You could do this by using Cloud Tasks or Cloud Functions, among other options.

Related