scullxbones / akka-persistence-mongo

Implementation of akka-persistence storage plugins for mongodb
Apache License 2.0
103 stars 55 forks source link

Plans on migrating to Pekko and pekko-persistence #557

Closed thjaeckle closed 1 year ago

thjaeckle commented 1 year ago

Hello @scullxbones

Do you have plans to migrate/fork the akka-persistence-mongo library to Pekko and pekko-persistence? Maybe as a fork pekko-persistence-mongo?

The Eclipse Ditto project, which is a happy user of akka-persistence-mongo, has quite an interest of the future of this library using Pekko as FOSS replacement of Akka. And Ditto committers could also try to help migrating to Pekko, if you don't have and plans to do so by yourself.

Best regards

scullxbones commented 1 year ago

Hi @thjaeckle!

Been a while, hope things are well with you :). Happy to hear someone is still getting value out of this little library. There's no/little visibility on my side to that kind of info. Maybe I should have put a piece of "call home" code for analytics in :)

My opinion is close to yours, was sad to see Akka leaving OSS - I had been a user since version 1.3, but I can understand the reasons why.

I have let this project sit for a while as I haven't really been able to work on it much, between life and a new job.

I'd be happy to have a fork to pekko happen, although I don't many cycles to commit to a project. Do you have an idea on the scope of changes? It's not as simple as a text search and replace, is it?

thjaeckle commented 1 year ago

As "Eclipse Ditto" we know that problem that we don't know how actively our project as used - also thought about calling home, if it would not be that unethical ;)

My opinion is close to yours, was sad to see Akka leaving OSS - I had been a user since version 1.3, but I can understand the reasons why.

Yes, same here .. I fully understand and can relate, but it's still very sad. I am very happy that the community formed around Pekko because even without much new features, Akka 2.6 is such a valuable toolkit.

I'd be happy to have a fork to pekko happen, although I don't many cycles to commit to a project. Do you have an idea on the scope of changes? It's not as simple as a text search and replace, is it?

As far as I can see, the scope of changes should mainly be imports as the Pekko project strives for an easy migration path from Akka 2.6 to Pekko 1.0.0.

Maybe we can also engage with the Pekko project if they want to add this persistence plugin as incubator-pekko-persistence-mongo library as part of pekko - similar to other persistence plugins which were formerly pushed by Lightbend and are now also migrated to Pekko, e.g. the dynamodb or cassandra plugins. What do you think?

scullxbones commented 1 year ago

Yes, I'd be on board for adding this as part of Pekko. That would be a good home for it, for sure. How to go about that?

thjaeckle commented 1 year ago

As far as I understood the project, before adding something new to Pekko for the 1.0.0 version of it, they "only" want to migrate existing Akka code to Pekko. From then on, they should be open to contributions - so maybe as an intermediate step doing the fork of akka-persistence-mongo to pekko-persistence-mongo would be good to reduce effort when/if the Pekko project would approve adding the persistence plugin to their codebase.

scullxbones commented 1 year ago

I created a repo and invited you as a collaborator, @thjaeckle - will push the current code from this repo over as a first true commit a bit later today. Are there any other collaborators you'd like me to add in?

thjaeckle commented 1 year ago

Thanks, that's great. Will have time starting mid of February of supporting the path to Pekko. I know of no other potential contributors.

scullxbones commented 1 year ago

I discovered that I have lost my development environment. I am not in a good shape to push the code from here to there. Apologies for leaving this thread hanging, life is proving challenging at the moment. Hopefully the collaborator access means that you are unblocked from anything you need to do.

thjaeckle commented 1 year ago

@scullxbones thanks for the feedback .. I cannot yet make time to start - I hope that I can bootstrap the project once I do.

I saw that the pekko artifacts are already published as Maven snapshots: https://repository.apache.org/content/repositories/snapshots/org/apache/pekko/

So it should be possible to already build against those as replacement of the Akka dependencies.

bdoyle0182 commented 1 year ago

Hi @thjaeckle, Pekko is going through the release process of 1.0.0 having just done core and are going to get started on the tertiary modules. I'm wondering if any progress was made on this or any other help is needed?

also @scullxbones to answer your very initial question, I believe it should be as simple as a text search and replace since the project only depends on akka core. I think the only necessary changes are changing akka version to pekko 1.0.0 in your build.sbt from org.apache.pekko (which just released this week). Then update all of your imports from import akka to import org.apache.pekko. And update any configs to use pekko instead of akka as the root config. The only other thing would be if this project references any classes / objects with Akka in it has been replaced with Pekko.

edit: Upon some tinkering, the one blocker is there being a port of reactivemongo-akkastream for pekko.

thjaeckle commented 1 year ago

@bdoyle0182 the progress is already very good. The library is FMPOV migrated to Pekko: https://github.com/scullxbones/pekko-persistence-mongo

Support for the reactive Mongo variant was dropped and only the official Mongo Scala driver is supported.

We however currently struggle of providing a snapshot or RC release. See discussion in https://github.com/scullxbones/pekko-persistence-mongo/issues/3

I am not very experienced in Scala and sbt and did not yet find enough spare time to publish snapshot artifacts to GitHub packages. And @scullxbones does no longer have the GPG key to publish artifacts to maven central under the original groupId.

Eventually, RCs and a 1.0.0 should land in Maven central, so I also wonder how to proceed, eg using another groupId or trying to move to a Pekko managed repository, if the Pekko project would be interested.

thjaeckle commented 1 year ago

Update on this: We created a fork of akka-persistence-mongo at https://github.com/scullxbones/pekko-persistence-mongo and also released a first 1.0.1 version.