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.

Baratine is the simplest way to build reactive microservices for your application APIs. Baratine lets you build your services around plain-old-Java-objects (POJOs). Encapsulation in Baratine extends object-oriented programming to include the thread context. This allows you to model your services in with your business application logic, while being reactive at the same time.

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 has three main deployment models: standalone server, in a servlet container, embedded in a Java application. 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

Example GitHub:

Hello Patterns

Hello World (Single Page Application) _images/example-hello-server.png
Hello World Tour (Tour of Baratine using Hello World) _images/example-hello.png

Core Patterns

Singleton Resource (Singleton Resource Service) _images/example-singleton.png
Queue with Application API (Active Queue) _images/example-queue.png
Protocol for Existing Module (JAMP HTTP/WebSockets) _images/example-protocol-module.png
Microservice _images/example-protocol-module.png
In Memory with External Database _images/example-sharding-db.png

Extended Patterns

Data Access Service (Hibernate Gateway) _images/example-gateway.png