-
Notifications
You must be signed in to change notification settings - Fork 36
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
Be able to pass functions as parameters in forked actors #6
Comments
If you give me a few hints, I could try to implement it |
Of course, feel free to implement and to ask any questions! I'm thinking of the following implementation. I would not check each value in |
@vallettea , if you are going to implement this, please assign this task to yourself and use a separate feature branch. |
I believe this is similar. I'm not necessarily trying to pass a function as a customParameters but thats what I tried and failed to accomplish my goal. I have an express server that has a request handler that basically sends a sendAndReceive to an actor that has child actors that process the request and create a series of actions that the parent can send back to the request handler to execute. Is there a better way to do this or should I be looking at trying the implementation you laid out? |
It worked to send a string of the location of actors. Although currently the example lives in the same repo as the server. At some point when it gets npm installed I'm not sure if the location method will work. |
@aintnorest , can you please provide the code or pseudocode of what you are doing just to get the idea? |
|
I am creating them through createChild. That code leaves out a bit but I could post more if your not getting the gist. |
@aintnorest , I see your point. In general it's not a good idea to tell an actor which children it should have from outside. It's better to encapsulate the child structure and settings within an actor. This way, every actor will be better isolated and movable across your project structure. You give an actor a "big idea" of what problem it should solve (with some inputs not related to actor structure), and then an actor decides by itself which children it needs to spawn and how to break down the input task to subtasks and how to distribute the subtasks between the children. You apply the same strategy recursively to every child actor. |
Not every team has the same needs. I was trying to give them a way to pass in their needs |
See this issue for more context.
The text was updated successfully, but these errors were encountered: