Some ideas #364
Replies: 5 comments 10 replies
-
Yeah we can add the actor type to the identity. However actor ID are determined by their path in the actor system. Bear in mind actors cannot live without a system.
Agreed we can add some utilities method to abstract this kind of code.
Actors are spawned locally and redistributed when cluster mode is activated (https://github.com/Tochemey/goakt/blob/main/actors/actor_system.go#L1285). One can also create actor on remote machine within the same actor system. Can you please elaborate on the smart spawn strategy?
One can use the
|
Beta Was this translation helpful? Give feedback.
-
@Tochemey But rebalancing only happens when the topology changes right? I think it is better to spawn actors on the correct node, the one with least count for now, without any elaborate code. If some how all requests are going to one node, I think actors are piling up now. |
Beta Was this translation helpful? Give feedback.
-
@Tochemey It is wired that For now, the api services are actually bundled with actor systems, which is not a serious problem. The issue here is that without some rpc apis. It is not possible to call actors directly. |
Beta Was this translation helpful? Give feedback.
-
@qazwsxedckll By the way this method |
Beta Was this translation helpful? Give feedback.
-
@qazwsxedckll I have created an issue here to look into the cluster client feature #370 |
Beta Was this translation helpful? Give feedback.
-
Using type+name as the identity rather than name only.
Send message without knowing if the actor is local or not.
Smarter spawn strategy, rather than spawn locally or on designated node and then rebalance. Btw, I do not see any rebalancing codes.
Maybe add actor client so that services can be moved to other programs and the client can know where the actor locates before sending messages.
Actors with the same subset of message types should be considered as the same type.
For example, if ParentActor can handle MessageA and ChildActor can handle MessageA and MessageB. An instance of ChildActor is considered as ParentActor. (Something like the golang interface, do not know if it is possible or not)
Beta Was this translation helpful? Give feedback.
All reactions