CS5412: LECTURE 8 USING TIME IN IOT APPLICATIONS
Ken Birman Spring, 2019
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 1
CS5412: LECTURE 8 Ken Birman USING TIME IN I O T APPLICATIONS - - PowerPoint PPT Presentation
CS5412: LECTURE 8 Ken Birman USING TIME IN I O T APPLICATIONS Spring, 2019 HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 1 CONTEXT: QUICK REMINDER Real-time clocks have limitations on precision, accuracy and skew. Lamport defines the
Ken Birman Spring, 2019
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 1
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 2
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 3
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 4
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 5
Let’s make a deal…
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 6
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 7
Owner of flight plan updates it… there can only be one owner. DDS makes the update persistent, records the
… Other ATC controllers see real-time read-only notifications Intelligent µ-service Intelligent µ-service Real-Time Guarantee: Notifications get through within delay ∆, even if something crashes!
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 8
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 9
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 10
p0 p1 p2 p3 p4 p5 t t+a t+b Think of “x” as a key and “3” as the new value. Here x=3 becomes visible within a time window between t+a and t+b. set x=3 x=3
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 11
p0 p1 p2 p3 p4 p5 Here, a set of devices can coordinate their actions based on a heartbeat.
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 12
p0 p1 p2 p3 p4 p5 t t+a t+b * * * * * Message is sent at time t by p0. Later both p0 and p1 fail. But message is still delivered atomically, after a bounded delay, and within a bounded interval of time
By having every receiver echo every message to all other members, we create an O(n2) message burst but can overcome crash failures or network link issues.
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 13
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 14
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 15
p0 p1 p2 p3 p4 p5 t t+a t+b * * * * * p0, p1 fail. Messages are lost when echoed by p2, p3
These were crashes. Otherwise the messages from p0 would have reached everyone in step one! Notice how time elapses step by step After so many “all-to-all” echo steps, one of them must have been successful.
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 16
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 17
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 18
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 19
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 20
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 21
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 22
p0 p1 p2 p3 p4 p5 t t+a t+b * * * * * *
In a normal run, everything gets through right away, but then we wait a long time before the DDS can deliver messages.
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 23
p0 p1 p2 p3 p4 p5 t t+a t+b * * * * * *
Here we just changed the delay parameter to deliver sooner. Seems reasonable, no?
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 24
p0 p1 p2 p3 p4 p5 t t+a t+b * all processes look “incorrect” (red) from time to time * * *
Very few processes are deemed “correct”. The others do weird wrong things. CASD didn’t work!
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 25
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 26
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 27
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 28
p0 p1 p2 p3 p4 p5 t t+a t+b * all processes look “incorrect” (red) from time to time * * *
Very few processes are deemed “correct”. The others do weird wrong things. CASD didn’t work!
3 and p5 act. Others don’t
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 29
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 30
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 31
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 32
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 33
AMp: a highly parallel atomic multicast protocol. In Symposium proceedings on Communications architectures & protocols (SIGCOMM '89). P. Veríssimo, L. Rodrigues, and
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 34
The DDS model puts time first, and in the IBM case, ignored consistency.
AMp brings consistency in as a secondary guarantee.
FFFS puts consistency first, then speed. Treats time as a kind of “index”
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 35
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 36
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 37
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 38
v1
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 39
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 40
Please tell me what to do
FAA project took giant leaps all at once, and ended up making many “snap judgments”.
list of technical features, then paying a lot of money to IBM (and later, Loral). The French had less money and were forced to evolve their systems through careful steps.
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 41
Red team: People tasked to “attack” a design, to identify flaws.
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 42
HTTP://WWW.CS.CORNELL.EDU/COURSES/CS5412/2019SP 43