apache / pekko

Build highly concurrent, distributed, and resilient message-driven applications using Java/Scala
https://pekko.apache.org/
Apache License 2.0
1.21k stars 148 forks source link

deserializing persisted data that has akka classnames #604

Closed pjfanning closed 5 months ago

pjfanning commented 1 year ago
bdoyle0182 commented 1 year ago

I'm testing locally a converter in the serializer in the mongo plugin there and will post back if that solves it, but would be awesome if we could auto convert it in the core code but I'm not sure if that's even possible.

bdoyle0182 commented 1 year ago

see https://github.com/scullxbones/pekko-persistence-mongo/issues/10#issuecomment-1701540758

He-Pin commented 1 year ago

@bdoyle0182 I think this can be done with an spi hook, and then the project will need to implemented it with both akka and pekko in the classpath.

bdoyle0182 commented 1 year ago

I think the issue here is plugin specific unfortunately since the storage plugin decides how to serialize / deserialize the data to the db. I'm not sure how you could solve this in core when the plugin will still need to account for this translation based on how they originally set up the data to be stored. You could make it easier providing an spi hook to do the classname translation, but regardless it would still need to be something each plugin maintainer would need to account for.

pjfanning commented 11 months ago

we've hit #841 and #838 (same issue, just 2 attempts at fixing it)

bdoyle0182 commented 10 months ago

@pjfanning has that been included in a release yet?

pjfanning commented 10 months ago

@bdoyle0182 #841 is not released yet. Will be in Pekko 1.0.3 but that release is not yet scheduled. You can help by trying the latest Pekko snaphots - e.g. 1.0.2+13-9b596fa4-SNAPSHOT

Unfortunately, in a volunteer project - not every volunteer has to worry about migrating akka data - I haven't used Akka in the last 5 years as an example. Some of us have no Akka baggage.

bdoyle0182 commented 10 months ago

I don't have full context on what the fix is for exactly, but if I'm using the fix that I made for the specific plugin for mongo would this be a relevant issue still or would that bypass the issue in these PR's?

pjfanning commented 10 months ago

I don't have full context on what the fix is for exactly, but if I'm using the fix that I made for the specific plugin for mongo would this be a relevant issue still or would that bypass the issue in these PR's?

I don't follow. Pekko 1.0.3 will be released in a few months. 1.0.3 will include https://github.com/apache/incubator-pekko/pull/841

If you don't like snapshots, you could try the full release when it is released. Unfortunately, Pekko has a mismatch between developers with green field work and those who are Akka refugees. The Akka refugees are disengaged. Their disengagement is hindering efforts to help them.

pjfanning commented 5 months ago

1.0.3-M1 was released