Avero Domains
Sales
Users
FCM
Labor
Logbook
Calendar
- Isolated, dumb persistence stores
- Service defines a canonical data contract
- Business logic lives in code
Data Contracts are King!
message LogbookEntry {
uint32 businessId = 1;
string businessDay = 2;
repeated Page pages = 3;
}
message Page {
string name = 1;
repeated Field fields = 2;
DatashotConfig datashotConfig = 3;
}
message Field {
enum FieldType {
Toggle = 0;
ShortText = 1;
LongText = 2;
}
string name = 1;
FieldType type = 2;
oneof value {
string valueString = 3;
bool valueBool = 4;
}
}
message DatashotConfig {
enum ComparisonMode {
SDLW = 0;
SDLY = 1;
}
ComparisonMode comparisonMode = 1;
repeated uint32 revenueCenterIds = 2;
repeated uint32 mealPeriodIds = 3;
}
service LogbookApi {
rpc getEntry (GetEntryRequest) returns (LogbookEntry) {};
rpc getEntries (GetEntriesRequest) returns (GetEntriesResponse) {};
rpc createEntry (LogbookEntry) returns (LogbookEntry) {};
rpc updateEntry (LogbookEntry) returns (LogbookEntry) {};
}
message GetEntryRequest {
uint32 businessId = 1;
string businessDay = 2;
}
message GetEntriesRequest {
uint32 businessId = 1;
}
message GetEntriesResponse {
repeated LogbookEntry entries = 1;
}
Why?
- Path to incremental migration
- Align structure of software & organization
- Emphasize seams
What makes a good domain?
- Logical grouping of functionality
- Requires transactional operations
- Scales as a unit
- Can be owned by a single team
Logbook
Consumers
Web UI Mobile UI
deck
By autoric
deck
- 475