17
SOA Lessons Learnt (OR Microservices Done Better) Sean Farmar @farmar

SOA Lessons learnt Dublin Microservices 20160525

Embed Size (px)

Citation preview

Page 1: SOA Lessons learnt Dublin Microservices 20160525

SOA Lessons Learnt

(OR Microservices Done Better)

Sean Farmar

@farmar

Page 2: SOA Lessons learnt Dublin Microservices 20160525

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

Page 3: SOA Lessons learnt Dublin Microservices 20160525

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

Page 4: SOA Lessons learnt Dublin Microservices 20160525

So I went to my master

Page 5: SOA Lessons learnt Dublin Microservices 20160525

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

Page 6: SOA Lessons learnt Dublin Microservices 20160525

Coupling

Page 7: SOA Lessons learnt Dublin Microservices 20160525

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

Coupling Dimensions

Page 8: SOA Lessons learnt Dublin Microservices 20160525

EncapsulationAutonomyDecomposing Business entitiesSRPKeep your vertical slice thin, top to bottom

Page 9: SOA Lessons learnt Dublin Microservices 20160525

Monolith

UI

BL

DAL

DB

Tight CouplingLoose Coupling

Page 10: SOA Lessons learnt Dublin Microservices 20160525

Vertical Slicing

UI

BL

DAL

DB Referential Integrity

Tight CouplingLoose Coupling

Re-introduces Coupling

SalesConte

ntCRMOps

Page 11: SOA Lessons learnt Dublin Microservices 20160525

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)

Page 12: SOA Lessons learnt Dublin Microservices 20160525

The Fallacies EBook

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

Page 13: SOA Lessons learnt Dublin Microservices 20160525

Why SOA / Microservices?

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

Page 14: SOA Lessons learnt Dublin Microservices 20160525

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

Page 15: SOA Lessons learnt Dublin Microservices 20160525

Lessons learnt (cont.)

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

Page 16: SOA Lessons learnt Dublin Microservices 20160525

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

Page 17: SOA Lessons learnt Dublin Microservices 20160525

Q&A

Thank You!Sean Farmartwitter: @farmarParticular.net