You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current backend architecture relies heavily on the service layer to interact with the internals of the entities saved in the repositories. Much of the operations could be done more efficiently at the backend level, profiting from performance enhancements and modularity.
Other than that, concurrency and scalability could be easier achieved with comparably less impact on performance.
Roadmap
The scope of the changes is large. Therefore, the changes will be implemented in several phases:
Phase 1: Structural changes ✅
Refactor Crud*Repository (service layer) to receive the *Backend as a Spring component
Replace InMemory implementation with a spring-data provided (JPA + H2 e.g.)
Replace the *Service dependency in the Service Level with the *Backend using repository fragments (*ServiceBackend) [1, 2]
Implement the *ServiceBackend for InMemory and MongoDB [2]
Linked to #570 (Phase 1 PR)
Motivation
The current backend architecture relies heavily on the service layer to interact with the internals of the entities saved in the repositories. Much of the operations could be done more efficiently at the backend level, profiting from performance enhancements and modularity.
Other than that, concurrency and scalability could be easier achieved with comparably less impact on performance.
Roadmap
The scope of the changes is large. Therefore, the changes will be implemented in several phases:
Phase 1: Structural changes ✅
Crud*Repository
(service layer) to receive the*Backend
as a Spring component*Service
dependency in the Service Level with the*Backend
using repository fragments (*ServiceBackend
) [1, 2]*ServiceBackend
for InMemory and MongoDB [2]Tests must be adapted according to the changes.
Phase 2: Filtering
Supersedes #516
*Backend
getAll*
using the QueryDslPhase 3: Pagination
Look at [4] for example using
PagingAndSortingRepository
References
[1] https://docs.spring.io/spring-data/mongodb/docs/3.3.5/reference/html/#repositories.custom-implementations
[2] https://github.com/spring-projects/spring-data-examples/tree/main/mongodb/aggregation/src/main/java/example/springdata/mongodb/aggregation
[3] https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/querydsl/QuerydslPredicateExecutor.html
[4] https://docs.spring.io/spring-data/mongodb/docs/3.3.5/reference/html/#repositories.definition
[5] https://docs.spring.io/spring-data/mongodb/docs/current/api/org/springframework/data/mongodb/repository/support/SimpleMongoRepository.html
The text was updated successfully, but these errors were encountered: