-
Notifications
You must be signed in to change notification settings - Fork 73
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
Make Robot a real OTP behaviour #61
Comments
@michalmuskala - Yes I agree. I have thought about this many many times. I appreciate your willingness to help, but this would be something I would prefer to do myself as I have been wanting to do for a while now. I would definitely appreciate feedback though. Sound good? |
I totally understand that. If you have some questions or code you'd like me to review, just ping me. |
I sure will. Thanks for understanding. I'm going to release |
I'd love to see this for 2.0 as well. I just ran into another issue that stems from this, where a race condition exists due to the global name registration being deferred until |
Currently the
Hewdig.Robot
module masquerades as a pseudo behaviour through macros and injection of code into the user's module. This has couple issues, most notably the robot cannot be started twice - for example with different adapters - to handle traffic from two different networks. This limitation prevents me from using the library in it's current shape.The
Hedwig.Robot
should be made a real behaviour with API similar toGenServer
or to the customConnection
behaviour. This would make the code more flexible for runtime changes and configuration. Limiting injecting code into user modules should also speed up compilation. It is generally discouraged to inject large amounts of code into user modules.If you agree this would be beneficial I would be glad to work on this.
The text was updated successfully, but these errors were encountered: