Talon provides the machinery to easily build, run and manage micro applications (‘micro app’). A micro app is a lightweight, stateful message processor that resides on a messaging fabric. A micro app stores state as Java objects entirely in local memory and collaborates with other micro apps using guaranteed eventing via its underlying messaging fabric.
The Talon runtime uses configuration information to connect to the messaging fabric and drive the business logic embodied in the micro app message handlers in an exactly once, fully fault tolerant manner. Application developers just implement message handlers. The Talon runtime dispatches inbound messages to the appropriate handlers, the handlers execute business logic, update state and send outbound messages to downstream apps. Talon enables the following for a developer
- Maintain state as POJOs
- Sends and receive messages as POJOs
- Assume that POJO state updates and outbound message sender performed by a message handler are durable and transactional.
By enabling this, Talon makes it extremely ease for the developer to author streaming, multi-agent apps that are fault tolerant, scalable and perform at memory speeds.
A Simple App
Lets say a developer would like to write an app that performs the following
- Maintain a counter in its state
- Update the counter on receipt of a message and send an outbound message with the updated counter value
To implement such an app using Talon, the developer would do the following:
- Model the app state in XML
- Model the app messages in XML
- Integrate the X code generator into the app's build process
- Author a message handler that updates the state and sends the outbound message
State Model
The following XML models the app state.The state is comprised of a single root Repository object with a counter value in it.
This is a very simple state tree comprised of a single node. In reality, micro app state trees can contain several collections and can be quite deep.
Click HERE to get started with Talon.