Course: Advanced Distributed System Design - Udi Dahan

Coupling

./resources/course-adsd-coupling.resources/11460613-distributed-system-design-slides.14.jpg

incoming vs outgoing coupling

./resources/course-adsd-coupling.resources/11460613-distributed-system-design-slides.13.jpg

def: incoming coupling

./resources/course-adsd-coupling.resources/11460613-distributed-system-design-slides.6.jpg

def: outgoing coupling

./resources/course-adsd-coupling.resources/11460613-distributed-system-design-slides.4.jpg

clarity: incoming vs outgoing

./resources/course-adsd-coupling.resources/11460613-distributed-system-design-slides.jpg

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

./resources/course-adsd-coupling.resources/11460613-distributed-system-design-slides.10.jpg

hidden coupling

./resources/course-adsd-coupling.resources/11460613-distributed-system-design-slides.9.jpg


3 aspects of coupling

./resources/course-adsd-coupling.resources/11460613-distributed-system-design-slides.3.jpg


aspect 1: platform (aka interoperability)

./resources/course-adsd-coupling.resources/11460613-distributed-system-design-slides.16.jpg

text-based representation on the wire http, smtp, udp, …

soap / wsdl / rest


apect 2: time

./resources/course-adsd-coupling.resources/11460613-distributed-system-design-slides.5.jpg


aspect time: Pub-Sub explicit caching

make explicit in A that caching is happening

./resources/course-adsd-coupling.resources/11460613-distributed-system-design-slides.1.jpg


aspect time: Pub-Sub constraints

./resources/course-adsd-coupling.resources/11460613-distributed-system-design-slides.8.jpg


aspect time: Pub-Sub add validity period to data

./resources/course-adsd-coupling.resources/11460613-distributed-system-design-slides.11.jpg


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

./resources/course-adsd-coupling.resources/11460613-distributed-system-design-slides.7.jpg


aspect space: routing

./resources/course-adsd-coupling.resources/11460613-distributed-system-design-slides.2.jpg


aspect time: logical owner logical owner

./resources/course-adsd-coupling.resources/11460613-distributed-system-design-slides.12.jpg


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)

./resources/course-adsd-coupling.resources/11460613-distributed-system-design-slides.15.jpg