can you use dynamodb streams to have realtime triggers like firebase?

后端 未结 2 1576
-上瘾入骨i
-上瘾入骨i 2021-02-20 04:35

Looking through the new dynamodb streams feature, can you use it to do real-time push scenarios like a chat room? Or can you only poll the streams api to get periodic updates?<

2条回答
  •  独厮守ぢ
    2021-02-20 05:00

    DynamoDB Streams are very, very similar to Kinesis but technically different things. They use similar APIs and their client libraries are related as well, but they are different.

    It sounds like you are waiting a client (ex: browser) running on a client to receive a notification that a record changed in real time. This is not what DynamoDB Streams provides.

    DynamoDB Streams are more like the NoSQL+clouds approach to database triggers.

    It would be possible to build something similar to Firebase using DynamoDB + DynamoDB Streams + Lambda + some type of web socket server. Using this approach you could have writes to your DynamoDB database notify a Lambda function that would notify a web socket server that clients are connected to in real time. This means DynamoDB Streams + Lambda really isn't doing the heavy lifting for this use case as you would need to run your own web sockets server on EC2.

提交回复
热议问题