Course: ADSD - Coupling

April 9th, 2020

Course: Advanced Distributed System Design - Udi Dahan

 

Coupling

 

no description for image available

 

incoming vs outgoing coupling

 

no description for image available

 

def: incoming coupling

no description for image available

 

def: outgoing coupling

no description for image available

 

clarity: incoming vs outgoing

no description for image available

 

 

count coupling

X->Y

x outboing 1

y incoming 1

 

A->B

x outgoing 5 "is this class single responsibility principle"

y incoming 1 "how many classes do I have to change"

 

static analysis tool

 

no description for image available

 

hidden coupling

 

no description for image available

 

 


 

3 aspects of coupling

 

no description for image available

 

 


 

aspect 1: platform (aka interoperability)

 

no description for image available

 

text-based representation on the wire

http, smtp, udp, ...

 

 

soap / wsdl / rest

 

 


 

apect 2: time

 

no description for image available

 

 


 

aspect time: Pub-Sub explicit caching

make explicit in A that caching is happening

 

 

no description for image available

 

 


 

aspect time: Pub-Sub constraints

 

no description for image available

 

 


 

aspect time: Pub-Sub add validity period to data

 

no description for image available

 

 


aspect time: Pub-Sub consitency

if pub sub not OK time-constraint,

then RPC also not OK (can use cache)

-> transaction across A and B needed

 

 

no description for image available

 

 


 

aspect space: routing

 

no description for image available

 


 

aspect time: logical owner

logical owner

no description for image available

 

 


 

 

coupling 5 dimensions tradeoffs

tradeoffs between dimensions

per ''layer"

keep LOGIC away from all the other

"is the coupling reasonable for it's responsibility"

eg. fromend webapi, platform low, even if HTTP response which is time high coupling

internal component: low temporal at cost of higher platform (pub-sub platform framework)

 

no description for image available