flipkart-incubator / flux

Highly scalable Event-driven, Reactive system for building Stateful apps and Workflow services.
Apache License 2.0
107 stars 43 forks source link

Persistence layer in codebase #102

Open shyamakirala opened 2 years ago

shyamakirala commented 2 years ago

Currently, in the flux codebase, the resource and controller classes interact with DAO layer directly. This lacks good coding practices such as separation of concerns, extensibility, and readability. One way to solve this problem would be to introduce a persistence layer that would handle all the transactions by interacting with DAO layer. The communication would be like below with the new model.

Resource --> Controller --> Persistence Layer --> DAO layer

regunathb commented 2 years ago

I propose to implement this along the lines of JPA i.e. Entities, EntityManager, PersistenceProvider(s) and Criteria with a suitable Query language.