-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read journal for DynamoDB #50
Comments
Contributions here would be very interesting |
Thanks for your reply Patrik, On another note, do you think DynamoDB triggers which launch AWS Lambda functions can be used to populate views? |
@patriknw We're looking into implementing this and offering a PR. |
Sounds good. One consideration might be the cost aspect of dynamosb queries. The cassandra plugin is good, but it's using ActorPublisher which should probably be implemented with GraphStage instead. Another thing, cassandra plugin is polling. If DynamoDB has some push notification that would be nice to use. |
@patriknw There's something called Dynamodb Streams which publishes the events on a Dynamodb table if so configured. The aws client provides an api with a so called iterator. That still sounds like polling. But I haven't analysed the source code to see if they use a streaming protocol... Regarding your remark about using GraphStage: there's now a Akka Streams Dynamodb implementation. |
ok |
A quick update: I'm pretty far with implementing support for snapshots. I'm doing this on top of a new project I started so progress is not that fast but it is steady. |
After implementing snapshot support #57 I started working on a read journal. I first looked into using Dynamodb Streams api to implement this. Once you create a stream writes are written to that stream and are available for 24 hours. So the stream has to be created from the beginning that data is written in Dynamodb and has to run at all times that data is written, otherwise after 24 hours data gets lost. While the Akka Persistence Query api leaves room for instantiating the read journal and querying it at any time. So I've started implementing this by querying Dynamodb itself in a polling manner. |
At Scala Days @patriknw mentioned that it would be nice do the query up to now using the standard polling api and from there to use Dynamodb Streams. |
@johanandren @ktoso Since I finished the snapshot support I'm gearing up to implement There are three things I'd like to discuss before I start: Can we break this up into multiple PRs somehow? Perhaps create a I'd like to discuss the intended In issue #61 I raise the question of futures vs streams and traits vs functions with implicits. And code reuse. The outcome of that discussion is obviously relevant for implementing this issue. F.i. the recovery logic is very close to |
@johanandren @ktoso |
@joost-de-vries I am currently evaluating dynamodb as akka persistence storage engine and as such also very interested in the read side. What is the status? Is there any progress? |
@aquamatthias I think the best way to implement this is to use Dynamodb Streams. So I've done a bit of work on the side of Alpakka to get that going. |
It seems new versions of the akka-persistence-cassandra plugin (from 0.80) no longer use a Cassandra materialized view, but instead introduce a separate table |
The j5ik2o dynamodb plugin implementation: looks to use a polled scan request lifted to a stream. |
Looking into this further. I agree with akka/akka-persistence-dynamodb#50 (comment)
some odd secondary indices may be required ;) In terms of implementation process, I suspect it will look like so:
each a separate PR and at least snapshot release for each. |
To be able to use events generated on the read side using Akka Persistence Query.
The text was updated successfully, but these errors were encountered: