millions of transactions per second on a single machine
play

MILLIONS OF TRANSACTIONS PER SECOND ON A SINGLE MACHINE CASE FOR A - PowerPoint PPT Presentation

MILLIONS OF TRANSACTIONS PER SECOND ON A SINGLE MACHINE CASE FOR A VIRTUALIZED DATABASE AND SCALE-IN ROGER JOHANSSON Who am I? Roger Johansson Actor Model, Scalability, Distributed Systems, C#, Senior Solution Architect Starcounter Go,


  1. MILLIONS OF TRANSACTIONS PER SECOND ON A SINGLE MACHINE CASE FOR A VIRTUALIZED DATABASE AND SCALE-IN ROGER JOHANSSON

  2. Who am I? Roger Johansson Actor Model, Scalability, Distributed Systems, C#, Senior Solution Architect – Starcounter Go, Kotlin http://StarCounter.io Proto.Actor Founder – Ultra Fast Distributed Actors (Go, .NET, JVM) http://Proto.Actor https://github.com/AsynkronIT Twitter: @rogeralsing Github: rogeralsing Mail: roger@starcounter.com http://Github.com/rogeralsing/presentations

  3. Agenda Setting the stage - Why we need in memory computing: • Application Platform • Micro-Apps The Starcounter information operating system: • Our approach to in memory computing • The future of hardware • The Mars project

  4. Front-end Framework React, Polymer Communication Palindrom - REST, Web Sockets Application View Models, Entities, App Logic In Memory App Platform Mapping, Persistence, Queries Starcounter

  5. Front-end Framework Front-end Framework Client Side Code Network Network Services + Contracts View Models Application Code Application O/R Mapper Network Database In Memory App Platform Traditional Stack Starcounter

  6. UI A UI B UI C App A App B App C Model A Model B Model C Starcounter

  7. Client Side Blending UI B UI A UI C UI A UI B UI C App A App B App C Model A Model B Model C Starcounter

  8. Profile ObjectId 789 FirstName Stefan LastName Edqvist User ObjectId 123 FirstName Stefan LastName Edqvist

  9. Client Side Blending UI B UI A UI C UI A UI B UI C App A App B App C Model A Model B Model C Mapper ACID, Snapshot Isolation Starcounter

  10. UI A UI B UI C App A App B App C Model A Model B Model C Mapper Starcounter

  11. Demo Dataflow

  12. Application Process Object Offline copy of ObjectId 123 database data FirstName Alan LastName Turing Age 41 Map to and from Object Mapper Object / Storage Network / IPC Transfer Data over model network Disk ObjectId FirstName LastName Age Data is stored on 123 Alan Turing 41 disk, optimized for spinning disks and 124 Ada Lovelace 36 moving arms 125 Grace Hopper 86 Database Process

  13. Application Process Object Offline copy of ObjectId 123 database data FirstName Alan LastName Turing Age 41 Map to and from Object Mapper Object / Relational Network / IPC Transfer Data over model network Memory ObjectId FirstName LastName Age Data is mainly 123 Alan Turing 41 kept in memory, enabling faster 124 Ada Lovelace 36 reads and writes 125 Grace Hopper 86 Database Process

  14. Application Process Object Stateless Entity maps directly to ObjectId 123 shared memory Shared Memory ObjectId FirstName LastName Age Data is kept in 123 Alan Turing 41 memory and shared across 124 Ada Lovelace 36 processes 125 Grace Hopper 86 Database Process

  15. C# Node.JS Object Object Multiple processes can read the same ObjectId 123 ObjectId 123 data Shared Memory ObjectId FirstName LastName Age 123 Alan Turing 41 124 Ada Lovelace 36 125 Grace Hopper 86 Database Process

  16. C# Source Code public class Person { public string FirstName { get; set; }

  17. C# Compiler Output public class Person { private string _firstName; public string FirstName { get => _firstName; set value => _firstName = value; }

  18. Starcounter Weaver Output public class Person { private string _firstName; private ulong _id; public string FirstName { get => DbState.GetString(_id, FirstNameId); set value => DbState.SetString(_id, FirstNameId, value) }

  19. O/R mapper – Object Graphs Customer Order OrderDetail Product Lazy Load Ripple load, Hundreds/Thousands Execute SQL Query per traversed relation of queries per view Eager Load Hard to maintain, Carefully defining load boundaries inefficient joined queries

  20. Starcounter – Object Graphs Customer Order OrderDetail Product Chasing Pointers Traversing relations are simple pointer traversals

  21. Demo - Write 1 mil transactions

  22. Demo - Write 1 mil transactions In this demo we provided: • ACID Transactions • Snapshot Isolation • Guaranteed disk persistency Can we go even faster? • We are capped by disk IO • The Mars project

  23. Price of 1MB in USD over time 1000,00000 100,00000 10,00000 1,00000 USD 0,10000 0,01000 0,00100 0,00010 0,00001 Year 1980 1985 1990 1995 2000 2005 2010 2015 2020

  24. Registers Registers Cache Cache Main Memory Main Memory Solid State Disk Non Volatile Memory Magnetic Disk Solid State Disk Magnetic Disk Current Future

  25. Starcounter on the CPUs of 2018 Volatile DRAM Write Delta Store (incremental updates) Read Merge CPU Main Store (batch update) Non Volatile DRAM

  26. Few Big Servers, not many small Server Server

  27. Few Big Servers, not many small Server Server

Recommend


More recommend