Skip to main content
Mutiny
- Mutiny is a novel reactive programming library implementing the reactive stream API.
- We also have project reactor and RX Java As reactive programming libraries which are widely used and a lot of projects integrate it.
- Mutiny aims to be very Simplistic and it’s tightly integrated into the Quarkus Framework.
- Every reactive API uses mutiny API.
- Quarkus is a modern cloud Native micro services framework.
- Quarkus is gaining A lot of popularity in cloud native environments.
- Quarkus Reactive engine is powered by eclipse vertex and Netty.
- Vertex Clients are made available using mutiny bindings.
- We can use mutiny directly with vertex aswell.
- Mutiny is independent library and does not depend on Quarkus or Vertex.
- Mutiny is built on top of three pillars
- Event Driven
- Enables being elastic, resilient, And responsive.
- API navigability
- Mutiny is quite different from “RX Java” And “Project React” reactive API libraries.
- Simplicity
- The functionality is limited to the basics and learning curve is smaller than RX Java and Project Director.
- It supports only two reactive types
- Multi
- Represents streams of 0-n items(Potentially unbounded)
- Uni
- Represents streams of Receiving either an item or a failure.
- Vertex uses futures and promises To be able to use this mutiny, API
- A mutiny generator is provided, which transforms the vertex core API’s, Vertex Web API’s, And so on into mutiny core API’s and mutiny web API’s.
- This is done by smallrye mutiny vertex bindings library.
- The bindings are available for all kinds of vertex modules And you can integrate it by specifying an artefact “smallrye-mutiny-vertex-<Module>.
- Module refers to a vertex module, such as coal, pg-client, Web client etc.
- The group ID is io.smallrye.reactive And all imports come from this group.
- A practical learning curve of mutiny can be as follows
- Create a simple UNI, example form mutiny UNI type.
- Create a simple multi example
- Integrate mutiny into vertex core and vertex web.
- Vertex web and vertex reactive, Postgres client And mutiny example
- Fully reactive from API to data store.
Comments
Post a Comment