2. Enterprise Service Bus An infrastructure used for enterprise integration via a service-oriented approach: Reliable messaging; Messages exchanged between services using standard messaging patterns (e.g. request/response, publish/subscribe); Messages consist of XML data and metadata; Provides services for transforming and routing of messages
8. MassTransit Summary Originated by Chris Patterson & Dru Sellers Lightweight Service Bus Implementation Loose coupling via publish/subscribe Active Service pattern Supports MSMQ, ActiveMQ, TIBCO EMS Open Source, Apache 2.0 License
13. Lessons Learned Network services are unreliable FAIL Ability to isolate services for testing WIN State-machine-based workflows WIN Under active developer FAIL/WIN
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