Baratine Documentation

What is Baratine?

Baratine is a platform for building POJO microservices. These services are loosely-coupled, connecting to one another through POJO interfaces. Baratine services are:

  • POJOs,
  • reactive,
  • in-memory,
  • persistent, and
  • distributed.

At its core, Baratine is very much like an actor system - there is an inbox queue and a single-threaded worker. Baratine services are reactive and they are resilient, responsive, message-driven, and elastic. They can handle millions of operations per second per instance.

Baratine’s value-add proposition is its high abstraction level. Baratine is the simplest way to build reactive microservices. You do not deal with messages nor forced into a weird abstraction model for your application. Baratine lets you build your services around plain-old-Java-objects (POJOs). It is true object-oriented programming where the encapsulation also includes the executing thread. This allows you to model your services in lock-step with your business application logic, while being reactive at the same time.

Baratine has three main deployment models. While many of the Baratine patterns are useful in all three deployment patterns, the Baratine server deployment offers additional patterns including in-memory, failover and sharding.

  • Servlet web-app for internal services
  • Baratine server for distribution, in-memory and failover
  • Embedded Baratine manager for internal services in any Java VM

Core Patterns

Hello World (Basic Service) _images/example-hello.png
Singleton Resource (Singleton Resource Service) _images/example-singleton.png
Existing Module (Legacy Module Service) _images/example-module.png
Protocol for Existing Module (JAMP Remoting) _images/example-protocol-module.png
In Memory List with external database (in-memory with external database) _images/example-multi-ext-db.png

Extended Patterns

Data Access Service (Gateway Service) _images/example-gateway.png
Baratine TCP Socket Writer (Batching Writer Service) _images/example-batch-write.png
List saved with Baratine store: (Single-item with store:) _images/example-single-store.png
Multiple named lists saved with Baratine store: (multi-item with store:) _images/example-multi-store.png
In Memory List with external database (multi-item with external database) _images/example-multi-ext-db.png
URL-based sharding with Baratine store: (multi-item url-sharding with facade) _images/example-sharding.png
Callback Pinned to Service (callback pinned to service) _images/example-callback-pin.png
Facade to User and Auction (Facade for multiple Services) _images/example-facade-solo.png