Get the latest tech news
Event-Driven Core, Request-Response Shell
There’s much uncertainty and doubt (and maybe even fear?) around event-driven architecture. One example is the belief that it’s irrelevant for REST APIs, as using HTTP verbs is quite clearly not event-driven. But behold - you don’t always have to go all-in to win.
The outside view of a typical such system is something like: A service that gets requests via HTTP, does some processing, and manages persistent state with the help of a database. This is where the event-driven architecture comes into play for web applications and APIs: In the form of event collaboration between the backend services. Reminder: Commands, Queries, EventsPatternEventCommandQueryDescribes..An event that has happened in the pastAn intention to perform an operation or change a stateA request for information about the current state of one or many objectsExpected ResponseNoneA confirmation that the command has been executed, or an error messageThe requested informationI once heard someone say, and it stuck with me: “Queries are for front-ends”.
Or read this on Hacker News