Automating Google Workspace (GWS) & more with Apps Script
Introducing #liveDB
1. Introducing liveDB Build faster systems faster Robert Friberg, robert@devrex.se Twitter: @robertfriberg, @livedomain, #livedb http://livedb.devrex.se/
2. Disk .NET Process Memory Command serialization Engine Clients Client Transaction Log Client Pass queries and commands Snapshot.0 Synchronized execution Snapshot.1 In-memory Object Model Prevalent System Architecture Snapshot.N
3. The prevalent hypothesis Your data will fit in available RAM 99% of all OLTP database are 1TB or less--Stonebraker, VoltDB
4. Eric Schmidt, Google CEO At Google we found it costs less money and it is more efficient to use DRAM as storage as opposed to hard disks. Three minutes with Google's Eric Schmidt , CNN.COM
5. What is liveDB? A native .NET in-memory database engine Full ACID support Embedded engine free to use for any purpose Supports any data representation
6. The NoSQL revolution RDBMS paradigm is shaking Alternative data representation, document, graph, key/value, etc Support large scale databases LiveDB focuses on Memory vs. Disk Freedom of representation Facebook is not the common case
7. Relational Database Prison Relational model formulated 1969 Designed to address limitations non-existent today – disk access A relational model is just one of many possible datarepresentations Primitive stored procedure language O/R Mapping adds to the pain
8. O/R mapping vs Command/Query pattern O/R mapping is based on CRUD pattern CRUD is a specialization of Request/response Command/Query is more general (superset) You can do CRUD with Command/Query but not the other way around
9. Business arguments Reduced time to market Lower TCO for software systems Reduced development time up to 40% Operations (no rdbms) Licensing (no rdbms) Faster systems
10. Developer benefits Model is pure .NET types and collections representational freedom DAL and downwards is eliminated No object/relational mapping No relational modeling No T-SQL programming Debugging Version control Supports DDD, TDD
12. Start your engines! var db = Engine.Load<MyModel>(path); db.Execute(command); var c = db.Execute(m => m.Customers.GetById(42)); ... var cmd = SetPasswordCommand(c.Id, newPassword); db.Execute(cmd); db.Close();
14. Drawbacks Model must fit in RAM Load time (start up and rollback) Versioning issues .NET Only (Json possible) No magical indexing (yet)
15. Gotchas No external dependencies from commands Don’t modify the model with query Rollback is expensive Don’t manipulate model out of context Dont rely on reference equality Results are not direct references
16. References Prevalent System Architecture prevayler.org, java project from 2003, alive and kicking Bamboo.Prevalence .NET 1.1, dead project? VoltDB