Questions tagged [lagom]

Lagom is a framework for creating microservice-based systems on the Java Virtual Machine.

Lagom is a framework for creating microservice-based systems. It offers four main features:

  • Service API
  • Persistence API
  • Development Environment
  • Production Environment

The Service API provides a way to declare and implement service interfaces, to be consumed by clients. For location transparency, clients discover services through a Service Locator. The Service API supports synchronous request-response calls as well as asynchronous streaming between services.

The Persistence API provides event-sourced persistent entities for services that store data. Command Query Responsibility Segregation (CQRS) read-side support is provided as well. Lagom manages the distribution of persisted entities across a cluster of nodes, enabling sharding and horizontal scaling. Cassandra is provided as a database out-of-the-box.

The Development Environment allows running all your services, and the supporting Lagom infrastructure, with one command. It hot-reloads your services when code changes; no fragile scripts are needed to set up and maintain a development environment. With Lagom, a developer can bring up a new service or join an existing Lagom development team in just a few minutes.

328 questions
0
votes
1 answer

How to fetch all persisted entities for many instances of the same service

I'm still quite new to the Lagom framework and I'm seeking the best way to fetch all users of my distributed application. In my app, I have a user service working on Cassandra DB. So to select all users I followed the Lagom Online Auction example…
Imen
  • 161
  • 2
  • 14
0
votes
4 answers

Generate a Unique ID for an entity

I'm working on Lagom project and one of the requirement is to uniquely identify each user's document. A document has an id that I should generate each time a user adds a document. My idea is simple to guarantee the unicity of the ID: generate a…
Amr
  • 50
  • 1
  • 10
0
votes
1 answer

Lagom - How can I use event processor in a service integration test?

I am building an authentication service in Lagom (scala) which consists of a device entity and an event processor. The service uses the JDBC plugin instead of the default Cassandra. While writing the integration tests I found out that the event…
idoshamun
  • 1,125
  • 9
  • 21
0
votes
1 answer

Processing of events on read-side processor in Lagom

I have a conceptual doubt. I know the events for a particular entity are processed in sequence on the read-side but I think the processing of the next event does not wait till the previous event is successfully processed and database is updated. Am…
konghoho
  • 53
  • 6
0
votes
1 answer

Play I18N library

I am trying to read messages using play's I18N library. I am able to read messages using it. However I can only read messages from files under resources folder. I am not able to read messages from any other directory or from root. The reason I want…
0
votes
1 answer

How are events stored in Lagom framework

Lagom provides event-source design pattern. It stores the events in database and constructs the state of the when retrieved from database. How is it actually stored. Is it in JSON or any other binary format ? Given that Lagom supports Nosql as well…
kiran.kumar M
  • 811
  • 8
  • 25
0
votes
1 answer

Lagom persistentEntityRegistry.register doesn't work

I'm trying to configure my first Entity with Cassandra and Lagom. I'm asking about how Lagom save the entity in Cassandra? For example, this is my UserServiceImpl class: public class UserServiceImpl implements UserService { private final…
Imen
  • 161
  • 2
  • 14
0
votes
1 answer

lagom-javadsl-api not found in SBT project

I'm new to Lagom and SBT and I'm trying to execute my first project using IntelliJ. The structure of my project is: My SBT version is: sbt.version = 0.13.16 The plugins.sbt file contains: // The Lagom plugin addSbtPlugin("com.lightbend.lagom" %…
Imen
  • 161
  • 2
  • 14
0
votes
1 answer

Disable the embedded cassandra of lagom framework

I start my first Lagom example via this command: activator new my-first-system lagom-java When I tried to start this project I noticed that I have an embedded Casandra started. So I tried to disable this one to connect to my external Cassandra…
Imen
  • 161
  • 2
  • 14
0
votes
1 answer

Lagom Publish message with Kafka

Only one way of publishing is described here. There is another way? The example I need to make a publication with dynamic topic id and custom event without persistentEntityRegistry? And how do I can publish the event with eventId? @Override …
0
votes
1 answer

Dividing microservices in Lagom

Lagom by default creates two modules for every microservice - API and implementation. Is it possible to divide one microservices into 3+ modules?
user3285241
  • 319
  • 2
  • 3
  • 18
0
votes
1 answer

Remote persistent views with Lagom

In a classical microservice architecture, you have relevant domain events published on some messaging system which allows other parts of the system to react. Now imagine you have three microservices: Customers, Orders and Recommendation. The…
Edmondo
  • 19,559
  • 13
  • 62
  • 115
0
votes
1 answer

How to make Java Optional Serializable in Lagom?

I am using Lagom framework with Java. I have a model class which uses optional in the constructor argument. I have only one persistent entity based on this model class and have entity tests (using PersistentEntityTestDriver) for this entity. The…
konghoho
  • 53
  • 6
0
votes
1 answer

Can a Lagom service have only one entity?

Can a single Lagom service have only one entity? I could not find an example which use two entity types in a single service.
konghoho
  • 53
  • 6
0
votes
1 answer

Does actor/agent system make iPaaS redundant?

Let's assume, that I have application, that uses Akka (possibly with Alpakka and/or Lagom). Can I still benefit from iPaaS like Red Hat JBoss Fuse? If yes, what is that benefit? If no, that how is called part of actor system that is an alternative…
spam
  • 1,853
  • 2
  • 13
  • 33