Skip to content
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

Add support for akka-persistence. #70

Open
s3ni0r opened this issue Apr 16, 2017 · 3 comments
Open

Add support for akka-persistence. #70

s3ni0r opened this issue Apr 16, 2017 · 3 comments

Comments

@s3ni0r
Copy link

s3ni0r commented Apr 16, 2017

Hi,
As discussed in the akka.js gitter room, here's a space where to discuss possible support for akka-persistence in scala.js.
The idea is to use localstorage or indexedDb as a backend, i have a use case where i need to save mouse event data locally when an app goes offline, and then stream them to a backend server once it's back online, for now i use akka-stream to handle buffer and throttling, and pouchdb to avoid using low level indexedDb api.

@jducoeur
Copy link

It's awfully intriguing -- I'm not using akka.js myself yet, but in the long run this would be an argument in favor of my doing so.

I suspect that this will turn out to be most useful in the context of a larger framework, that wraps it with a concept of events flowing in both directions and a mechanism to use those events to update the local state. Certainly, I'd want a principled wrapper that has a concept of "persist these events over to the server, then flush them locally", to avoid building up dead events on the client side.

But yeah: this seems like a really useful tool towards an elegant client/server architecture that copes cleanly with the client being offline sometimes...

@andreaTP
Copy link
Member

This is interesting indeed, and the use case totally justify the effort.
I will try to put together a starting point in these days if I find any spare time!

@andreaTP
Copy link
Member

just in case anybody is interested in help out here is the branch:
https://github.com/akka-js/akka.js/tree/persistence

current status is just minimal project settings for cross-compiling and working on serialization with protobuf and ScalaPB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants