cph-cachet / carp.core-kotlin

Infrastructure-agnostic framework for distributed data collection.
https://carp.cachet.dk/core/
MIT License
20 stars 2 forks source link

Migrate parts of `carp.protocols` to `carp.common`. #224

Closed Whathecode closed 3 years ago

Whathecode commented 3 years ago

The carp.protocols subsystem right now seems to be two things:

For historical reasons, the domain objects in carp.protocols were defined there because this was the first subsystem created, and it is the core domain of the platform. But, in practice it turned out many of these types are used as DTOs across integration boundaries of the other subsystems.

We should reflect this and move these types to carp.common and indicate they are types used to pass across application services (e.g., place it in the application namespace). The domain namespace should be reserved for internals to subsystems.

domain.* imports in application service interfaces shouldn't be allowed. We could write a static checker to enforce that.

Whathecode commented 3 years ago

Started work on this on this branch: https://github.com/cph-cachet/carp.core-kotlin/pull/243