In Summer '17 Salesforce released Platform Events - a native messaging system accessible via Apex and several APIs.
I assume the main use case for such a feature is to allow integration of Salesforce apps into the SOA of a company meaning connecting Salesforce with other enterprise systems.
But...wouldn't Platform Events also be of great help in many native and standalone Salesforce applications? Especially more complex ISV applications?
I'm thinking of Domain Events as Eric Evans defined them in his book which are different than Integration Events as described here.
What's your opinion on this (the most detailed and complete answer will be credited.) Couldn't Platform events also help app developers to:
- Decouple monolithic, synchronous Apex apps into an architecture of micro services. Something similar that OSGI or IOC Containers like Spring do. You can find more details in this question Implement Domain Event Pattern in Apex - can and should it be done?
- Solve Governor Limit problems by pulling code before and after triggers apart into separate execution contexts
- Build a communication channel between Base and Extension Packages without global Apex classes.
Replacing tightly-coupled synchronous Apex code which guarantees all-or-nothing consistency with a loosely coupled asynchronous world surely has many drawbacks. If Salesforce.com had those other use cases in mind I would expect them to also provide solutions for that in the next releases.