Using Tla+ For Didactics Distributed Systems

I am teaching CSE 4/586 Distributed Systems class again this Fall (Fall 2014). This is the course of study I convey most fun teaching. (I would similar to intend my students also experience that agency :-) I learn the course of study amongst emphasis on reasoning almost the correctness of distributed algorithms. Here are the topics I comprehend inwards sequence:

  1. Introduction, Syntax in addition to semantics for distributed programs, predicate calculus
  2. Safety in addition to progress properties
  3. Proof of programme properties
  4. Time: logical clocks, State: distributed snapshots
  5. Mutual exclusion, Dining philosophers
  6. Consensus, Paxos
  7. Fault-tolerance, replication, rollback recovery, self-stabilization
  8. Programming back upward for distributed systems
  9. Data pump computing in addition to cloud computing 
  10. CAP theorem in addition to NOSQL systems
  11. Distributed/WAN storage systems

I lay emphasis on reasoning almost distributed algorithms because concurrency is real tricky; it genuinely humbles human brain. More than iii actions inwards a distributed programme in addition to your intuitions volition fail, you lot won't hold upward able to hand-wave in addition to apply operational reasoning on the program. You may intend you lot could, exactly you lot would hold upward real incorrect (I know from first-hand experience).

I purpose invariant-based reasoning of programme properties for the starting fourth dimension four weeks exclusively. But this becomes less applicable when nosotros acquire into to a greater extent than involved protocols inwards weeks five in addition to beyond. This is where I surrender beingness rigorous in addition to brand enjoin the class: "We could force things downward the most rigorous invariant-based reasoning in addition to predicate calculus marker exactly nosotros don't. Instead nosotros give arguments inwards English, amongst the appreciation of how these arguments stand upward for to the proof rules inwards previous chapters." Yes, this is non real satisfying, exactly I didn't convey much choice.

TLA+ 

So for these reasons, the AWS TLA+ article got my attending recently. The article talked almost how AWS successfully used invariant-based reasoning in addition to formal methods (in item TLA) for edifice robust distributed systems. TLA is a tool for specifying distributed algorithms/protocols in addition to model checking them. AWS used TLA inwards many fundamental projects: S3, DynamoDB, EBS, in addition to a distributed lock manager. Here is the technical written report past times AWS. It is a real expert read.

TLA+ is Leslie Lamport's brainchild. Of course of study you lot know Lamport if you lot are working on distributed systems. Lamport got a Turing observe inwards 2013; he is famous for logical clocks, Paxos, in addition to several other influential results inwards distributed systems. As a side-project, he wrote a wrapper some Knuth's TeX, called LaTeX ("La" for Lamport?), which is however the typesetting tool for almost all math/CSE academic papers. Lamport has ever been a theatre proponent of invariant-based reasoning for distributed algorithms in addition to it seems similar he has been dedicating most of his endeavor on prostelyzing TLA inwards recent years.

There are other successful model checkers (Spin, SMV, Promela), exactly TLA is to a greater extent than focused on supporting distributed algorithms reasoning. In addition, the PlusCal language (in the TLA+ toolkit) provides a high-level pseudo linguistic communication to write distributed algorithms easily.

How I went almost learning TLA

This was a straightforward in addition to slow process. This is the master copy page for TLA, where the other pages tin hold upward reached. To download the toolkit, I starting fourth dimension went to this page which forwards to this download page.

Then I downloaded the Hyperbook in addition to started next it. The chapters were all straightforward for me, because this is real similar to the cloth I learn inwards my 486/586 cast for invariant-based reasoning of distributed algorithms. The hyperbook has a lot of examples in addition to is the best house to start learning TLA.

For the PlusCal linguistic communication reference I downloaded this.

After I got the hang of it,  I decided to acquire my hands dingy amongst my ain toy programs. I wrote TLA+ specifications for some uncomplicated java edible bean problems.  Then using PlusCal, I wrote specifications for Dijkstra's stabilizing token band algorithm. First without using procedure abstraction, in addition to then amongst the procedure abstraction when I finished Chapter vii inwards Hyperbook. Finally I wrote specifications for Dijkstra's 3-state in addition to 4-state token band algorithms, which progressed real smoothly. Next, I volition purpose it on Paxos (here is a TLA+ specification of epaxos) in addition to my ain work.

Verdict

The guarded-command linguistic communication I purpose for educational activity 4/586 translates real easily to PlusCal, hence TLA+ is a expert check for my course. I volition start using it inwards my 4/586 cast this coming semester. I intend the students volition bask having hands-on experience amongst reasoning almost non-toy distributed protocols.

UPDATE

the AWS TLA+ article got my attending recently. The article talked almost how AWS successfully used invariant-based reasoning in addition to formal methods (in item TLA) for edifice robust distributed systems. TLA is a tool for specifying distributed algorithms/protocols in addition to model checking them. AWS used TLA inwards many fundamental projects: S3, DynamoDB, EBS, in addition to a distributed lock manager. Here is the technical written report past times AWS. It is a real expert read.

TLA+ is Leslie Lamport's brainchild. Of course of study you lot know Lamport if you lot are working on distributed systems. Lamport got a Turing observe inwards 2013; he is famous for logical clocks, Paxos, in addition to several other influential results inwards distributed systems. As a side-project, he wrote a wrapper some Knuth's TeX, called LaTeX ("La" for Lamport?), which is however the typesetting tool for almost all math/CSE academic papers. Lamport has ever been a theatre proponent of invariant-based reasoning for distributed algorithms in addition to it seems similar My experience amongst using TLA+ inwards distributed systems class

0 Response to "Using Tla+ For Didactics Distributed Systems"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel