building microservices .net - dublin microservices ug 20160928

18
Building (micro) Services On .Net Sean Farmar @farmar

Upload: sean-farmar

Post on 08-Jan-2017

183 views

Category:

Software


0 download

TRANSCRIPT

Building (micro) Services On .Net

Sean Farmar

@farmar

Why Microservices?

Break down the monolith

Fallacies of Distributed Computing1. The network is reliable. (Bill Joy and Tom Lyon)

2. Latency is zero. (Bill Joy and Tom Lyon)

3. Bandwidth is infinite. (Bill Joy and Tom Lyon)

4. The network is secure. (Bill Joy and Tom Lyon)

5. Topology doesn’t change. (Peter Deutsch)

6. There is one administrator. (Peter Deutsch)

7. Transport cost is zero. (Peter Deutsch)

8. The network is homogeneous. (James Gosling)

The Fallacies EBook

• Go to: http://go.particular.net/dublinmu

Why SOA / Microservices?

“Address coupling in our software design by building loosely coupled and highly encapsulated components”

Udi Dahan

Coupling• Synchronous communication

(Request Response)• Resource sharing (data, code)• Coupling Aspects (Temporal,

Spatial, Platform )

Decomposition• Breaking down functionality into

small autonomous components (vertical slicing)

• CQS/CQRS• Inter components

communication?• Messaging

Tools in .Net• Akka .net/ Orleans (actor

frameworks)• MassTransit• Re-bus• NServiceBus (particular.net)• Build your own

Functionality• Submit Order• Wait for Buyer’s Remorse• Ability to Cancel Order (within buyer’s

remorse)• Process Order (charge credit card)• Provision Download• Make Customer preferred• Send Welcome Email• Send Limited Time Offer

Source code: https://docs.particular.net/samples/show-case/on-premise/?version=Core_6

On Premise Sample

Demo

ComponentsSubmit Order Notify: Order Placed

Buyer’s RemorseOptional: Cancel

Order

Process Order Provision Download

Make Customer preferred

Send Limited Time Offer

Send Welcome Email

Sample code walk through

• Boundaries and responsibilities• Website• Code structure• Visualization

Debugging• Debugging Messaging• Sagas• Errors• http://particular.net/serviceinsight

Debugging

Demo

Monitoring• System Monitoring• Business Monitoring• Messaging• http://particular.net/servicepulse

Monitoring

•Demo

Build & Deploy• Build Nuget Packages• Octopus Deploy

Q&A

Thank You!Sean Farmartwitter: @farmarParticular.net