19

Recently, I used Azure's "Azure SignalR Service" along with Azure App Service to build a real time chat app. It worked like magic. I loved it! However, I am constrained now to use AWS for my platform and would like an equal substitute service such that I can build a real time service, leveraging nothing but AWS services.

What is the equal subsitite in AWS that I can leverage so that I can build a real-time app similar to how I built the Azure app with Azure SignalR Service and Azure App Service?

My plan is to use both API Gateway + AWS Elastic Beanstock. What are my options here? Is Elastic beanstock going to work out? Not sure if I need some type of always-on feature implemented in the Elastic beanstock so that down periods dont spin down AWS resources and break WebSocket connections.

1 note worth mentioning. One of the hard requirements I have as part of this project is to create an HTTP rest-full api. My plan is to place this behind the API Gateway proxy.

AWS states that it provides real-time service using API gateway here

https://aws.amazon.com/blogs/compute/announcing-websocket-apis-in-amazon-api-gateway/

However, within API Gateway I believe I need to create "HTTP API" instead of "WebSocket API". If I have a backend web api using for example ASP.NET Core web api, can I still select WebSocket API? enter image description here

If I go with AWS "WebSocket API", How can I create an API Front end (proxy) for my backend ASP.NET COre web api while still allowing for real time?

Judy007
  • 5,484
  • 4
  • 46
  • 68
  • jbooker, did you find a perfect alternative? – Kapoor Dec 20 '20 at 12:26
  • Nothing validated on my end yet.. – Judy007 Dec 21 '20 at 17:08
  • Looking for exactly something like that. Which option did you choose? Have you thought of rolling your own api gateway with Ocelot? I'm desperately looking for options in AWS to have Websockets play nicely with containers in AWS Fargate. Haven't explored yet ALB which also seems to support Websockets, but not finding much online. – diegosasw Mar 31 '21 at 01:05
  • No option chosen yet.. – Judy007 Mar 31 '21 at 13:21
  • On the same situation. We were able to get a react client connected to the microservice, but SingalR says it can't negotiate due to a timeout. – JoanComasFdz Aug 17 '21 at 14:41

4 Answers4

3

Amplify and the AWS IoT Gateway is what you need. The IoT GW offers pub-sub using MQTT and WebSockets.

https://docs.amplify.aws/lib/pubsub/getting-started/q/platform/js

For a web app they have JS libraries that allow you to get an auth token and then subscribe or publish to a topic. On the server side you can use the AWS SDK to publish messages to a topic.

  • still trying to understand how exactly I can send connection message. From what I have read so far, the only option is to use the "API Gateway Management API." Your saying the SDK allows this as well on server side? Is there .net sdk available? – Judy007 Mar 11 '22 at 12:25
  • Also, are you saying you would not recommend using the API Gateway websocket api? But instead use a substitute to that? – Judy007 Mar 11 '22 at 12:27
  • it does not look like amplify supports AWS API Gateway Websockets, yet..https://github.com/aws-amplify/amplify-js/issues/2924 – Judy007 Mar 11 '22 at 12:31
1

I believe the most comparable service to SignalR in the AWS ecosystem is in fact Ably through AWS marketplace & cloud, it's a pub/sub service, and offers features like SignalR that allow it to be used in browsers and fallback to HTTP transports. See https://aws.amazon.com/marketplace/pp/prodview-ztlupxg5nugma?sr=0-1&ref_=beagle&applicationId=AWSMPContessa

Matthew O'Riordan
  • 7,981
  • 4
  • 45
  • 59
0

Take a look at AWS AppSync, I think it's similar to what you're looking for.

https://aws.amazon.com/appsync/

noobius
  • 1,529
  • 7
  • 14
  • I don't know enough to say for sure, but it looks like appsync is a graphql api. I'm not sure how that solves for a client-side socket connection. – dhysong Dec 29 '20 at 19:30
  • 2
    @dhysong GraphQL supports subscriptions, and it seems like AppSync implements real-time subscriptions with GraphQL: https://aws.amazon.com/blogs/mobile/iot-with-aws-appsync/ – Alexey Zimarev Dec 03 '21 at 18:59
0

Look Appsynce service for real-time data communication on UI, we need to update npm amplify library on angular UI, please check below URL.

https://aws.amazon.com/blogs/mobile/building-a-real-time-stock-monitoring-dashboard-with-aws-appsync/

https://aws.amazon.com/blogs/mobile/appsync-real-time-live-sports/

Sher Singh
  • 497
  • 5
  • 8