Closed stevehodgkiss closed 8 years ago
Love your work @stevehodgkiss! Raised a question about the registry class, otherwise 👍
Thanks @vonconrad. Added some filter methods so that you can select registry.projectors
and registry.event_reactors
. In the future we could add tagging to ESP's and add methods to filter by tag here like registry.tagged('tax')
.
:+1: Looks good.
A few more thoughts. So this will work within process but we'd likely want something like this that runs across processes. Any thoughts on how we achieve that?
Good question @grassdog. When we do the work to integrate a "supervisor" that runs multiple ESP's then we'd need to take this into account then... not sure how we could account for it right now when it doesn't exist. I think when we introduce a supervisor object then ESP's would be registered at load time anyways (with no multi threaded components at that stage), so I don't think many modifications would be needed.
Yeah, I don't think it blocks this PR necessarily. I do feel there is some supervision orchestration piece outstanding. As mentioned on Slack one strategy here could be to use threads under a single process. Another might be via something like ECS.
Automatic registration of ESP's to
EventSourcery.event_stream_processor_registry
and lookup via :EventSourcery.event_stream_processor_registry.find('processor_name')
EventSourcery.event_stream_processor_registry.all
EventSourcery.event_stream_processor_registry.projectors
EventSourcery.event_stream_processor_registry.event_reactors
Would
EventSourcery.esp_registry
be better/more concise?This will be used to select what ESP's to run.