bwaidelich / dcb-eventstore Goto Github PK
View Code? Open in Web Editor NEWImplementation of the Dynamic Consistency Boundary pattern described by Sara Pellegrini
License: MIT License
Implementation of the Dynamic Consistency Boundary pattern described by Sara Pellegrini
License: MIT License
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$ref": "#/$defs/AppendCondition",
"$defs": {
"AppendCondition": {
"type": "object",
"additionalProperties": false,
"properties": {
"query": {
"$ref": "#/$defs/StreamQuery"
},
"expected_highest_sequence_number": {
"oneOf": [
{
"const": "NONE"
},
{
"const": "ANY"
},
{
"$ref": "#/$defs/SequenceNumber"
}
]
}
},
"required": [
"query",
"expected_highest_sequence_number"
]
},
"StreamQuery": {
"type": "object",
"additionalProperties": false,
"properties": {
"version": {
"type": "string",
"pattern": "^\\d+\\.\\d+$"
},
"criterias": {
"type": "array",
"items": {
"$ref": "#/$defs/StreamQueryCriteria"
}
}
},
"required": [
"version",
"criterias"
]
},
"StreamQueryCriteria": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"EventTypesAndTags",
"EventTypes",
"Tags"
]
},
"properties": {
"type": "object",
"additionalProperties": false,
"properties": {
"tags": {
"type": "array",
"items": {
"$ref": "#/$defs/Tag"
}
},
"event_types": {
"type": "array",
"items": {
"$ref": "#/$defs/EventType"
}
}
},
"required": [
"tags",
"event_types"
]
}
},
"required": [
"type",
"criteria"
]
},
"EventEnvelope": {
"type": "object",
"additionalProperties": false,
"properties": {
"event": {
"$ref": "#/$defs/Event"
},
"sequence_number": {
"$ref": "#/$defs/SequenceNumber"
}
},
"required": [
"event",
"sequence_number"
]
},
"Event": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"$ref": "#/$defs/EventId"
},
"type": {
"$ref": "#/$defs/EventType"
},
"data": {
"$ref": "#/$defs/EventData"
},
"tags": {
"type": "array",
"items": {
"$ref": "#/$defs/Tag"
}
}
},
"required": [
"id",
"type",
"data",
"tags"
]
},
"EventId": {
"type": "string",
"pattern": "^[\\w\\-]+$",
"minLength": 1,
"maxLength": 100
},
"EventType": {
"type": "string",
"pattern": "^[\\w\\.\\:\\-]+$",
"minLength": 1,
"maxLength": 200
},
"EventData": {
"type": "string"
},
"Tag": {
"type": "object",
"additionalProperties": false,
"properties": {
"key": {
"type": "string",
"minLength": 1,
"maxLength": 50,
"pattern": "^[A-Za-z0-9\\-\\_]+$"
},
"value": {
"minLength": 1,
"maxLength": 50,
"type": "string",
"pattern": "^[A-Za-z0-9\\-\\_]+$"
}
},
"required": [
"key",
"value"
]
},
"SequenceNumber": {
"type": "integer",
"minimum": 1
}
}
}
This package provides tools to easily test the performance and consistency of event store implementations for distributed systems.
Maybe something along jepsen Tests or just a way to spawn multiple processes in parallel that interact with the same event store and test for consistency violations
DomainIds
are currently serialized as JSON object in the form:
{"key1": "some-value", "key": "some-value"}
Instead it should be stored as an array like:
[{"key1": "some-value"}, {...}]
Validation has to be adjusted accordingly.
To ensure usernames are unique, events could look like:
[{
"type": "UsernameClaimed",
"data": {"username": "some-username"}
"domainIds": [{"username": "some-username"}]
}, {
"type": "UsernameChanged",
"data": {"newUsername": "some-new-username"}
"domainIds": [{"username": "some-username"}, {"username": "some-new-username"}]
},
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.