Blogs Crucial DSO server

Crucial DSO server

Traditionally, an object-relational mapping (ORM) converts the data between the application and storage tiers. The ORM materializes the frontier between the two tiers, and it reduces the coupling. However, it also forces to repeatedly convert the objects between their in-memory and their serialized representations back and forth. This negatively impacts performance and increases execution costs.

Crucial DSO is a general-purpose synchronization and data sharing framework. With DSO, instead of fetching objects from storage, the application directly calls them. DSO ensures that the objects are persisted and shared consistently among several client machines. DSO is built on top of Infinispan and leverages its extensibility. The work was done in the context of the CloudButton project, which aims to build a serverless platform for quickly deploying workloads to the cloud, but the advantages are available to everyone using Infinispan!

Programming with DSO

DSO offers several client-side programming libraries. The most complete one is for the Java language. To declare a DSO object in Java, the programmer uses the @Shared keyword on the field of an object. As an example, consider the following two classes.
class Hero {
    @Shared Room location;

class Room {
    Treasure loot();

The Hero class contains a location field annotated with @Shared. This tells DSO to push the location to the storage tier, allowing several instances of Hero on several application machines to access the same location object transparently.

DSO ensures that the objects are strongly consistent over time. In the example above, this means for instance that if two heroes stand in the same room, only one of them may loot the treasure. More precisely, the synchronization contract of every DSO object o is that o is atomic, aka. linearizable. In Java, this is equivalent to guarding every method m of some object o with synchronized(o) { o.m }.

DSO includes a library of shared objects (counter, integer, list, maps, barrier, etc.).

DSO follows a standard client-server architecture. The server component is built as an Infinispan Server extension. To quickly setup a DSO-enabled Infinispan Server on Kubernetes using the Infinispan Operator, we can use the code deployment capabilities. Until an official release of DSO is published, you will need to build it yourself and make the generated artifacts available from a local Maven repository or a simple web server.

kind: Infinispan
  name: infinispan
  replicas: 2
      - url:
        type: file
      - url:
        type: file
      - url:
        type: file
      - url:
        type: file
    type: DataGrid

(We will soon make a bundle available for simpler installation)

When the server starts, you should see the following log:

INFO  (main) [org.crucial.dso.Factory] Factory[Cache '__dso'@kashyyyk-4890] Created
INFO  (main) [org.crucial.dso.Factory] Factory singleton  is Factory[Cache '__dso'@kashyyyk-4890]
INFO  (main) [org.infinispan.CONTAINER] DSO cache initialized

Head over to Crucial’s DSO page for code, examples and more details about this exciting project.

Get it, Use it, Ask us!

We’re hard at work on new features, improvements and fixes, so watch this space for more announcements!

Please, download and test the latest release.

The source code is hosted on GitHub. If you need to report a bug or request a new feature, look for a similar one on our JIRA issues tracker. If you don’t find any, create a new issue.

If you have questions, are experiencing a bug or want advice on using Infinispan, you can use GitHub discussions. We will do our best to answer you as soon as we can.

The Infinispan community uses Zulip for real-time communications. Join us using either a web-browser or a dedicated application on the Infinispan chat.

Tristan Tarrant

Tristan has been leading the Infinispan Engineering Team at Red Hat for quite a while now, as well as being Principal Architect for Red Hat Data Grid. He's been a passionate open-source advocate and contributor for over three decades.