Open TimoGlastra opened 3 years ago
I was considering having our own EventEmitter API independent of implementation, be it Node.js EventEmitter, RxJS or whatever else. Not sure about that.
One benefit would be a possibility to change the implementation or align the API with our needs (needs of the framework 😄 ) On the contrary, developers would need to understand the API and maybe also the underlying technology. 🤷♂️
I think a bit like you @jakubkoci because relying on third-party EventEmitter may break things, at least on mobile implementations, as you cannot have some of these on mobile, like Node.js.
An EventEmitter is just a way of communicating to some other element in the code that wants to be notified. I think it is easy to understand an EventEmitter usage.
Also, creating an implementation of that will help in other features like parallel vs serial, waiting for events to be processed, queues, etc.
Steps
Questions
Links and inspirations: https://herbertograca.com/2017/11/16/explicit-architecture-01-ddd-hexagonal-onion-clean-cqrs-how-i-put-it-all-together/ https://github.com/uport-project/veramo/blob/next/packages/core/src/agent.ts
list of events:
event name conventions:
Connection module needs routing service (how to do with events?)