SlideShare a Scribd company logo
1 of 46
DISRUPTOR
Larry Nung
AGENDA
Introduction
Relative Technologies
Disruptor
LMAX Architecture
Reference
Q & A
2
INTRODUCTION
INTRODUCTION
 High Performance Inter-Thread Messaging Library
 LMAX build the system on the JVM platform and
centers on a Business Logic Processor that can
handle 6 million orders per second on a single
thread with very low latency: 100K TPS with 1 ms
latency.
 Multicast events to consumers, with consumer
dependency graph.
 Pre-allocate memory for events.
 Optionally lock-free.
RELATIVE TECHNOLOGIES
CAS
 Compare-and-swap
 An atomic instruction used in multithreading to
achieve synchronization
56
Core1 Core2
56=>57 55=>58
CAS
MEMORY BARRIERS
 A type of barrier instruction that causes a central
processing unit (CPU) or compiler to enforce an
ordering constraint on memory operations issued
before and after the barrier instruction.
CACHE LINE
 Unit of transfer between memory and CPU
 Cache-Lines size is (typically) 64 bytes.
FALSE SHARING
 When a system participant attempts to periodically
access data that will never be altered by another
party, but that data shares a cache block with data
that is altered, the caching protocol may force the
first participant to reload the whole unit despite a
lack of logical necessity.
FALSE SHARING
struct foo { int x; int y; };
static struct foo f;
/* The two following functions are running concurrently: */
int sum_a() {
int s = 0;
int i;
for (i = 0; i < 1000000; ++i)
s += f.x;
return s;
}
void inc_b() {
int i;
for (i = 0; i < 1000000; ++i)
++f.y;
}
CACHE LINE PADDING
DISRUPTOR
DISRUPTOR ARCHITECTURE
 Ring buffer size = 2 ^ n
 Index = sequence & (bufferSize - 1)
 no comparisons
 no branches
 safe
Producer
Consumer
CONSUMER DEPENDENCY GRAPH
 Unicast: 1P - 1C
 Three Step Pipeline: 1P – 3C
P1 C1
P1 C1 C2 C3
P1
C1
P1
C1
C2
C3
CONSUMER DEPENDENCY GRAPH
 Sequencer: 3P – 1C
 Multicast: 1P – 3C
P1
P2
P3
C1
P1
C1
C2
C3
P1
C1
P2
P3
P1
C1
C2
C3
CONSUMER DEPENDENCY GRAPH
 Diamond: 1P – 3C
P1
C1
C2
C3
P1
C1
C2
C3
CONSUMER DEPENDENCY GRAPH
WAIT STRATEGY
 BlockingWaitStrategy
 BusySpinWaitStrategy
 SleepingWaitStrategy
 TimeoutBlockingWaitStrategy
 PhasedBackoffWaitStrategy
 YieldingWaitStrategy
SETUP DISRUPTOR
CUSTOM EVENTHANDLER
...
public class Data {
public string Value { get; set; }
}
public class DataEventHandler : IEventHandler<Data>
{
public string Name { get; private set; }
public DataEventHandler(string name) {
this.Name = name;
}
public void OnEvent(Data data, long sequence, bool endOfBatch) {
Console.WriteLine("Thread = {0}, Handler = {1}, Sequence = {2}, Value
= {3}", Thread.CurrentThread.ManagedThreadId.ToString(), this.Name,
sequence, data.Value);
}
}
...
DSL
Generate disruptor
instance with factory
method and ring buffer
size
Setup consumer
dependency graph with
Disruptor.HandleEvents
With
Start disruptor with
Disruptor.Start
Get ring buffer
Get next ring buffer
sequence
Set data
Publish data
DSL
...
var disruptor = new Disruptor.Dsl.Disruptor<Data>(() => new Data(), (int)Math.Pow(2,4),
TaskScheduler.Default);
disruptor.HandleEventsWith(new DataEventHandler("Handler1"));
var ringBuffer = disruptor.Start();
var sequenceNo = ringBuffer.Next();
var data = ringBuffer[sequenceNo];
data.Value = "Hello";
ringBuffer.Publish(sequenceNo);
sequenceNo = ringBuffer.Next();
data = ringBuffer[sequenceNo];
data.Value = "World";
ringBuffer.Publish(sequenceNo);
disruptor.Shutdown();
...
NON-DSL
Generate ring buffer with
factory method and ring
buffer size
Setup consumer
dependency graph with
EventProcessor And
Barrier
Start EventProcessor in
another thread
Get next ring buffer
sequence
Set dataPublish data
NON-DSL
...
var ringBuffer = RingBuffer<Data>.CreateSingleProducer(() => new Data(), (int)Math.Pow(2, 4));
var barrier = ringBuffer.NewBarrier();
var eventProcessor = new BatchEventProcessor<Data>(ringBuffer, barrier, new DataEventHandler("Handler1"));
Task.Factory.StartNew(() => eventProcessor.Run());
var sequenceNo = ringBuffer.Next();
var data = ringBuffer[sequenceNo];
data.Value = "Hello";
ringBuffer.Publish(sequenceNo);
sequenceNo = ringBuffer.Next();
data = ringBuffer[sequenceNo];
data.Value = "World";
ringBuffer.Publish(sequenceNo);
eventProcessor.Halt();
Application.DoEvents();
...
UNICAST: 1P - 1C
...
using Disruptor;
namespace ConsoleApplication29 {
…
class Program {
static void Main( string[] args) {
var disruptor = new Disruptor.Dsl. Disruptor<Data>(() => new Data(), (int)Math .Pow(2,4),
TaskScheduler.Default);
disruptor.HandleEventsWith(new DataEventHandler("Handler1”));
var ringBuffer = disruptor.Start();
var idx = 0;
while ( true) {
var sequenceNo = ringBuffer.Next();
var data = ringBuffer[sequenceNo];
data.Value = idx++.ToString();
ringBuffer.Publish(sequenceNo);
Thread.Sleep(250);
}
disruptor.Shutdown();
}
}
} P1 C1
UNICAST: 1P - 1C
...
var ringBuffer = RingBuffer<Data>.CreateSingleProducer(()
=> new Data(), (int)Math.Pow(2, 4));
var barrier = ringBuffer.NewBarrier();
var eventProcessor = new
BatchEventProcessor<Data>(ringBuffer, barrier, new
DataEventHandler("Handler1"));
Task.Factory.StartNew(() => eventProcessor.Run());
...
eventProcessor.Halt();
...
P1
Barrier
C1
UNICAST: 1P - 1C
THREE STEP PIPELINE: 1P – 3C
...
var disruptor = new Disruptor.Dsl.Disruptor<Data>(() =>
new Data(), (int)Math.Pow(2,4), TaskScheduler.Default);
disruptor.HandleEventsWith(new
DataEventHandler("Handler1"))
.Then(new DataEventHandler("Handler2"))
.Then(new DataEventHandler("Handler3"));
var ringBuffer = disruptor.Start();
...
disruptor.Shutdown();
…
P1 C1 C2 C3
THREE STEP PIPELINE: 1P – 3C
...
var ringBuffer = RingBuffer<Data>.CreateSingleProducer(() => new Data(),
(int)Math.Pow(2, 4));
var eventProcessor1 = new BatchEventProcessor<Data>(ringBuffer,
ringBuffer.NewBarrier(), new DataEventHandler("Handler1"));
var eventProcessor2 = new BatchEventProcessor<Data>(ringBuffer,
ringBuffer.NewBarrier(eventProcessor1.Sequence), new
DataEventHandler("Handler2"));
var eventProcessor3 = new BatchEventProcessor<Data>(ringBuffer,
ringBuffer.NewBarrier(eventProcessor2.Sequence), new
DataEventHandler("Handler3"));
Task.Factory.StartNew(() => eventProcessor1.Run());
Task.Factory.StartNew(() => eventProcessor2.Run());
Task.Factory.StartNew(() => eventProcessor3.Run());
...
eventProcessor1.Halt();
eventProcessor2.Halt();
eventProcessor3.Halt();
...
P1 C1 C2 C3
Barrier
Barrier
Barrier
THREE STEP PIPELINE: 1P – 3C
MULTICAST: 1P – 3C
...
var disruptor = new Disruptor.Dsl.Disruptor<Data>(() =>
new Data(), (int)Math.Pow(2,4), TaskScheduler.Default);
disruptor.HandleEventsWith(new
DataEventHandler("Handler1"), new
DataEventHandler("Handler2"), new
DataEventHandler("Handler3"));
var ringBuffer = disruptor.Start();
...
disruptor.Shutdown();
… P1
C1
C2
C3
MULTICAST: 1P – 3C
...
var ringBuffer = RingBuffer<Data>.CreateSingleProducer(() => new Data(), (int)Math.Pow(2, 4));
var barrier = ringBuffer.NewBarrier();
var eventProcessor1 = new BatchEventProcessor<Data>(ringBuffer, barrier, new
DataEventHandler("Handler1"));
var eventProcessor2 = new BatchEventProcessor<Data>(ringBuffer, barrier, new
DataEventHandler("Handler2"));
var eventProcessor3 = new BatchEventProcessor<Data>(ringBuffer, barrier, new
DataEventHandler("Handler3"));
Task.Factory.StartNew(() => eventProcessor1.Run());
Task.Factory.StartNew(() => eventProcessor2.Run());
Task.Factory.StartNew(() => eventProcessor3.Run());
...
eventProcessor1.Halt();
eventProcessor2.Halt();
eventProcessor3.Halt();
... P1
C1
C2
C3
Barrier
MULTICAST: 1P – 3C
DIAMOND: 1P – 3C
...
var disruptor = new Disruptor.Dsl.Disruptor<Data>(() =>
new Data(), (int)Math.Pow(2,4), TaskScheduler.Default);
disruptor.HandleEventsWith(new
DataEventHandler("Handler1"), new
DataEventHandler("Handler2")).Then(new
DataEventHandler("Handler3"));
var ringBuffer = disruptor.Start();
...
disruptor.Shutdown();
…
P1
C1
C2
C3
DIAMOND: 1P – 3C
...
var ringBuffer = RingBuffer<Data>.CreateSingleProducer(() => new Data(),
(int)Math.Pow(2, 4));
var barrier = ringBuffer.NewBarrier();
var eventProcessor1 = new BatchEventProcessor<Data>(ringBuffer, barrier, new
DataEventHandler("Handler1"));
var eventProcessor2 = new BatchEventProcessor<Data>(ringBuffer, barrier, new
DataEventHandler("Handler2"));
var eventProcessor3 = new BatchEventProcessor<Data>(ringBuffer,
ringBuffer.NewBarrier(eventProcessor1.Sequence, eventProcessor2.Sequence),
new DataEventHandler("Handler3"));
Task.Factory.StartNew(() => eventProcessor1.Run());
Task.Factory.StartNew(() => eventProcessor2.Run());
Task.Factory.StartNew(() => eventProcessor3.Run());
...
eventProcessor1.Halt();
eventProcessor2.Halt();
eventProcessor3.Halt();
...
P1
C1
C2
C3
Barrier
Barrier
DIAMOND: 1P – 3C
LMAX ARCHITECTURE
LMAX ARCHITECTURE
LMAX ARCHITECTURE
LMAX ARCHITECTURE
 Journaler
 Store all the events in a durable form
 Replicator
 Use IP multicasting to sync with slave node
REFERENCE
42
REFERENCE
 The LMAX Architecture
 http://martinfowler.com/articles/lmax.html
 Compare-and-swap - Wikipedia, the free
encyclopedia
 https://en.wikipedia.org/wiki/Compare-and-swap
 Memory barrier - Wikipedia, the free encyclopedia
 https://en.wikipedia.org/wiki/Memory_barrier
43
REFERENCE
 Circular buffer - Wikipedia, the free encyclopedia
 https://en.wikipedia.org/wiki/Circular_buffer
 并发框架Disruptor译文 | 并发编程网 - ifeve.com
 http://ifeve.com/disruptor/
 [C#][VB.NET].NET 4.0 Barrier Class | Level Up - 點
部落
 https://dotblogs.com.tw/larrynung/archive/2009/08/22/10
182.aspx?fid=9457
44
Q&A
45
QUESTION & ANSWER
46

More Related Content

What's hot

Open HFT libraries in @Java
Open HFT libraries in @JavaOpen HFT libraries in @Java
Open HFT libraries in @JavaPeter Lawrey
 
Software architecture for high traffic website
Software architecture for high traffic websiteSoftware architecture for high traffic website
Software architecture for high traffic websiteTung Nguyen Thanh
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsJonas Bonér
 
Bitcoin, Ethereum, Smart Contract & Blockchain
Bitcoin, Ethereum, Smart Contract & BlockchainBitcoin, Ethereum, Smart Contract & Blockchain
Bitcoin, Ethereum, Smart Contract & BlockchainJitendra Chittoda
 
Fundamental Analysis for Crypto Assets
Fundamental Analysis for Crypto AssetsFundamental Analysis for Crypto Assets
Fundamental Analysis for Crypto AssetsJesus Rodriguez
 
Tiki.vn - How we scale as a tech startup
Tiki.vn - How we scale as a tech startupTiki.vn - How we scale as a tech startup
Tiki.vn - How we scale as a tech startupTung Ns
 
LMAX Disruptor - High Performance Inter-Thread Messaging Library
LMAX Disruptor - High Performance Inter-Thread Messaging LibraryLMAX Disruptor - High Performance Inter-Thread Messaging Library
LMAX Disruptor - High Performance Inter-Thread Messaging LibrarySebastian Andrasoni
 
Avoiding the domino effect in our [micro]services (SOLID at macro-design level)
Avoiding the domino effect in our [micro]services (SOLID at macro-design level)Avoiding the domino effect in our [micro]services (SOLID at macro-design level)
Avoiding the domino effect in our [micro]services (SOLID at macro-design level)CodelyTV
 
The Lightning Network - A gentle introduction
The Lightning Network - A gentle introductionThe Lightning Network - A gentle introduction
The Lightning Network - A gentle introductionRoland Stadler
 
Real estate tokenization and blockchain
Real estate tokenization and blockchainReal estate tokenization and blockchain
Real estate tokenization and blockchainJorge Sebastiao
 
Dual write strategies for microservices
Dual write strategies for microservicesDual write strategies for microservices
Dual write strategies for microservicesBilgin Ibryam
 
Introduction to redis - version 2
Introduction to redis - version 2Introduction to redis - version 2
Introduction to redis - version 2Dvir Volk
 
Grokking Techtalk #39: How to build an event driven architecture with Kafka ...
 Grokking Techtalk #39: How to build an event driven architecture with Kafka ... Grokking Techtalk #39: How to build an event driven architecture with Kafka ...
Grokking Techtalk #39: How to build an event driven architecture with Kafka ...Grokking VN
 
Write smart contract with solidity on Ethereum
Write smart contract with solidity on EthereumWrite smart contract with solidity on Ethereum
Write smart contract with solidity on EthereumMurughan Palaniachari
 

What's hot (20)

Open HFT libraries in @Java
Open HFT libraries in @JavaOpen HFT libraries in @Java
Open HFT libraries in @Java
 
Smart contracts
Smart contractsSmart contracts
Smart contracts
 
Software architecture for high traffic website
Software architecture for high traffic websiteSoftware architecture for high traffic website
Software architecture for high traffic website
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability Patterns
 
Ethereum-Cryptocurrency (All about Ethereum)
Ethereum-Cryptocurrency (All about Ethereum) Ethereum-Cryptocurrency (All about Ethereum)
Ethereum-Cryptocurrency (All about Ethereum)
 
Bitcoin, Ethereum, Smart Contract & Blockchain
Bitcoin, Ethereum, Smart Contract & BlockchainBitcoin, Ethereum, Smart Contract & Blockchain
Bitcoin, Ethereum, Smart Contract & Blockchain
 
Fundamental Analysis for Crypto Assets
Fundamental Analysis for Crypto AssetsFundamental Analysis for Crypto Assets
Fundamental Analysis for Crypto Assets
 
Tiki.vn - How we scale as a tech startup
Tiki.vn - How we scale as a tech startupTiki.vn - How we scale as a tech startup
Tiki.vn - How we scale as a tech startup
 
LMAX Disruptor - High Performance Inter-Thread Messaging Library
LMAX Disruptor - High Performance Inter-Thread Messaging LibraryLMAX Disruptor - High Performance Inter-Thread Messaging Library
LMAX Disruptor - High Performance Inter-Thread Messaging Library
 
Avoiding the domino effect in our [micro]services (SOLID at macro-design level)
Avoiding the domino effect in our [micro]services (SOLID at macro-design level)Avoiding the domino effect in our [micro]services (SOLID at macro-design level)
Avoiding the domino effect in our [micro]services (SOLID at macro-design level)
 
The Lightning Network - A gentle introduction
The Lightning Network - A gentle introductionThe Lightning Network - A gentle introduction
The Lightning Network - A gentle introduction
 
Real estate tokenization and blockchain
Real estate tokenization and blockchainReal estate tokenization and blockchain
Real estate tokenization and blockchain
 
Dual write strategies for microservices
Dual write strategies for microservicesDual write strategies for microservices
Dual write strategies for microservices
 
Introduction to redis - version 2
Introduction to redis - version 2Introduction to redis - version 2
Introduction to redis - version 2
 
Grokking Techtalk #39: How to build an event driven architecture with Kafka ...
 Grokking Techtalk #39: How to build an event driven architecture with Kafka ... Grokking Techtalk #39: How to build an event driven architecture with Kafka ...
Grokking Techtalk #39: How to build an event driven architecture with Kafka ...
 
Hyperledger
HyperledgerHyperledger
Hyperledger
 
blockchain governance : opportunities and challenges
 blockchain governance : opportunities and challenges blockchain governance : opportunities and challenges
blockchain governance : opportunities and challenges
 
Write smart contract with solidity on Ethereum
Write smart contract with solidity on EthereumWrite smart contract with solidity on Ethereum
Write smart contract with solidity on Ethereum
 
Hyperledger Fabric
Hyperledger FabricHyperledger Fabric
Hyperledger Fabric
 
Lightning Network
Lightning  NetworkLightning  Network
Lightning Network
 

Viewers also liked

protobuf-net - Protocol Buffers library for idiomatic .NET
protobuf-net - Protocol Buffers library for idiomatic .NETprotobuf-net - Protocol Buffers library for idiomatic .NET
protobuf-net - Protocol Buffers library for idiomatic .NETLarry Nung
 
Why Are Digital Disruptors Successful And How Can You Become One?
Why Are Digital Disruptors Successful And How Can You Become One? Why Are Digital Disruptors Successful And How Can You Become One?
Why Are Digital Disruptors Successful And How Can You Become One? VMware Tanzu
 
PLSQL Coding Guidelines - Part 6
PLSQL Coding Guidelines - Part 6PLSQL Coding Guidelines - Part 6
PLSQL Coding Guidelines - Part 6Larry Nung
 
[若渴計畫] Studying Concurrency
[若渴計畫] Studying Concurrency[若渴計畫] Studying Concurrency
[若渴計畫] Studying ConcurrencyAj MaChInE
 
IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016Trayan Iliev
 
Successful Disruption: how to be the disruptor not disrupted
Successful Disruption: how to be the disruptor not disruptedSuccessful Disruption: how to be the disruptor not disrupted
Successful Disruption: how to be the disruptor not disruptedAndy Ng
 
SonarQube - The leading platform for Continuous Code Quality
SonarQube - The leading platform for Continuous Code QualitySonarQube - The leading platform for Continuous Code Quality
SonarQube - The leading platform for Continuous Code QualityLarry Nung
 
Corporate Disruptors: How Business is Turning Global Challenges into Opportun...
Corporate Disruptors: How Business is Turning Global Challenges into Opportun...Corporate Disruptors: How Business is Turning Global Challenges into Opportun...
Corporate Disruptors: How Business is Turning Global Challenges into Opportun...accenture
 
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...JAX London
 
FinTech: Business Opportunity or Disruptor? - tryb @ FIDE Forum KL 4 Aug 2016
FinTech: Business Opportunity or Disruptor? - tryb @ FIDE Forum KL 4 Aug 2016FinTech: Business Opportunity or Disruptor? - tryb @ FIDE Forum KL 4 Aug 2016
FinTech: Business Opportunity or Disruptor? - tryb @ FIDE Forum KL 4 Aug 2016tryb
 

Viewers also liked (10)

protobuf-net - Protocol Buffers library for idiomatic .NET
protobuf-net - Protocol Buffers library for idiomatic .NETprotobuf-net - Protocol Buffers library for idiomatic .NET
protobuf-net - Protocol Buffers library for idiomatic .NET
 
Why Are Digital Disruptors Successful And How Can You Become One?
Why Are Digital Disruptors Successful And How Can You Become One? Why Are Digital Disruptors Successful And How Can You Become One?
Why Are Digital Disruptors Successful And How Can You Become One?
 
PLSQL Coding Guidelines - Part 6
PLSQL Coding Guidelines - Part 6PLSQL Coding Guidelines - Part 6
PLSQL Coding Guidelines - Part 6
 
[若渴計畫] Studying Concurrency
[若渴計畫] Studying Concurrency[若渴計畫] Studying Concurrency
[若渴計畫] Studying Concurrency
 
IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016
 
Successful Disruption: how to be the disruptor not disrupted
Successful Disruption: how to be the disruptor not disruptedSuccessful Disruption: how to be the disruptor not disrupted
Successful Disruption: how to be the disruptor not disrupted
 
SonarQube - The leading platform for Continuous Code Quality
SonarQube - The leading platform for Continuous Code QualitySonarQube - The leading platform for Continuous Code Quality
SonarQube - The leading platform for Continuous Code Quality
 
Corporate Disruptors: How Business is Turning Global Challenges into Opportun...
Corporate Disruptors: How Business is Turning Global Challenges into Opportun...Corporate Disruptors: How Business is Turning Global Challenges into Opportun...
Corporate Disruptors: How Business is Turning Global Challenges into Opportun...
 
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
 
FinTech: Business Opportunity or Disruptor? - tryb @ FIDE Forum KL 4 Aug 2016
FinTech: Business Opportunity or Disruptor? - tryb @ FIDE Forum KL 4 Aug 2016FinTech: Business Opportunity or Disruptor? - tryb @ FIDE Forum KL 4 Aug 2016
FinTech: Business Opportunity or Disruptor? - tryb @ FIDE Forum KL 4 Aug 2016
 

Similar to Disruptor

Robert Pankowecki - Czy sprzedawcy SQLowych baz nas oszukali?
Robert Pankowecki - Czy sprzedawcy SQLowych baz nas oszukali?Robert Pankowecki - Czy sprzedawcy SQLowych baz nas oszukali?
Robert Pankowecki - Czy sprzedawcy SQLowych baz nas oszukali?SegFaultConf
 
Flink 0.10 @ Bay Area Meetup (October 2015)
Flink 0.10 @ Bay Area Meetup (October 2015)Flink 0.10 @ Bay Area Meetup (October 2015)
Flink 0.10 @ Bay Area Meetup (October 2015)Stephan Ewen
 
Capturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in GoCapturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in GoScyllaDB
 
Dataservices: Processing (Big) Data the Microservice Way
Dataservices: Processing (Big) Data the Microservice WayDataservices: Processing (Big) Data the Microservice Way
Dataservices: Processing (Big) Data the Microservice WayQAware GmbH
 
Where the wild things are - Benchmarking and Micro-Optimisations
Where the wild things are - Benchmarking and Micro-OptimisationsWhere the wild things are - Benchmarking and Micro-Optimisations
Where the wild things are - Benchmarking and Micro-OptimisationsMatt Warren
 
Come configurare Liferay 6.0 per Oracle
Come configurare Liferay 6.0 per OracleCome configurare Liferay 6.0 per Oracle
Come configurare Liferay 6.0 per OracleAntonio Musarra
 
Cassandra 2.1 boot camp, Overview
Cassandra 2.1 boot camp, OverviewCassandra 2.1 boot camp, Overview
Cassandra 2.1 boot camp, OverviewJoshua McKenzie
 
Apache Flink: API, runtime, and project roadmap
Apache Flink: API, runtime, and project roadmapApache Flink: API, runtime, and project roadmap
Apache Flink: API, runtime, and project roadmapKostas Tzoumas
 
Exploring Parallel Merging In GPU Based Systems Using CUDA C.
Exploring Parallel Merging In GPU Based Systems Using CUDA C.Exploring Parallel Merging In GPU Based Systems Using CUDA C.
Exploring Parallel Merging In GPU Based Systems Using CUDA C.Rakib Hossain
 
Performance and how to measure it - ProgSCon London 2016
Performance and how to measure it - ProgSCon London 2016Performance and how to measure it - ProgSCon London 2016
Performance and how to measure it - ProgSCon London 2016Matt Warren
 
Contiki introduction II-from what to how
Contiki introduction II-from what to howContiki introduction II-from what to how
Contiki introduction II-from what to howDingxin Xu
 
LendingClub RealTime BigData Platform with Oracle GoldenGate
LendingClub RealTime BigData Platform with Oracle GoldenGateLendingClub RealTime BigData Platform with Oracle GoldenGate
LendingClub RealTime BigData Platform with Oracle GoldenGateRajit Saha
 
DSP_Assign_2 (Autosaved)
DSP_Assign_2 (Autosaved)DSP_Assign_2 (Autosaved)
DSP_Assign_2 (Autosaved)Joseph Chandler
 
10 Key MongoDB Performance Indicators
10 Key MongoDB Performance Indicators  10 Key MongoDB Performance Indicators
10 Key MongoDB Performance Indicators iammutex
 
Oracle Drivers configuration for High Availability
Oracle Drivers configuration for High AvailabilityOracle Drivers configuration for High Availability
Oracle Drivers configuration for High AvailabilityLudovico Caldara
 
Achitecture Aware Algorithms and Software for Peta and Exascale
Achitecture Aware Algorithms and Software for Peta and ExascaleAchitecture Aware Algorithms and Software for Peta and Exascale
Achitecture Aware Algorithms and Software for Peta and Exascaleinside-BigData.com
 
Samantha Wang [InfluxData] | Best Practices on How to Transform Your Data Usi...
Samantha Wang [InfluxData] | Best Practices on How to Transform Your Data Usi...Samantha Wang [InfluxData] | Best Practices on How to Transform Your Data Usi...
Samantha Wang [InfluxData] | Best Practices on How to Transform Your Data Usi...InfluxData
 
GDG Jakarta Meetup - Streaming Analytics With Apache Beam
GDG Jakarta Meetup - Streaming Analytics With Apache BeamGDG Jakarta Meetup - Streaming Analytics With Apache Beam
GDG Jakarta Meetup - Streaming Analytics With Apache BeamImre Nagi
 
Outsmarting the smart meter (Jfokus 2017)
Outsmarting the smart meter (Jfokus 2017)Outsmarting the smart meter (Jfokus 2017)
Outsmarting the smart meter (Jfokus 2017)Maarten Mulders
 

Similar to Disruptor (20)

Robert Pankowecki - Czy sprzedawcy SQLowych baz nas oszukali?
Robert Pankowecki - Czy sprzedawcy SQLowych baz nas oszukali?Robert Pankowecki - Czy sprzedawcy SQLowych baz nas oszukali?
Robert Pankowecki - Czy sprzedawcy SQLowych baz nas oszukali?
 
Flink 0.10 @ Bay Area Meetup (October 2015)
Flink 0.10 @ Bay Area Meetup (October 2015)Flink 0.10 @ Bay Area Meetup (October 2015)
Flink 0.10 @ Bay Area Meetup (October 2015)
 
Capturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in GoCapturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in Go
 
Dataservices: Processing (Big) Data the Microservice Way
Dataservices: Processing (Big) Data the Microservice WayDataservices: Processing (Big) Data the Microservice Way
Dataservices: Processing (Big) Data the Microservice Way
 
Where the wild things are - Benchmarking and Micro-Optimisations
Where the wild things are - Benchmarking and Micro-OptimisationsWhere the wild things are - Benchmarking and Micro-Optimisations
Where the wild things are - Benchmarking and Micro-Optimisations
 
Come configurare Liferay 6.0 per Oracle
Come configurare Liferay 6.0 per OracleCome configurare Liferay 6.0 per Oracle
Come configurare Liferay 6.0 per Oracle
 
Cassandra 2.1 boot camp, Overview
Cassandra 2.1 boot camp, OverviewCassandra 2.1 boot camp, Overview
Cassandra 2.1 boot camp, Overview
 
Apache Flink: API, runtime, and project roadmap
Apache Flink: API, runtime, and project roadmapApache Flink: API, runtime, and project roadmap
Apache Flink: API, runtime, and project roadmap
 
Discretized streams
Discretized streamsDiscretized streams
Discretized streams
 
Exploring Parallel Merging In GPU Based Systems Using CUDA C.
Exploring Parallel Merging In GPU Based Systems Using CUDA C.Exploring Parallel Merging In GPU Based Systems Using CUDA C.
Exploring Parallel Merging In GPU Based Systems Using CUDA C.
 
Performance and how to measure it - ProgSCon London 2016
Performance and how to measure it - ProgSCon London 2016Performance and how to measure it - ProgSCon London 2016
Performance and how to measure it - ProgSCon London 2016
 
Contiki introduction II-from what to how
Contiki introduction II-from what to howContiki introduction II-from what to how
Contiki introduction II-from what to how
 
LendingClub RealTime BigData Platform with Oracle GoldenGate
LendingClub RealTime BigData Platform with Oracle GoldenGateLendingClub RealTime BigData Platform with Oracle GoldenGate
LendingClub RealTime BigData Platform with Oracle GoldenGate
 
DSP_Assign_2 (Autosaved)
DSP_Assign_2 (Autosaved)DSP_Assign_2 (Autosaved)
DSP_Assign_2 (Autosaved)
 
10 Key MongoDB Performance Indicators
10 Key MongoDB Performance Indicators  10 Key MongoDB Performance Indicators
10 Key MongoDB Performance Indicators
 
Oracle Drivers configuration for High Availability
Oracle Drivers configuration for High AvailabilityOracle Drivers configuration for High Availability
Oracle Drivers configuration for High Availability
 
Achitecture Aware Algorithms and Software for Peta and Exascale
Achitecture Aware Algorithms and Software for Peta and ExascaleAchitecture Aware Algorithms and Software for Peta and Exascale
Achitecture Aware Algorithms and Software for Peta and Exascale
 
Samantha Wang [InfluxData] | Best Practices on How to Transform Your Data Usi...
Samantha Wang [InfluxData] | Best Practices on How to Transform Your Data Usi...Samantha Wang [InfluxData] | Best Practices on How to Transform Your Data Usi...
Samantha Wang [InfluxData] | Best Practices on How to Transform Your Data Usi...
 
GDG Jakarta Meetup - Streaming Analytics With Apache Beam
GDG Jakarta Meetup - Streaming Analytics With Apache BeamGDG Jakarta Meetup - Streaming Analytics With Apache Beam
GDG Jakarta Meetup - Streaming Analytics With Apache Beam
 
Outsmarting the smart meter (Jfokus 2017)
Outsmarting the smart meter (Jfokus 2017)Outsmarting the smart meter (Jfokus 2017)
Outsmarting the smart meter (Jfokus 2017)
 

More from Larry Nung

Ansible - simple it automation
Ansible - simple it automationAnsible - simple it automation
Ansible - simple it automationLarry Nung
 
sonarwhal - a linting tool for the web
sonarwhal - a linting tool for the websonarwhal - a linting tool for the web
sonarwhal - a linting tool for the webLarry Nung
 
LiteDB - A .NET NoSQL Document Store in a single data file
LiteDB - A .NET NoSQL Document Store in a single data fileLiteDB - A .NET NoSQL Document Store in a single data file
LiteDB - A .NET NoSQL Document Store in a single data fileLarry Nung
 
PL/SQL & SQL CODING GUIDELINES – Part 8
PL/SQL & SQL CODING GUIDELINES – Part 8PL/SQL & SQL CODING GUIDELINES – Part 8
PL/SQL & SQL CODING GUIDELINES – Part 8Larry Nung
 
MessagePack - An efficient binary serialization format
MessagePack - An efficient binary serialization formatMessagePack - An efficient binary serialization format
MessagePack - An efficient binary serialization formatLarry Nung
 
PL/SQL & SQL CODING GUIDELINES – Part 7
PL/SQL & SQL CODING GUIDELINES – Part 7PL/SQL & SQL CODING GUIDELINES – Part 7
PL/SQL & SQL CODING GUIDELINES – Part 7Larry Nung
 
BenchmarkDotNet - Powerful .NET library for benchmarking
BenchmarkDotNet  - Powerful .NET library for benchmarkingBenchmarkDotNet  - Powerful .NET library for benchmarking
BenchmarkDotNet - Powerful .NET library for benchmarkingLarry Nung
 
Visual studio 2017
Visual studio 2017Visual studio 2017
Visual studio 2017Larry Nung
 
Web deploy command line
Web deploy command lineWeb deploy command line
Web deploy command lineLarry Nung
 
Topshelf - An easy service hosting framework for building Windows services us...
Topshelf - An easy service hosting framework for building Windows services us...Topshelf - An easy service hosting framework for building Windows services us...
Topshelf - An easy service hosting framework for building Windows services us...Larry Nung
 
Common.logging
Common.loggingCommon.logging
Common.loggingLarry Nung
 
PL/SQL & SQL CODING GUIDELINES – Part 5
PL/SQL & SQL CODING GUIDELINES – Part 5PL/SQL & SQL CODING GUIDELINES – Part 5
PL/SQL & SQL CODING GUIDELINES – Part 5Larry Nung
 
Regular expression
Regular expressionRegular expression
Regular expressionLarry Nung
 
PL/SQL & SQL CODING GUIDELINES – Part 4
PL/SQL & SQL CODING GUIDELINES – Part 4PL/SQL & SQL CODING GUIDELINES – Part 4
PL/SQL & SQL CODING GUIDELINES – Part 4Larry Nung
 
Fx.configuration
Fx.configurationFx.configuration
Fx.configurationLarry Nung
 
StackExchange.redis
StackExchange.redisStackExchange.redis
StackExchange.redisLarry Nung
 
GRUNT - The JavaScript Task Runner
GRUNT - The JavaScript Task RunnerGRUNT - The JavaScript Task Runner
GRUNT - The JavaScript Task RunnerLarry Nung
 
Bower - A package manager for the web
Bower - A package manager for the webBower - A package manager for the web
Bower - A package manager for the webLarry Nung
 

More from Larry Nung (20)

Ansible - simple it automation
Ansible - simple it automationAnsible - simple it automation
Ansible - simple it automation
 
sonarwhal - a linting tool for the web
sonarwhal - a linting tool for the websonarwhal - a linting tool for the web
sonarwhal - a linting tool for the web
 
LiteDB - A .NET NoSQL Document Store in a single data file
LiteDB - A .NET NoSQL Document Store in a single data fileLiteDB - A .NET NoSQL Document Store in a single data file
LiteDB - A .NET NoSQL Document Store in a single data file
 
PL/SQL & SQL CODING GUIDELINES – Part 8
PL/SQL & SQL CODING GUIDELINES – Part 8PL/SQL & SQL CODING GUIDELINES – Part 8
PL/SQL & SQL CODING GUIDELINES – Part 8
 
MessagePack - An efficient binary serialization format
MessagePack - An efficient binary serialization formatMessagePack - An efficient binary serialization format
MessagePack - An efficient binary serialization format
 
PL/SQL & SQL CODING GUIDELINES – Part 7
PL/SQL & SQL CODING GUIDELINES – Part 7PL/SQL & SQL CODING GUIDELINES – Part 7
PL/SQL & SQL CODING GUIDELINES – Part 7
 
BenchmarkDotNet - Powerful .NET library for benchmarking
BenchmarkDotNet  - Powerful .NET library for benchmarkingBenchmarkDotNet  - Powerful .NET library for benchmarking
BenchmarkDotNet - Powerful .NET library for benchmarking
 
Visual studio 2017
Visual studio 2017Visual studio 2017
Visual studio 2017
 
Web deploy command line
Web deploy command lineWeb deploy command line
Web deploy command line
 
Web deploy
Web deployWeb deploy
Web deploy
 
SikuliX
SikuliXSikuliX
SikuliX
 
Topshelf - An easy service hosting framework for building Windows services us...
Topshelf - An easy service hosting framework for building Windows services us...Topshelf - An easy service hosting framework for building Windows services us...
Topshelf - An easy service hosting framework for building Windows services us...
 
Common.logging
Common.loggingCommon.logging
Common.logging
 
PL/SQL & SQL CODING GUIDELINES – Part 5
PL/SQL & SQL CODING GUIDELINES – Part 5PL/SQL & SQL CODING GUIDELINES – Part 5
PL/SQL & SQL CODING GUIDELINES – Part 5
 
Regular expression
Regular expressionRegular expression
Regular expression
 
PL/SQL & SQL CODING GUIDELINES – Part 4
PL/SQL & SQL CODING GUIDELINES – Part 4PL/SQL & SQL CODING GUIDELINES – Part 4
PL/SQL & SQL CODING GUIDELINES – Part 4
 
Fx.configuration
Fx.configurationFx.configuration
Fx.configuration
 
StackExchange.redis
StackExchange.redisStackExchange.redis
StackExchange.redis
 
GRUNT - The JavaScript Task Runner
GRUNT - The JavaScript Task RunnerGRUNT - The JavaScript Task Runner
GRUNT - The JavaScript Task Runner
 
Bower - A package manager for the web
Bower - A package manager for the webBower - A package manager for the web
Bower - A package manager for the web
 

Recently uploaded

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 

Recently uploaded (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 

Disruptor

  • 4. INTRODUCTION  High Performance Inter-Thread Messaging Library  LMAX build the system on the JVM platform and centers on a Business Logic Processor that can handle 6 million orders per second on a single thread with very low latency: 100K TPS with 1 ms latency.  Multicast events to consumers, with consumer dependency graph.  Pre-allocate memory for events.  Optionally lock-free.
  • 6. CAS  Compare-and-swap  An atomic instruction used in multithreading to achieve synchronization 56 Core1 Core2 56=>57 55=>58
  • 7. CAS
  • 8. MEMORY BARRIERS  A type of barrier instruction that causes a central processing unit (CPU) or compiler to enforce an ordering constraint on memory operations issued before and after the barrier instruction.
  • 9. CACHE LINE  Unit of transfer between memory and CPU  Cache-Lines size is (typically) 64 bytes.
  • 10. FALSE SHARING  When a system participant attempts to periodically access data that will never be altered by another party, but that data shares a cache block with data that is altered, the caching protocol may force the first participant to reload the whole unit despite a lack of logical necessity.
  • 11. FALSE SHARING struct foo { int x; int y; }; static struct foo f; /* The two following functions are running concurrently: */ int sum_a() { int s = 0; int i; for (i = 0; i < 1000000; ++i) s += f.x; return s; } void inc_b() { int i; for (i = 0; i < 1000000; ++i) ++f.y; }
  • 14. DISRUPTOR ARCHITECTURE  Ring buffer size = 2 ^ n  Index = sequence & (bufferSize - 1)  no comparisons  no branches  safe Producer Consumer
  • 15. CONSUMER DEPENDENCY GRAPH  Unicast: 1P - 1C  Three Step Pipeline: 1P – 3C P1 C1 P1 C1 C2 C3 P1 C1 P1 C1 C2 C3
  • 16. CONSUMER DEPENDENCY GRAPH  Sequencer: 3P – 1C  Multicast: 1P – 3C P1 P2 P3 C1 P1 C1 C2 C3 P1 C1 P2 P3 P1 C1 C2 C3
  • 17. CONSUMER DEPENDENCY GRAPH  Diamond: 1P – 3C P1 C1 C2 C3 P1 C1 C2 C3
  • 19. WAIT STRATEGY  BlockingWaitStrategy  BusySpinWaitStrategy  SleepingWaitStrategy  TimeoutBlockingWaitStrategy  PhasedBackoffWaitStrategy  YieldingWaitStrategy
  • 21. CUSTOM EVENTHANDLER ... public class Data { public string Value { get; set; } } public class DataEventHandler : IEventHandler<Data> { public string Name { get; private set; } public DataEventHandler(string name) { this.Name = name; } public void OnEvent(Data data, long sequence, bool endOfBatch) { Console.WriteLine("Thread = {0}, Handler = {1}, Sequence = {2}, Value = {3}", Thread.CurrentThread.ManagedThreadId.ToString(), this.Name, sequence, data.Value); } } ...
  • 22. DSL Generate disruptor instance with factory method and ring buffer size Setup consumer dependency graph with Disruptor.HandleEvents With Start disruptor with Disruptor.Start Get ring buffer Get next ring buffer sequence Set data Publish data
  • 23. DSL ... var disruptor = new Disruptor.Dsl.Disruptor<Data>(() => new Data(), (int)Math.Pow(2,4), TaskScheduler.Default); disruptor.HandleEventsWith(new DataEventHandler("Handler1")); var ringBuffer = disruptor.Start(); var sequenceNo = ringBuffer.Next(); var data = ringBuffer[sequenceNo]; data.Value = "Hello"; ringBuffer.Publish(sequenceNo); sequenceNo = ringBuffer.Next(); data = ringBuffer[sequenceNo]; data.Value = "World"; ringBuffer.Publish(sequenceNo); disruptor.Shutdown(); ...
  • 24. NON-DSL Generate ring buffer with factory method and ring buffer size Setup consumer dependency graph with EventProcessor And Barrier Start EventProcessor in another thread Get next ring buffer sequence Set dataPublish data
  • 25. NON-DSL ... var ringBuffer = RingBuffer<Data>.CreateSingleProducer(() => new Data(), (int)Math.Pow(2, 4)); var barrier = ringBuffer.NewBarrier(); var eventProcessor = new BatchEventProcessor<Data>(ringBuffer, barrier, new DataEventHandler("Handler1")); Task.Factory.StartNew(() => eventProcessor.Run()); var sequenceNo = ringBuffer.Next(); var data = ringBuffer[sequenceNo]; data.Value = "Hello"; ringBuffer.Publish(sequenceNo); sequenceNo = ringBuffer.Next(); data = ringBuffer[sequenceNo]; data.Value = "World"; ringBuffer.Publish(sequenceNo); eventProcessor.Halt(); Application.DoEvents(); ...
  • 26. UNICAST: 1P - 1C ... using Disruptor; namespace ConsoleApplication29 { … class Program { static void Main( string[] args) { var disruptor = new Disruptor.Dsl. Disruptor<Data>(() => new Data(), (int)Math .Pow(2,4), TaskScheduler.Default); disruptor.HandleEventsWith(new DataEventHandler("Handler1”)); var ringBuffer = disruptor.Start(); var idx = 0; while ( true) { var sequenceNo = ringBuffer.Next(); var data = ringBuffer[sequenceNo]; data.Value = idx++.ToString(); ringBuffer.Publish(sequenceNo); Thread.Sleep(250); } disruptor.Shutdown(); } } } P1 C1
  • 27. UNICAST: 1P - 1C ... var ringBuffer = RingBuffer<Data>.CreateSingleProducer(() => new Data(), (int)Math.Pow(2, 4)); var barrier = ringBuffer.NewBarrier(); var eventProcessor = new BatchEventProcessor<Data>(ringBuffer, barrier, new DataEventHandler("Handler1")); Task.Factory.StartNew(() => eventProcessor.Run()); ... eventProcessor.Halt(); ... P1 Barrier C1
  • 29. THREE STEP PIPELINE: 1P – 3C ... var disruptor = new Disruptor.Dsl.Disruptor<Data>(() => new Data(), (int)Math.Pow(2,4), TaskScheduler.Default); disruptor.HandleEventsWith(new DataEventHandler("Handler1")) .Then(new DataEventHandler("Handler2")) .Then(new DataEventHandler("Handler3")); var ringBuffer = disruptor.Start(); ... disruptor.Shutdown(); … P1 C1 C2 C3
  • 30. THREE STEP PIPELINE: 1P – 3C ... var ringBuffer = RingBuffer<Data>.CreateSingleProducer(() => new Data(), (int)Math.Pow(2, 4)); var eventProcessor1 = new BatchEventProcessor<Data>(ringBuffer, ringBuffer.NewBarrier(), new DataEventHandler("Handler1")); var eventProcessor2 = new BatchEventProcessor<Data>(ringBuffer, ringBuffer.NewBarrier(eventProcessor1.Sequence), new DataEventHandler("Handler2")); var eventProcessor3 = new BatchEventProcessor<Data>(ringBuffer, ringBuffer.NewBarrier(eventProcessor2.Sequence), new DataEventHandler("Handler3")); Task.Factory.StartNew(() => eventProcessor1.Run()); Task.Factory.StartNew(() => eventProcessor2.Run()); Task.Factory.StartNew(() => eventProcessor3.Run()); ... eventProcessor1.Halt(); eventProcessor2.Halt(); eventProcessor3.Halt(); ... P1 C1 C2 C3 Barrier Barrier Barrier
  • 31. THREE STEP PIPELINE: 1P – 3C
  • 32. MULTICAST: 1P – 3C ... var disruptor = new Disruptor.Dsl.Disruptor<Data>(() => new Data(), (int)Math.Pow(2,4), TaskScheduler.Default); disruptor.HandleEventsWith(new DataEventHandler("Handler1"), new DataEventHandler("Handler2"), new DataEventHandler("Handler3")); var ringBuffer = disruptor.Start(); ... disruptor.Shutdown(); … P1 C1 C2 C3
  • 33. MULTICAST: 1P – 3C ... var ringBuffer = RingBuffer<Data>.CreateSingleProducer(() => new Data(), (int)Math.Pow(2, 4)); var barrier = ringBuffer.NewBarrier(); var eventProcessor1 = new BatchEventProcessor<Data>(ringBuffer, barrier, new DataEventHandler("Handler1")); var eventProcessor2 = new BatchEventProcessor<Data>(ringBuffer, barrier, new DataEventHandler("Handler2")); var eventProcessor3 = new BatchEventProcessor<Data>(ringBuffer, barrier, new DataEventHandler("Handler3")); Task.Factory.StartNew(() => eventProcessor1.Run()); Task.Factory.StartNew(() => eventProcessor2.Run()); Task.Factory.StartNew(() => eventProcessor3.Run()); ... eventProcessor1.Halt(); eventProcessor2.Halt(); eventProcessor3.Halt(); ... P1 C1 C2 C3 Barrier
  • 35. DIAMOND: 1P – 3C ... var disruptor = new Disruptor.Dsl.Disruptor<Data>(() => new Data(), (int)Math.Pow(2,4), TaskScheduler.Default); disruptor.HandleEventsWith(new DataEventHandler("Handler1"), new DataEventHandler("Handler2")).Then(new DataEventHandler("Handler3")); var ringBuffer = disruptor.Start(); ... disruptor.Shutdown(); … P1 C1 C2 C3
  • 36. DIAMOND: 1P – 3C ... var ringBuffer = RingBuffer<Data>.CreateSingleProducer(() => new Data(), (int)Math.Pow(2, 4)); var barrier = ringBuffer.NewBarrier(); var eventProcessor1 = new BatchEventProcessor<Data>(ringBuffer, barrier, new DataEventHandler("Handler1")); var eventProcessor2 = new BatchEventProcessor<Data>(ringBuffer, barrier, new DataEventHandler("Handler2")); var eventProcessor3 = new BatchEventProcessor<Data>(ringBuffer, ringBuffer.NewBarrier(eventProcessor1.Sequence, eventProcessor2.Sequence), new DataEventHandler("Handler3")); Task.Factory.StartNew(() => eventProcessor1.Run()); Task.Factory.StartNew(() => eventProcessor2.Run()); Task.Factory.StartNew(() => eventProcessor3.Run()); ... eventProcessor1.Halt(); eventProcessor2.Halt(); eventProcessor3.Halt(); ... P1 C1 C2 C3 Barrier Barrier
  • 41. LMAX ARCHITECTURE  Journaler  Store all the events in a durable form  Replicator  Use IP multicasting to sync with slave node
  • 43. REFERENCE  The LMAX Architecture  http://martinfowler.com/articles/lmax.html  Compare-and-swap - Wikipedia, the free encyclopedia  https://en.wikipedia.org/wiki/Compare-and-swap  Memory barrier - Wikipedia, the free encyclopedia  https://en.wikipedia.org/wiki/Memory_barrier 43
  • 44. REFERENCE  Circular buffer - Wikipedia, the free encyclopedia  https://en.wikipedia.org/wiki/Circular_buffer  并发框架Disruptor译文 | 并发编程网 - ifeve.com  http://ifeve.com/disruptor/  [C#][VB.NET].NET 4.0 Barrier Class | Level Up - 點 部落  https://dotblogs.com.tw/larrynung/archive/2009/08/22/10 182.aspx?fid=9457 44