Closed photex closed 6 years ago
Several years ago, I came to Scala and Akka from Erlang. There was usually no need for multiple actor systems.
Currently, Xitrum uses the actor system named "xitrum", but it uses the top level "akka" config, see akka.conf and xitrum.conf: https://github.com/xitrum-framework/xitrum-new/tree/master/config
allows an application to provide their own actor system for xitrum
I think you can modify the source code so that you can provide a config for the actor system that Xitrum creates, so that if you have multiple actor systems, you can configure them independently.
Currently, as explained above, if you want to configure the actor system for Xitrum, you need to configure the top level "akka".
My concern isn't being able to configure them. I know that is possible. I'm concerned about creating multiple actor systems, these are heavyweight and create N threads, and I'm unsure whether it's a good idea to have multiple actor systems in a node when using the akka cluster facility.
N is around twice of the number of CPU cores, so it should not be a problem if you only have several actor systems.
Sorry to not respond for such a while. I've done some testing and you're correct. My other actor system can be configured separately from xitrum easily and this there is minimal impact.
Only potential concern comes about when clustering. If I wanted to enable clustering for my actor system as well as xitrum, I'd end up with having to specify multiple cluster port bindings right?
multiple cluster port bindings right?
Yes, I think so, although I haven't tried that before.
Howdy!
Decided to try out xitrum to add a sockjs endpoint to an existing akka cluster application. I am confused by the decision to hard-code the actor system that xitrum uses. I'm interested in submitting a PR that allows an application to provide their own actor system for xitrum to use but wanted to make sure I wasn't treading on already discussed design.