Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Giampaolo Trapasso
@giampaolotrapasso
Hi there
Is 0.1.1 production ready?
Age Mooij
@agemooij
It is used in production with at least one company that I know of and they have never had any problems. the low version number is more about leaving room for API changes then about stability or production readiness. Stamina is basically a version 3.0 of an older, closed source idea that is also running in production (for about 1.5 years already).
Giampaolo Trapasso
@giampaolotrapasso
thanks for the explanation
Akos Krivachy
@krivachy
Thought it would be better to ask here than in an issue: is there any way to guarantee at compile time that all objects that I call persist and persistAll with will be serializable by stamina? I'm looking to provide this guarantee as we'll probably be maintaining this code for a while so being sure that the events we persist are upgradeable would be quite important. Have any of you implemented nice strategies for something like this?
Age Mooij
@agemooij
Well, that depends a bit on the implementation. The stamina-json implementation enforces this at compile time by requiring an implicit json format type class and explicit json transformers but of course in the end you will still have to unit test your AST transformations becuase those are untyped by nature.
Or am I misinterpreting your question?
Akos Krivachy
@krivachy
Yes, I was more thinking about solving the unsealedness of the Persistable trait :) Not an easy thing to solve. But essentially I can easily imagine someone adding an Event that needs to be persisted, but doesn't implement the required persister/format for it.
Age Mooij
@agemooij
Yeah, the untyped nature of Akka's serialization system puts this outside the reach of Stamina. The best we can do is to make it as easy and safe as possible to work around that core limitation.
Arnout Engelen
@raboof
@krivachy indeed forgetting to implement a persister is a risk
Arnout Engelen
@raboof
@krivachy I think there are 2 failure modes here: adding an event that implements Persistable but forgetting to support that class in your persister, and forgetting to make it Persistable at all
@krivachy the former quickly comes up during testing, as it would fail as soon as you try to persist the first event of that type
@krivachy the second is more tricky: by default akka would fall back to Java serialization, and you might not notice until it's basically too late
@krivachy I'd like to extend stamina-testkit so it could check you've covered all your event types (perhaps using a macro?), that might also help you catch the former situation earlier
Arnout Engelen
@raboof
@krivachy for the second situation you could try disabling the standard Java serializer altogether, but that might be cumbersome if you're also using it in other places (e.g. for akka-remoting) :)
@krivachy eventually I'd like us to be able to configure akka-persistence and akka-remoting serializers separately (and don't use Java serialization by default for akka-persistence) - but that'd probably require a change to upstream akka-persistence
Age Mooij
@agemooij
@raboof I talked to someone on the Akka team yesterday and the new remoting stuff being designed at the moment should be able to solve this. They are mostly unaware of this problem AFAIK so I suggest creating some issues targeted at the new remoting preview to get the conversation started.
The project is called Artery. Here's the original issue: akka/akka-meta#16
Leonard Ehrenfried
@leonardehrenfried
@raboof @agemooij I've written a persister implementation that uses play-json instead of spray-json. would you be interested in merging this code in or do you think it would be better off in its own repository?
Arnout Engelen
@raboof
@leonardehrenfried I think it'd indeed make sense to have it as a subproject inside of stamina - it's probably fairly small (right?), and having it follow the stamina release cycle would be convenient. @agemooij agree?
rrodseth
@rrodseth
Looks like a really promising project. Any new releases on the horizon? There seem to be several PRs that have been in limbo for a long time, eg
scalapenos/stamina#36
any comments on this question ?
might be related a little bit to stamina
retrospectacus
@retrospectacus
Hi. I'm having trouble implementing a "mapValues" updater for my migration. https://paste.debian.net/918436/
retrospectacus
@retrospectacus
So I got that working by implementing a lenses.Operation for mapValues. https://paste.debian.net/918463/ Just one TODO in there, any suggestions?
retrospectacus
@retrospectacus
pretty slow in here eh