https://book-streamer.herokuapp.com/
Want to watch an Intro Video 🎥?
These days, browser-based and NodeJS applications are made up of events: The user types a thing, an API we call gets back to us..
Using the Antares Protocol library, we can quickly implement any system by coming up with a grammar (aka protocol) of event type-names, and produce a highly decoupled application with low complexity, high cohesiveness, and with precise and non-wasteful control of system resources.
For a 'Hello World' of Antares, check out its RunKit, or the 4 Principles from the README:
- An
agent
processes Flux Standard Actions given it through eitheragent.process
oragent.subscribe
.- Actions are synchronously processed through functions given to
agent.filter
- ...and asynchronously processed through functions known as renderers, configured via
agent.on
.- Renderer functions may produce consequences (i.e. effects, or side-effects), return Observables of new actions to be processed, specify a concurrency mode and be run with other options.
Of course, as technicians we know we need to specify it more tightly than the Product Owner may, to take into account system level issues and code quality (which we'll fill in ourselves for this demo).
We can build this app in 7 cumulative phases, using
only the 4 Antares agent operators (process
, subscribe
, filter
, and on
).
While we'll use React, you'll see that following the Antares Protocol results in a Clean Architecture where the app's UI could be switched from React to any other by changing only a single function.
To illustrate the flexibility of this Antares library was one of my goals in building this example application the way it is.
Our mantra is that we will be Assigning Consequences to Events, where a consequence is either a side-effect, or an Action processed in response to the event.
Our design process is to:
See the commits for how it took shape over the course of about half a day.