soa lessons learnt dublin microservices 20160525

Post on 11-Apr-2017

418 Views

Category:

Software

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

SOA Lessons Learnt

(OR Microservices Done Better)

Sean Farmar

@farmar

Agenda• My journey to SOA• The SOA / Microservices promise?• Some concepts• Lessons Learnt• Q&A

My journey to SOATried all “Best Practices”Layers and TiersDistributed monoliths using Web Services … and failed

So I went to my master

Solve the problem you want?mmmm…Coupling your problem is…

Coupling

Temporal (time, synchronous calls)Spatial (deployment, endpoint address)Platform (protocols, .Net Remoting)

Coupling Dimensions

EncapsulationAutonomyDecomposing Business entitiesSRPKeep your vertical slice thin, top to bottom

Monolith

UI

BL

DAL

DB

Tight CouplingLoose Coupling

Vertical Slicing

UI

BL

DAL

DB Referential Integrity

Tight CouplingLoose Coupling

Re-introduces Coupling

SalesConte

ntCRMOps

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/DMUG16

Why SOA / Microservices?

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

Lessons learntIt’s hard (er)Decomposing your business domain, is hard, avoid the pitfalls of standard design methodologiesMessaging: Fire and forgetCQS: Separating data writes and data readsData (write) ownershipReferential integrity and GUIDS

Lessons learnt (cont.)

DATA: separate OLTP and reporting, eventual consistencyMonitoring - Lights onTesting is HARDDeployment - Automate everythingOrganization and people, trust

Summary• Avoid all dimensions of coupling• No synchronous communication between

components/microservices, • Don't share data, use view/read models to share read

only data• Decomposing your business domain and entities• You can do it on .Net platform using NServiceBus• Blog post:

http://particular.net/blog/goodbye-microservices-hello-right-sized-services

• Fallacies EBook: http://go.particular.net/DMUG16

Q&A

Thank You!Sean Farmartwitter: @farmarParticular.net

top related