How It Works

Baratine is a new distributed in-memory Java service platform for building a new breed of ultra high performance web services. Baratine’s non-blocking, actor-model architecture offers consistent low-latency performance that realizes the full potential of your hardware.

Baratine empowers you to operate in-memory reliably and intelligently with its distributed, persistent, NoSQL key-value store. Baratine’s built-in journaling gives you secure and transactional in-memory operation. If and when you need to, Baratine scales out with unprecedented finesse by automatically sharding your data and services across the entire cluster.

What if my dataset doesn’t fit into memory?

Because of Baratine’s non-blocking architecture, you’ll get unparalled performance if you can keep your entire dataset in memory (or sharded in memory across the cluster). But Baratine is more than just about fitting all your data in memory; it’s about keeping your data close to you at the point where it’s needed – no more wasteful shuffling of data around. Baratine’s model gives each of your services ownership of its own in-memory data, persistent store, and journal. This is what we call operational data. Even if your dataset is larger than main memory, you’ll still take full advantage of Baratine including unfettered and consistent low-latency performance.

Benefits

POJO

The services you write in Baratine are just plain old Java objects:

@Service("/cart")
public class ShoppingCartService
{
  @Inject
  private Store _cartStore;
  private HashMap _cartMap = new HashMap<>();

  public boolean clearCart(String cartId)
  {
    ShoppingCart cart = _cartMap.get(cartId);
    boolean isSuccessful = cart.clear();
    
    if (isSuccessful) {
      _cartStore.put(cartId, cart);
    }
    
    return isSuccessful;
  }
}
          

And Java clients can readily consume services:

public class User
{
  @Inject
  private ShoppingCartService _cartService;
  private String _cartId;

  public void clearCart()
  {
    boolean isSuccessful = _cartService.clear(_cartId);
    ...
  }
}
          

In this example, Baratine creates an RPC proxy ShoppingCartService and injects it into the client. This proxy is responsible for serializing methods calls onto the Disruptor queue before invoking calls in order against the actual ShoppingCartService.

Versatile

You can choose to operate entirely in-memory. Or use Baratine’s built-in asynchronous key-value store to build NoSQL services. Or use the store to complement your aging database, or even to replace it. However you choose to use Baratine, Baratine journals your data for transactionally reliability so you can operate in-memory with confidence. If and when you need to, Baratine scales out with unprecedented finesse by automatically sharding your data and services across the entire cluster.

Baratine’s architecture

The following components make up Baratine:

  • ring buffer queue: Disruptor-like implementation
  • distributed, asynchronous key-value store
  • journal
  • BFS (Baratine File System): distributed file system
  • Bartender: ZooKeeper-like implementation
  • service registry
  • web server
DOCUMENTATION

DOWNLOAD NOW

Manufactured by Caucho Technology, Inc.