Re: Adding components to a stuartsierra/component system at runtime

2015-05-05 Thread Chap Lovejoy
Stuart, Leon, Thank you for the follow ups. I ended up doing as Leon described and creating several subsystems for each remote connection and injecting the required dependencies from the top-level system. I have a component that manages creating the subsystems and dealing with stopping them wit

Re: Adding components to a stuartsierra/component system at runtime

2015-05-05 Thread Leon Grapenthin
You can work with two systems. The first system connects to the database. Once you have started it, you can use it to create the second system. Then you start the second system. The code for this can be wrapped in a single component. On Sunday, May 3, 2015 at 12:02:00 AM UTC+2, Chap Lovejoy wr

Re: Adding components to a stuartsierra/component system at runtime

2015-05-03 Thread Stuart Sierra
Hi Chap, There isn't, unfortunately, a good way to modify systems after they have are started. I have put a fair amount of thought into this but never come up with a solution I was satisfied with. In your case, I think I would suggest creating one system just to load the configuration data an