Integrate a Lagom application with Cloud Object Storage

Get the code


IBM Cloud Object Storage is an ideal storage choice for a variety of use cases, such as backup and recovery, data archive, and content repository, as well as scalable cloud storage for analytics and cloud-native applications. Lagom provides an opinionated microservices framework that acts like guide rails to speed you along the process. This pattern demonstrates the integration of a Lagom application with IBM Cloud Object Storage.


It is commonly known that the Lagom framework uses the Play Framework, an Akka message-driven runtime, and Kafka for decoupling services. Lagom is also known to support several databases, with Cassandra being the default. However, storage seems to be a topic less mentioned in Lagom. Because it happens underneath the persistence layer, it often doesn’t get the attention it deserves. IBM Cloud Object Storage offers RESTful APIs that can connect applications directly to object storage buckets. In this code pattern, we will showcase a Lagom application using REST APIs to communicate with IBM Cloud Object Storage. The built-in Cassandra database serves as an in-memory data store.

Lagom is a Swedish word that roughly translates as “just the right amount.” The Lagom framework aims to find the correct balance of boundaries between services by looking for a harmonious mix of isolation requirements, bounded contexts, and operational capabilities.



  1. The local Lagom app is set up with access to IBM Cloud Object Storage.
  2. The user initiates transactions with app using calls to a REST API.
  3. Transactions are stored locally in a Cassandra database.
  4. Every fifth transactions results in a status log recorded in Cloud Object Storage.


Find the detailed steps for this pattern in the README file. The steps show you how to:

  1. Download and set up the Lagom service.
  2. Start the Lagom sample application.
  3. Generate some traffic on the Lagom service.
  4. Stop Lagom, and clean IBM Cloud Object Storage.