• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Concurrent Programming Using The Disruptor - Copenhagen
 

Concurrent Programming Using The Disruptor - Copenhagen

on

  • 5,412 views

The version of my Disruptor talk given at GOTO Copenhagen

The version of my Disruptor talk given at GOTO Copenhagen

Statistics

Views

Total Views
5,412
Views on SlideShare
3,316
Embed Views
2,096

Actions

Likes
11
Downloads
141
Comments
1

41 Embeds 2,096

http://mechanitis.blogspot.com 853
http://mechanitis.blogspot.co.uk 510
http://mechanitis.blogspot.de 95
http://mechanitis.blogspot.in 80
http://mechanitis.blogspot.be 49
http://www.codesorceresses.eu 47
http://mechanitis.blogspot.ca 46
http://mechanitis.blogspot.fr 44
http://mechanitis.blogspot.nl 37
http://mechanitis.blogspot.com.br 36
http://mechanitis.blogspot.se 35
http://mechanitis.blogspot.com.au 31
http://mechanitis.blogspot.com.es 18
http://mechanitis.blogspot.ie 15
http://mechanitis.blogspot.sg 15
http://mechanitis.blogspot.jp 14
http://www.hftreview.com 14
http://mechanitis.blogspot.dk 14
http://mechanitis.blogspot.kr 13
http://mechanitis.blogspot.ch 12
http://mechanitis.blogspot.it 11
http://mechanitis.blogspot.hk 10
http://mechanitis.blogspot.tw 10
http://mechanitis.blogspot.hu 9
http://mechanitis.blogspot.co.il 8
http://mechanitis.blogspot.ro 8
http://mechanitis.blogspot.cz 8
http://mechanitis.blogspot.pt 7
http://mechanitis.blogspot.ru 6
http://mechanitis.blogspot.co.nz 6
http://mechanitis.blogspot.fi 6
http://mechanitis.blogspot.no 6
http://www.linkedin.com 5
http://mechanitis.blogspot.com.ar 4
http://mechanitis.blogspot.co.at 4
http://mechanitis.blogspot.sk 3
http://mechanitis.blogspot.gr 2
http://mechanitis.blogspot.mx 2
http://dashboard.bloglines.com 1
http://webcache.googleusercontent.com 1
http://www.thetradingmesh.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Concurrent Programming Using The Disruptor - Copenhagen Concurrent Programming Using The Disruptor - Copenhagen Presentation Transcript

    • Concurrent Programming Using The Disruptor Trisha Gee LMAXWednesday, 23 May 12
    • Concurrent Programming Using The Disruptor Trisha Gee, Developer at LMAX @trisha_gee mechanitis.blogspot.comWednesday, 23 May 12
    • The Disruptor?Wednesday, 23 May 12
    • What I’m covering • Overview of the Disruptor • Create your own! • Turn it up to Eleven • Q&AWednesday, 23 May 12
    • What is it? • Data structure and work flow with no contention. • Very fast message passing. • Allows you to go truly parallel.Wednesday, 23 May 12
    • So...?Wednesday, 23 May 12
    • The Magic RingBufferWednesday, 23 May 12
    • The Magic RingBufferWednesday, 23 May 12
    • The Magic RingBufferWednesday, 23 May 12
    • The Magic RingBufferWednesday, 23 May 12
    • The Magic RingBufferWednesday, 23 May 12
    • The Magic RingBufferWednesday, 23 May 12
    • The Magic RingBufferWednesday, 23 May 12
    • Creating a RingBuffer final RingBuffer<SimpleEvent> ringBuffer = new RingBuffer<SimpleEvent>(SimpleEvent.EVENT_FACTORY, RING_BUFFER_SIZE);Wednesday, 23 May 12
    • The Events are BucketsWednesday, 23 May 12
    • Great! I want one! public class SimpleEvent { public static final EventFactory<SimpleEvent> EVENT_FACTORY = new SimpleEventFactory(); private volatile String value; private static class SimpleEventFactory implements EventFactory<SimpleEvent> { @Override public SimpleEvent newInstance() { return new SimpleEvent(); } } }Wednesday, 23 May 12
    • I’ve got a RingBuffer! • Erm.... how do I poke things into it?Wednesday, 23 May 12
    • The PublisherWednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • What do I do? public class SimpleEventTranslator implements EventTranslator<SimpleEvent>SimpleEventTranslator translator = new SimpleEventTranslator();EventPublisher<SimpleEvent> publisher = new EventPublisher<SimpleEvent>(ringBuffer);// poke your translator here// ...and when you’re done...publisher.publishEvent(translator);Wednesday, 23 May 12
    • ...so now I want to read • The Disruptor provides nice batching behaviour for freeWednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • ...and all you need is... public class SimpleEventHandler implements EventHandler<SimpleEvent> { @Override public void onEvent(final SimpleEvent event, final long sequence, final boolean endOfBatch) throws Exception { // do stuff } }Wednesday, 23 May 12
    • Shiny. So what?Wednesday, 23 May 12
    • Let’s go parallelWednesday, 23 May 12
    • And now for something different...Wednesday, 23 May 12
    • Remember Henry Ford?Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Complex workflow...Wednesday, 23 May 12
    • What on Earth has this got to do with RingBuffers?!Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Wednesday, 23 May 12
    • Don’t wrap the buffer! ringBuffer.setGatingSequences(finalEventProcessor.getSequence());Wednesday, 23 May 12
    • CaveatsWednesday, 23 May 12
    • Is that it? • Wait and claim strategies • Batch publishing • Multiple publishers • Different EventHandlers • The Wizard • You don’t even need a RingBuffer...Wednesday, 23 May 12
    • You get... • A framework the encourages you to model your domain • The ability to run in parallel but single- threaded • Reliable ordering • ...and it can be very fastWednesday, 23 May 12
    • More Information • Google Code Site, including Wiki http://code.google.com/p/disruptor/ • Blogs, e.g. mine: mechanitis.blogspot.com • Presentations • Google GroupWednesday, 23 May 12
    • Q&AWednesday, 23 May 12
    • WorkerPoolWednesday, 23 May 12
    • AggregateEventHandlerWednesday, 23 May 12
    • WaitStrategies • BlockingWaitStrategy • BusySpinWaitStrategy • SleepingWaitStrategy • YieldingWaitStrategyWednesday, 23 May 12
    • ClaimStrategies • SingleThreadedClaimStrategy • MultiThreadedClaimStrategy • MultiThreadedLowContentionClaimStrategyWednesday, 23 May 12