02 Modelling PDF
02 Modelling PDF
Application
GUI Data
services
Client DBMS
Component Component Component
N tiers
Modelling distributed systems 12
this is based on Client-Server architecture
• Fundamental difference:
• What’s changed:
– End-host resources have increased dramatically
– Broadband connectivity now common
Modelling distributed systems 19
each object has its data
Repository
• Data sharing model proposed in the 80s by Carriero and Gelernter, mostly
used for parallel computation
• Recently revitalized in the context of distributed computing
– E.g., IBM TSpaces, Sun JavaSpaces, GigaSpaces
• Communication is persistent, implicit, content-based, generative
• High degree of decoupling Workers
in(p)
< Japan, Kyoto >
rd(p) out(t)
< USA, Los Angeles >
< Italy, Milan >
< USA, St. Louis >
Tuple Space
Modelling distributed systems 22
• Data is contained in ordered sequences of typed fields (tuples)
• Tuples are stored in a persistent, global shared space (tuple space)
• Standard operations:
– out(t): writes the tuple t in the tuple space
– rd(p): returns a copy of a tuple matching the pattern (or template) p, if it exists; blocks
waiting for a matching tuple otherwise
• If many matching tuples exist, one is chosen non-deterministically
– in(p): like rd(p), but withdraws the matching tuple from the tuple space
– Some implementations provide also an eval(a), which inserts the tuple generated by
the execution of a process a
• Many variants:
– Asynchronous, non-blocking primitives (probes): rdp(p) and inp(p)
• Return immediately a null value if the matching tuple is not found
– Bulk primitives: e.g., rdg(p)
– …
• Some of the non-standard primitives have non-trivial distributed
implementations
– E.g., if atomicity is to be preserved, probes require a distributed transaction
fire alarm at
1st floor
Modelling distributed systems 25
we transfer only code or (code and data)
Host A Host B
Remote evaluation
Client-Server A send to B the code, B has all the rest
(not secure is A send malicious code to
PLEASE, MAKE ME A
CHOCOLATE CAKE.
HERE IS THE RECIPE:
PLEASE, MAKE ME TAKE TWO EGGS... B)
A CHOCOLATE CAKE
A Request B A Request B
Reply Reply
Site A Site B Site A Site B
A ask to B for the code, and has everything (not used) A send to B
PLEASE, TELL
else needed HERE I AM! the code and the data
ME THE RECIPE
CAN I USE YOUR
OVEN?
A Request B A Migration
Reply
Site A Site B Site A Site B
e ee
e
• The pepperland divisions are safe as long as they remain in their encampments
• If both charge at the same time they win, otherwise they loose
• Generals need to agree on:
– Who will lead the charge
– When the charge will take place
• We consider the case when messengers are able to walk from an hill to another
without being captured by the enemies
• Processes: fail stop (other processes may detect certainly the failure) vs. Crash
• Channels: send omission, channel omission, receive omission
The process start doing something different, for
– Byzantine (or arbitrary) failures example because of a virus
different from a bug
• Processes: may omit intended processing steps or add more
• Channels: message content may be corrupted, non-existent messages may be
delivered, or real messages may be delivered more than once
– Timing failures (apply to synchronous systems, only)
• Occur when one of the time limits defined for the system is violated
Processes are used to omission failures (crash), for channel it's easier to send another packet (byzantine failure).
Byzantine failures are not the problems for network, cause we have an easy way to control it: checksum. If the checksum of the packet is wrong
then we refuse the packet. It then becomes an omission failure. This process is done at level 2 of network. (with a very good probability).
There is no way to do this for processes but they are very rare in the hardware (my pc).