Domain service

Domain service module incapsulates all DB related functionality allowing to produce CRUD data API for other application components. Dworkin uses PostgreSQL as DB and postgres-async-driver as a library for reactive connection pool creation.

Each table in application DB corresponds to immutable Java entity class, e.g:

 

Each entity class is controlled by repository Java object implementing base CRUD interface through postgres-async driver:

Apache JCS is actively using for data caching in repository classes.

To expose DB data to other services Dworkin uses Lagom service descriptor located in DomainService interface:

 

Service implementation is located in DomainServiceImpl class: