Mass Transit

2,035
-1

Published on

Presentation made at the Sydney Alt.NET user group in October 2009.

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,035
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
31
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Messaging – MSMQ, ActiveMQ, Azure/EC2
  • Async – message producers are non-blocking; fire-and-forget messaging; message consumers run in their own process; more complex;Decoupled – eliminates temporal coupling; enables isolated testing of services; reduces dependencies, allowing service reuse (e.g. credit card authorisation);Explicit contracts – agreement between producer/consumer; abstraction of implementationFault tolerance – durable message transports;Availability – small frequent transfers of related content (batching); load can be distributed over a wider time window;
  • Maximises throughput; orders are placed in a queue, correlated by name, barista can optimise processing; out-of-order deliveryError handling – write-off : discard the drink and start a fresh one; compensating action : refund money2-phase commit – wait at cashier with receipt and money on table until drink is prepared. Everything changes hands in one go, Neither cashier nor customer could leave until complete. Much simpler, but kills throughput and destroys business model, no scaleability. ESB – scales out by adding more cashiers/baristas
  • NServiceBus –UdiDahan; most mature Alt.Net product; 100m durable/transactional and 900m non-durable messages per hour on 3 blade centers (48 blades), 30 1U servers and 20 clusters.SimpleServiceBus – a fork of NServiceBus; designed to be more modular; health & performance monitoring baked in;ESB.NET – Keystroke IT Australia; core components are binary only, remainder is open-source
  • Mass Transit

    1. 1. MassTransit<br />David KeavenySenior DeveloperFairfax Digital<br />
    2. 2. Enterprise Service Bus<br />An infrastructure used for enterprise integration via a service-oriented approach:<br />Reliable messaging;<br />Messages exchanged between services using standard messaging patterns (e.g. request/response, publish/subscribe);<br />Messages consist of XML data and metadata;<br />Provides services for transforming and routing of messages<br />
    3. 3. What is it?<br />
    4. 4. What is it?<br />Asynchronous<br />Minimised coupling<br />Explicit contract<br />Fault tolerant<br />Data availability<br />
    5. 5. What is it?<br />Hotto cocoa okudasai<br />a.k.a. Starbucks Does Not Use Two-Phase Commit<br />http://www.eaipatterns.com/ramblings/18_starbucks.html<br />
    6. 6. ESB Implementations<br />Microsoft BizTalk<br />IBM WebSphere<br />TIBCO BusinessWorks<br />
    7. 7. Alt.Net ESB Implementions<br />NServiceBus<br />SimpleServiceBus<br />(ESB.NET)<br />MassTransit<br />
    8. 8. MassTransit Summary<br />Originated by Chris Patterson & Dru Sellers<br />Lightweight Service Bus Implementation<br />Loose coupling via publish/subscribe<br />Active Service pattern<br />Supports MSMQ, ActiveMQ, TIBCO EMS<br />Open Source, Apache 2.0 License<br />
    9. 9. MassTransit Architecture<br />
    10. 10. Testing<br />Individual components testable in isolation<br />Fully unit-testable using mocks and stubs<br />Test-first development helps improve data contract<br />
    11. 11. Visualisation Tools<br />Presents code-base logic in a visual form<br />Aid in identifying composition problems<br />Should be viewable on operational systems<br />
    12. 12. Real-world Usage<br />
    13. 13. Lessons Learned<br />Network services are unreliable FAIL<br />Ability to isolate services for testing WIN<br />State-machine-based workflows WIN<br />Under active developer FAIL/WIN<br />
    14. 14. Further Reading<br />

    ×