Search code examples
lagom

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 as rdbms is it any different when switching from RDBMS to noSql?


Solution

  • Lagom is based on Akka Persistence. The specific storage details depend on the persistence implementation used.

    Please see the documentation for Akka Persistence, Akka Persistence Cassandra and Akka Persistence JDBC for details.

    The event data themselves are serialized using a serializer of your choice (usually JSON). This is described in more detail in the Lagom documentation on Serialization.