Road to
Tim Cools ( @timcoolsnet )
@BuildStuff
A | 750 € |
---|
B | 1500 € |
---|
750 €
-500 €
1000 €
+500 €
A | 250 € |
---|
B | 1000 € |
---|
single transaction
commit
A | 750 € |
---|
B | 1500 € |
---|
750
-500
1000
+500
A | 250 € |
---|
B | 1000 € |
---|
750
-350
C | 2350 € |
---|
C | 2350 € |
---|
+350
2000
A | 400 € |
---|
concurrent transactions - serialization non-lock
commit
commit
FAILED
Transaction
Write Transaction Log
Commit
Update buffer
Transaction Log |
---|
INSERT |
UPDATE |
Table Data | |
---|---|
A | ... |
B | ... |
C | ... |
Log Files
Data Files
Sync
Async
Index Data |
---|
... |
... |
Data Pages |
---|
And many more...
Tim Cools ( @timcoolsnet )
C
A
P
C
A
RDBMS
Single-node
NoSql
C
A
RDBMS
Single-node
NoSql
C
P
MongoDB
BigTable
Redis
MemcachedDB
A
P
Cassandra
Riak
CouchDB
SimpleDB
Model
Tables
Mapping
public class Route
{
private readonly List<Stop> _stops = new List<Stop>();
public Guid Id { get; private set; }
public RouteStatus Status { get; private set; }
public DateTime? Date { get; private set; }
public IEnumerable Stops => _stops;
public void Plan(DateTime date)
{
if (date < DateTime.Today.AddDays(1))
{
throw new InvalidOperationException("Route can only plan from tomorrow.");
}
Status = RouteStatus.Planned;
Date = date;
}
...
{
"ID":"3f86959a-6970-485c-9a1a-ba168cb77212",
"Date":"2016-05-26T00:00:00",
"Stops": [
{
"Name":"Home",
"Position":{ "Latitude":4.481736, "Longitude":51.197894 }
},
{
"Name":"Build Stuff",
"Position":{ "Latitude":4.400963, "Longitude":50.828417 }
},
{
"Name":"Home",
"Position":{ "Latitude":4.481736, "Longitude":51.197894 }
}
],
"Status":"Planned"
}
Tim Cools ( @timcoolsnet )
Tim Cools ( @timcoolsnet )
Tim Cools ( @timcoolsnet )
Tim Cools ( @timcoolsnet )
Event Driven Architecture
synchronous
synchronous
synchronous
asynchronous
(a)synchronyous
Tim Cools ( @timcoolsnet )
Document
Database
Event Store
Tim Cools ( @timcoolsnet )
Tim Cools ( @timcoolsnet )
Tim Cools ( @timcoolsnet )