Introduce a mechanism to create documented events, each fired under certain conditions such as
A new order is requested by a customer
Payment of an order is validated against a third-party, effectively rendering it as paid
A product's current stock reaches zero
And so on.
These examples should not be considered in particular; the feature I'm conceiving is an abstraction, an API to both fire and listen to any defined event and let other parts of the application (and perhaps outside of the application itself) be aware of these events.
Bare-bones idea
Have a singleton Spring service act as a global event emitter (broadcast)
It also should provide methods that other services may use to listen to specific events
Events themselves have to be serialized using the smallest format available to reduce all possible processing time
And yet, events could (and probably should) link to context objects of any type
Expected outcome
Have, at every developer's disposal, a simple yet powerful mean to extend the features of this project.
Considered alternatives
I haven't yet searched for alternatives, as I often try to figure out how I would do things myself (no I don't endorse doing this, I personally just can't help it).
Summary
Introduce a mechanism to create documented events, each fired under certain conditions such as
And so on.
These examples should not be considered in particular; the feature I'm conceiving is an abstraction, an API to both fire and listen to any defined event and let other parts of the application (and perhaps outside of the application itself) be aware of these events.
Bare-bones idea
Expected outcome
Have, at every developer's disposal, a simple yet powerful mean to extend the features of this project.
Considered alternatives
I haven't yet searched for alternatives, as I often try to figure out how I would do things myself (no I don't endorse doing this, I personally just can't help it).