-
Notifications
You must be signed in to change notification settings - Fork 193
Strategy for gradual Akka - Pekko migration with shared library and rollback capability? #2592
-
|
We're planning a gradual migration from Akka to Pekko and would appreciate guidance on the best approach. Our setup:
Our goals:
What we've considered:
Our concerns:
Has anyone implemented a similar incremental migration strategy? What patterns or tooling would you recommend for maintaining parallel Akka/Pekko builds during a transition period? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 4 comments 10 replies
-
|
If you don't depend on clustering, the migration is very easy with a package change then. |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
If you use sbt as a build tool, you could use an sbt plugin like https://github.com/fkz/scala-rewrite-imports which will rewrite imports into another import. It also shouldn't be too hard to do the same with the various |
Beta Was this translation helpful? Give feedback.
All reactions
-
2
-
I'm more concerned about conflicting transitive dependencies. |
Beta Was this translation helpful? Give feedback.
All reactions
-
I wasn't aware of this plugin, thanks! |
Beta Was this translation helpful? Give feedback.
All reactions
-
The Pekko 1.0.x series is strictly a fork of Akka 2.6 without any changes to dependencies, only package names/conf paths and any related changes are done. This was a deliberate decision to make migration smoother. If you are talking about transitive dependencies further down the chain (i.e. you have library that depends on Akka 2.6 but it isn't compiled against Pekko 1.0.x that isn't a satellite Pekko project) then you have to have to either fork it and make a version built against Pekko 1.0.x or if its an internal library then cross build it, scala-rewrite-imports should help here as well along with the use of sbt subprojects. |
Beta Was this translation helpful? Give feedback.
All reactions
-
We're on Akka 2.10. We'll see which of these is the most straightforward. |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
hi @travissarles I just went through this myself with ~20 services in a monorepo with loads of shared sbt projects between them as well as roughly the same number of internal libraries hosted in another repo. the method i used was what my sensei would call "brutal duplication for total domination" otherwise known as the bottom up approach. in a nutshell:
all the leaves and shared branches of the dependency graph being duplicated, we were in a position to migrate each application one at a time--no application had both akka and pekko dependencies. yes, it meant for a period of time we were careful in PR reviews to make sure changes were replicated in duplicate projects, but the migration took less than a week. since we tag our docker images with the commit sha, rollback would have been easy but never happened. we experienced two minor difficulties:
it's been four months since, no issues reported |
Beta Was this translation helpful? Give feedback.
All reactions
-
1
-
Also an interesting approach. I think with our setup it would be difficult to manually keep changes in sync over a few months. If we did it in a week, like you did, that could work. |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
We have migrated to Pekko for some important scenarios. We mainly use Pekko streams and actors, such as live streaming, translation, proxying, and MCP server, and have not encountered any problems. We are using pekko with Java and Java 21. |
Beta Was this translation helpful? Give feedback.
All reactions
-
1
-
|
That's encouraging to hear! We're also using Akka streams. |
Beta Was this translation helpful? Give feedback.