-
Notifications
You must be signed in to change notification settings - Fork 575
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
Is it acceptable to enable serialization between actors at one local galaxy node? #110
Comments
Have you traced the cause of this problem? |
Grid.getInstance("\\config\\peerNoServer.xml", "\\config\\peer1.properties").goOnline();
ActorServer actorServer = new ActorServer();
ActorClient client = new ActorClient();
client.spawn();
client.register("client");
actorServer.spawn();
actorServer.register("server");
ActorRegistry.getActor("server");
final ActorRef<Object> clientGlobal = ActorRegistry.getActor("client");
final Behavior refLocal = actorServer.ref();
clientGlobal.send(refLocal); When there is a call ActorRegistry.getActor ("server"), in co.paralleluniverse.remote.galaxy.GlxGlobalRegistry#getActor0 exhibited AbstractCacheListener, but when I send clientGlobal.send (refLocal), the object is serialized and Kryo serialization is co.paralleluniverse.io. serialization.kryo.ReplaceableObjectKryo#writeObject which call Actor writeReplace, which creates co.paralleluniverse.remote.galaxy.GlxGlobalRemoteActor and call in construct co.paralleluniverse.remote.galaxy.GlobalRemoteChannelReceiver#getReceiver, as was previously exhibited AbstractCacheListener we get ClassCastExeption. |
Ok, I tried to simplify my example as much as possible. https://github.com/hsestupin/quasar-galaxy-issue So I've initialized FlightRecorder and we can see what happens. You can run example the same way:
The code in Example1 class do the following:
Actually I don't think the use-case described above is somehow undesirable for quasar-actor system, doesn't it? It seems like its pretty ok to pass actor-refs to each other. |
Working on it... |
Awesome, thanks |
I've created a tiny project to play with - https://github.com/hsestupin/quasar-galaxy-issue
You can get an issue with
Expected behaviour is throwing the following exception:
java.lang.ClassCastException: co.paralleluniverse.remote.galaxy.GlxGlobalRegistry$3 cannot be cast to co.paralleluniverse.remote.galaxy.GlobalRemoteChannelReceiver
In our project we use custom high-level protocol for interaction between actors which is implemented with simple actor-message passing underneath. Our protocol assumes that serialization is always enabled. And one of the messages contains ActorRef, and this forces actor to be serialized on one local galaxy node.
So the question is should we support the case of local actors interaction or is this a quasar/galaxy issue? Thanks
The text was updated successfully, but these errors were encountered: