SlideShare a Scribd company logo
1 of 42
Download to read offline
Distributed	
  Systems	
  
Rik	
  Sarkar	
  
	
  
University	
  of	
  Edinburgh	
  
Fall	
  2014	
  
Course	
  InformaAon	
  
•  Instructors:	
  
–  Rik	
  Sarkar 	
   	
   	
  (IF	
  3.45,	
  rsarkar@inf.ed.ac.uk)	
  
–  TA:	
  ValenAn	
  Radu	
  (v.radu@sms.ed.ac.uk)	
  
–  Marker:	
  Panagiota	
  katsikouli	
  
(p.katsikouli@sms.ed.ac.uk)	
  
•  Web	
  site:	
  
hRp://www.inf.ed.ac.uk/teaching/courses/ds	
  
	
  
•  Lectures:	
  
–  Monday,	
  Thursday	
  10:00-­‐10:50,	
  HRB,	
  Lecture	
  Theatre	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   2	
  
Exams	
  and	
  Assignments	
  
•  Grading:	
  	
  
–  Coursework:	
  1	
  assignment,	
  25%	
  
•  A	
  programming	
  component	
  (Not	
  pla]orm	
  spceific)	
  
•  Some	
  theory	
  problems	
  (Of	
  the	
  type	
  of	
  final	
  exam)	
  
–  Final	
  Exam:	
  75%	
  
	
  
•  Coursework	
  
–  To	
  be	
  announced	
  around	
  October	
  6	
  
–  Due	
  around	
  November	
  6	
  	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   3	
  
Reading	
  &	
  Books	
  
•  No	
  required	
  textbook	
  
•  Suggested	
  references:	
  
– Coulouris,	
  Dollimore,	
  Kindberg;	
  Distributed	
  
Systems:	
  Concepts	
  and	
  Design	
  
•  4th	
  EdiAon:	
  hRp://www.cdk4.net/wo	
  
•  5th	
  EdiAon:	
  hRp://www.cdk4.net/wo	
  	
  	
  
– Vijay	
  Garg;	
  Elements	
  of	
  Distributed	
  CompuAng	
  
– Nancy	
  Lynch;	
  Distributed	
  Algorithms	
  	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   4	
  
What	
  is	
  a	
  distributed	
  system?	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   5	
  
What	
  is	
  a	
  distributed	
  system?	
  
•  MulAple	
  computers	
  working	
  together	
  on	
  one	
  
task	
  
•  Computers	
  are	
  connected	
  by	
  a	
  network,	
  and	
  
exchange	
  informaAon	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   6	
  
What	
  is	
  a	
  distributed	
  system?	
  
•  MulAple	
  computers	
  working	
  together	
  on	
  one	
  
task	
  
•  Computers	
  are	
  connected	
  by	
  a	
  network,	
  and	
  
exchange	
  informaAon	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   7	
  
Networks	
  Vs	
  Distributed	
  Systems	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   8	
  
Networks	
  Vs	
  Distributed	
  Systems	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
  
	
  
data	
  transport	
  
rouAng	
  
	
  medium	
  access	
  	
  
Networks:	
  How	
  to	
  send	
  
messages	
  from	
  one	
  computer	
  to	
  
another	
  
ComputaAon	
  	
  
Using	
  many	
  computers	
  	
  
Sending	
  messages	
  to	
  
Each-­‐other	
  
Distributed	
  Systems:	
  how	
  to	
  
write	
  programs	
  that	
  use	
  the	
  
network	
  to	
  make	
  use	
  of	
  mulAple	
  
computers	
  
9	
  
Distributed	
  Systems:	
  Examples	
  
•  Web	
  browsing:	
  
	
  
	
  
	
   	
   	
  client 	
   	
   	
   	
   	
   	
   	
   	
   	
  server	
  
•  In	
  this	
  case:	
  
–  Client	
  requests	
  what	
  is	
  needed	
  
–  Server	
  computes	
  and	
  decides	
  what	
  is	
  to	
  be	
  shown	
  
–  Client	
  shows	
  informaAon	
  to	
  user	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   10	
  
Distributed	
  Systems:	
  Examples	
  
•  Mul:player	
  Games	
  
–  Different	
  players	
  are	
  doing	
  different	
  things	
  
–  Their	
  acAons	
  must	
  be	
  consistent	
  
•  Don’t	
  allow	
  one	
  person	
  to	
  be	
  at	
  different	
  locaAons	
  in	
  views	
  
of	
  different	
  people	
  
•  Don’t	
  let	
  two	
  people	
  stand	
  at	
  the	
  same	
  spot	
  
•  If	
  X	
  shoots	
  Y,	
  then	
  everyone	
  must	
  know	
  that	
  Y	
  is	
  dead	
  
–  Made	
  difficult	
  by	
  the	
  fact	
  that	
  players	
  are	
  on	
  different	
  
computers	
  
–  SomeAmes	
  network	
  may	
  be	
  slow	
  	
  
–  SomeAmes	
  messages	
  can	
  be	
  lost	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   11	
  
Distributed	
  Systems:	
  Examples	
  
•  Stock	
  markets:	
  Mul:player	
  
games	
  with	
  High	
  stakes!	
  
•  Everyone	
  wants	
  informaAon	
  
quickly	
  and	
  to	
  buy/sell	
  
without	
  delay	
  
•  Updates	
  must	
  be	
  sent	
  to	
  
many	
  clients	
  fast	
  
•  TransacAons	
  must	
  be	
  
executed	
  in	
  right	
  order	
  
•  Specialized	
  networks	
  worth	
  
millions	
  are	
  installed	
  to	
  
reduce	
  latency	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   12	
  
Distributed	
  Systems:	
  Examples	
  
•  Hadoop	
  
–  A	
  big	
  data	
  processing	
  framework	
  
–  Mapper	
  nodes	
  parAAon	
  data,	
  
reducer	
  nodes	
  process	
  data	
  by	
  
parAAons	
  
–  User	
  decides	
  parAAoning,	
  and	
  
processing	
  of	
  each	
  parAAon	
  
–  Hadoop	
  handles	
  tasks	
  of	
  moving	
  
data	
  from	
  node	
  to	
  node	
  
–  Hadoop/mapreduce	
  is	
  a	
  specific	
  
setup	
  for	
  distributed	
  processing	
  of	
  
data	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   13	
  
Distributed	
  Systems:	
  Examples	
  
•  Networks:	
  work	
  distributedly	
  
–  DNS:	
  what	
  is	
  the	
  IP	
  address	
  of	
  www.google.com	
  ?	
  
•  Search	
  local	
  DNS	
  server	
  (which	
  may	
  not	
  know	
  everything)	
  
•  It	
  contacts	
  higher	
  level	
  (non-­‐local)	
  DNS	
  servers	
  
•  IP	
  address	
  is	
  returned	
  to	
  user	
  
–  RouAng:	
  Send	
  message	
  to	
  IP	
  address	
  X	
  
•  Search	
  and	
  find	
  a	
  path	
  to	
  X	
  	
  
•  No	
  one	
  node	
  knows	
  the	
  enAre	
  network	
  
–  Medium	
  access:	
  many	
  nodes	
  using	
  the	
  same	
  access	
  point	
  
need	
  to	
  coordinate	
  their	
  transmissions	
  
•  When	
  two	
  people	
  speak	
  at	
  the	
  same	
  Ame,	
  communicaAon	
  gets	
  
garbled	
  
•  One	
  node	
  does	
  not	
  know	
  the	
  intenAons	
  of	
  others	
  	
  
•  CoordinaAon	
  is	
  needed	
  with	
  incomplete	
  informaAon	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   14	
  
Distributed	
  Systems:	
  Examples	
  
•  Main	
  issue	
  in	
  networking:	
  one	
  node	
  does	
  not	
  
have	
  complete	
  (global)	
  knowledge	
  of	
  the	
  rest	
  
of	
  the	
  network	
  
– Need	
  distributed	
  soluAons	
  –	
  network	
  protocols	
  
– Nodes	
  work	
  with	
  local	
  informaAon	
  
	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   15	
  
Distributed	
  Systems:	
  Examples	
  
•  Mobile	
  and	
  Sensor	
  Systems	
  
–  Mobile	
  phones	
  and	
  smart	
  sensors	
  are	
  
computers	
  
–  Opportunity	
  to	
  process	
  data	
  at	
  
sensors	
  instead	
  of	
  servers	
  
–  Distributed	
  networked	
  operaAon	
  
–  In	
  addiAon,	
  nodes	
  are	
  low	
  powered,	
  
baRery	
  operated	
  
–  Nodes	
  may	
  move	
  
•  Ubiquitous	
  compu:ng	
  &	
  Internet	
  of	
  
things	
  
–  Embedded	
  computers	
  are	
  
everywhere	
  in	
  the	
  environment	
  
–  We	
  can	
  use	
  them	
  to	
  process	
  data	
  
available	
  to	
  them	
  through	
  sensors,	
  
acAons	
  of	
  users,	
  etc.	
  	
  
–  Networking	
  and	
  distributed	
  
compuAng	
  everywhere	
  in	
  the	
  
environment	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   16	
  
Distributed	
  Systems:	
  Examples	
  
•  Autonomous	
  vehicles	
  
–  Computer	
  operated	
  vehicles,	
  
will	
  use	
  sensors	
  to	
  map	
  the	
  
environment	
  and	
  navigate	
  
–  Sensors	
  in	
  the	
  car,	
  in	
  the	
  
environment,	
  other	
  cars	
  
–  Need	
  to	
  communicate	
  and	
  
analyze	
  data	
  to	
  make	
  quick	
  
decisions	
  
–  Many	
  sensors	
  and	
  lots	
  of	
  
data	
  
–  Strict	
  consistency	
  rules	
  –	
  two	
  
cars	
  cannot	
  be	
  at	
  the	
  same	
  
spot	
  at	
  the	
  same	
  Ame!	
  
–  Need	
  very	
  fast	
  informaAon	
  
processing	
  
–  Nodes	
  are	
  mobile	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   17	
  
Challenges	
  in	
  Distributed	
  CompuAng	
  
•  Fundamental	
  issue:	
  Different	
  nodes	
  have	
  
different	
  knowledge.	
  One	
  node	
  does	
  know	
  the	
  
status	
  of	
  other	
  nodes	
  in	
  the	
  network	
  
•  If	
  each	
  node	
  knew	
  exactly	
  the	
  status	
  at	
  all	
  other	
  
nodes	
  in	
  the	
  network,	
  compuAng	
  would	
  be	
  easy.	
  
•  But	
  this	
  is	
  impossible,	
  theoreAcally	
  and	
  
pracAcally	
  
	
   Distributed	
  Systems,	
  Edinburgh,	
  2014	
   18	
  
TheoreAcal	
  issue:	
  Knowledge	
  cannot	
  
be	
  perfectly	
  up	
  to	
  date	
  
–  InformaAon	
  transmission	
  
is	
  bounded	
  by	
  speed	
  of	
  
light	
  (plus	
  hardware	
  and	
  
sorware	
  limitaAons	
  of	
  
the	
  nodes	
  &	
  network)	
  
–  New	
  things	
  can	
  happen	
  
while	
  informaAon	
  is	
  
traveling	
  from	
  node	
  A	
  to	
  
node	
  B	
  
–  B	
  can	
  never	
  be	
  perfectly	
  
up	
  to	
  date	
  about	
  the	
  
status	
  of	
  A	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   19	
  
A	
   B	
  
e1	
  
B	
  learns	
  	
  
about	
  e1	
  
Time	
   C	
  
e2	
  
e3	
  
PracAcal	
  challenges	
  in	
  distributed	
  
systems	
  
•  CommunicaAon	
  is	
  costly:	
  It	
  is	
  not	
  pracAcal	
  to	
  
transmit	
  everything	
  from	
  A	
  to	
  B	
  all	
  the	
  Ame	
  
•  There	
  are	
  many	
  nodes:	
  Transmisng	
  updates	
  
to	
  all	
  nodes	
  and	
  receiving	
  updates	
  from	
  all	
  
nodes	
  are	
  even	
  more	
  impracAcal	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   20	
  
•  The	
  criAcal	
  quesAon	
  in	
  distributed	
  systems:	
  
•  What	
  message/informaAon	
  to	
  send	
  to	
  which	
  
nodes,	
  and	
  when?	
  	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   21	
  
Example	
  1	
  
•  A	
  simple	
  distributed	
  computaAon:	
  
– Each	
  node	
  has	
  stored	
  a	
  numeric	
  value	
  
– Compute	
  the	
  total	
  of	
  these	
  numbers	
  
Server	
  
How	
  many	
  messages	
  	
  
does	
  it	
  take?	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   22	
  
Example	
  1	
  
•  A	
  simple	
  distributed	
  computaAon:	
  
– Each	
  node	
  has	
  stored	
  a	
  numeric	
  value	
  
– Compute	
  the	
  total	
  of	
  these	
  numbers	
  
Server	
  
4	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   23	
  
Example	
  2	
  
•  A	
  simple	
  distributed	
  computaAon:	
  
– Each	
  node	
  has	
  stored	
  a	
  numeric	
  value	
  
– Compute	
  the	
  total	
  of	
  the	
  numbers	
  
Server	
  
How	
  many	
  messages	
  	
  
does	
  it	
  take?	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   24	
  
Example	
  2	
  
•  A	
  simple	
  distributed	
  computaAon:	
  
– Each	
  node	
  has	
  stored	
  a	
  numeric	
  value	
  
– Compute	
  the	
  total	
  of	
  the	
  numbers	
  
Server	
  
Total:	
  10	
  
1	
   2	
   3	
   4	
  Number	
  of	
  messages:	
  	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   25	
  
•  Complexity	
  may	
  depend	
  on	
  the	
  Network	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   26	
  
Example	
  2	
  
•  A	
  simple	
  distributed	
  computaAon:	
  
– Each	
  node	
  has	
  stored	
  a	
  numeric	
  value	
  
– Compute	
  the	
  total	
  of	
  the	
  numbers	
  
Server	
  
Can	
  you	
  find	
  a	
  beRer,	
  more	
  efficient	
  way?	
  	
  
a	
   b	
   c	
   d	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   27	
  
Example	
  2	
  
•  A	
  simple	
  distributed	
  computaAon:	
  
– Each	
  node	
  has	
  stored	
  a	
  numeric	
  value	
  
– Compute	
  the	
  total	
  of	
  the	
  numbers	
  
Server	
   a	
   b	
   c	
   d	
  
v(d)	
  
V(c)	
  +v(d)	
  
v(b)+v(c)+v(d)	
  
v(a)+v(b)+v(c)+v(d)	
  
Cost:	
  4	
  messages	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   28	
  
PracAcal	
  challenges	
  in	
  distributed	
  
systems	
  
•  Time	
  cannot	
  be	
  measured	
  perfectly	
  
– Clocks	
  always	
  move	
  slightly	
  faster/slower;	
  speeds	
  
change	
  
– Hard	
  to	
  compare	
  before/arer	
  relaAons	
  between	
  
events	
  at	
  different	
  nodes	
  
– Makes	
  it	
  difficult	
  to	
  keep	
  causal	
  relaAons	
  correct	
  
– E.g.	
  In	
  a	
  mulA-­‐player	
  game,	
  two	
  players	
  fired	
  their	
  
guns.	
  Who	
  shot	
  first?	
  	
  
	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   29	
  
PracAcal	
  challenges	
  in	
  distributed	
  
systems	
  
•  Failures	
  
–  Some	
  nodes	
  may	
  fail	
  
–  Some	
  communicaAon	
  links	
  may	
  fail,	
  messages	
  get	
  lost	
  
–  We	
  need	
  systems	
  resilient	
  to	
  failures	
  –	
  it	
  should	
  
conAnue	
  to	
  work	
  even	
  if	
  some	
  nodes/links	
  fail,	
  or	
  at	
  
least	
  recover	
  from	
  failures	
  
–  E.g.	
  In	
  network	
  rouAng,	
  if	
  some	
  nodes	
  fail,	
  the	
  rouAng	
  
protocols	
  find	
  new	
  paths	
  to	
  the	
  desAnaAon	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   30	
  
PracAcal	
  challenges	
  in	
  distributed	
  
systems	
  
•  Mobility	
  
– Some	
  nodes	
  may	
  be	
  mobile	
  
– Not	
  easy	
  to	
  find	
  and	
  communicate	
  with	
  moving	
  
nodes	
  
– CommunicaAon	
  properAes,	
  delays,	
  message	
  loss	
  
rates	
  etc	
  change	
  with	
  changing	
  locaAons	
  
– LocaAons	
  of	
  nodes	
  are	
  important,	
  determine	
  their	
  
needs	
  and	
  preferences	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   31	
  
PracAcal	
  challenges	
  in	
  distributed	
  
systems	
  
•  Scalability	
  with	
  size	
  (number	
  of	
  nodes)	
  
–  Systems	
  may	
  need	
  to	
  grow	
  in	
  number	
  of	
  nodes	
  when	
  it	
  
has	
  to	
  handle	
  more	
  data	
  or	
  users	
  
–  The	
  design	
  should	
  easily	
  adapt	
  to	
  this	
  growth	
  and	
  not	
  get	
  
stuck	
  trying	
  to	
  handle	
  large	
  amounts	
  of	
  data	
  or	
  many	
  
nodes	
  
–  E.g.	
  In	
  a	
  mulAplayer	
  game	
  with	
  many	
  players,	
  if	
  all	
  acAons	
  
of	
  each	
  player	
  in	
  every	
  second	
  is	
  sent	
  to	
  all	
  other	
  players,	
  
this	
  will	
  generate	
  O(n2)	
  messages	
  every	
  second.	
  	
  
–  OpAons:	
  
•  Make	
  efficient	
  systems	
  that	
  can	
  handle	
  O(n^2)	
  messages	
  per	
  
second	
  (more	
  and	
  more	
  difficult	
  with	
  growing	
  n)	
  
•  Or,	
  make	
  clever	
  choices	
  of	
  which	
  messages	
  to	
  send	
  to	
  which	
  
players,	
  and	
  keep	
  it	
  manageable	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   32	
  
PracAcal	
  challenges	
  in	
  distributed	
  
systems	
  
•  Transparency	
  
– User	
  should	
  not	
  have	
  to	
  worry	
  about	
  details	
  
•  How	
  many	
  nodes	
  
•  How	
  they	
  are	
  connected	
  
•  LocaAons,	
  addresses	
  
•  mobility	
  
•  Failures	
  
•  concurrency	
  
•  Network	
  protocols	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   33	
  
PracAcal	
  challenges	
  in	
  distributed	
  
systems	
  
•  Security	
  
– ConfidenAality	
  –	
  only	
  authorized	
  users	
  can	
  access	
  
– Integrity	
  –	
  should	
  not	
  get	
  altered/corrupted	
  or	
  get	
  
into	
  an	
  undesirable	
  state	
  
– Availability	
  –	
  should	
  not	
  get	
  disrupted	
  by	
  enemies	
  
(e.g.	
  by	
  a	
  denial	
  of	
  service	
  aRack)	
  
– Perfect	
  security	
  is	
  impossible.	
  Good	
  pracAcal	
  
security	
  is	
  usually	
  possible,	
  but	
  takes	
  some	
  care	
  
and	
  effort.	
  EncrypAon	
  helps.	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   34	
  
Distributed	
  computaAons:	
  Examples	
  
•  Agreement	
  
– Get	
  nodes	
  to	
  agree	
  on	
  the	
  value	
  of	
  something	
  
•  When	
  should	
  we	
  go	
  to	
  the	
  movie?	
  
•  What	
  should	
  be	
  the	
  mulAplayer	
  strategy?	
  
•  When	
  should	
  we	
  sell	
  the	
  shares?	
  
•  …	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   35	
  
Distributed	
  computaAons:	
  Examples	
  
•  Leader	
  elecAon	
  
– Which	
  node	
  is	
  the	
  coordinator	
  in	
  hadoop?	
  
– Which	
  node	
  is	
  the	
  which	
  returns	
  the	
  final	
  result?	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   36	
  
Distributed	
  computaAons:	
  Examples	
  
•  Deciding	
  maRers	
  of	
  Ame:	
  
– What	
  happened	
  first?	
  A	
  or	
  B?	
  
– What	
  sequence	
  of	
  events	
  definitely	
  happened	
  and	
  
what	
  cannot	
  have	
  happened?	
  	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   37	
  
Distributed	
  computaAons:	
  Examples	
  
•  Store	
  and	
  retrieve	
  data	
  
– Peer	
  to	
  peer	
  systems	
  
– Sensor	
  networks	
  
	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   38	
  
Distributed	
  computaAons:	
  Examples	
  
•  AggregaAon:	
  gesng	
  data	
  from	
  many	
  nodes	
  
– What	
  is	
  the	
  average	
  temperature	
  recorded	
  by	
  the	
  
mobile	
  phones?	
  
– How	
  many	
  people	
  are	
  in	
  the	
  building?	
  
– What	
  is	
  the	
  maximum	
  speed	
  of	
  cars	
  on	
  the	
  
highway?	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   39	
  
Summary:	
  Distributed	
  Systems	
  
•  MulAple	
  computers	
  operaAng	
  by	
  sending	
  messages	
  to	
  
each	
  other	
  over	
  a	
  network	
  
•  Integral	
  to	
  many	
  emerging	
  trends	
  in	
  compuAng	
  
•  Reasons	
  for	
  distributed	
  systems:	
  
–  Tasks	
  get	
  done	
  faster	
  
–  Can	
  be	
  made	
  more	
  resilient:	
  If	
  one	
  computer	
  fails,	
  another	
  
takes	
  over	
  
–  Load	
  balancing	
  and	
  resource	
  sharing	
  
–  SomeAmes,	
  systems	
  are	
  inherently	
  distributed.	
  E.g.	
  people	
  
from	
  different	
  locaAons	
  collaboraAng	
  on	
  tasks,	
  playing	
  
games,	
  etc.	
  
–  Brings	
  out	
  many	
  natural	
  quesAons	
  about	
  how	
  natural	
  
world,	
  ecosystems,	
  economies,	
  emergent	
  behaviors	
  work	
  
•  Eg.	
  Birds	
  flocking,	
  fireflies	
  blinking	
  in	
  sync,	
  people	
  walking	
  without	
  
colliding,	
  economic	
  game	
  theory	
  and	
  equilibria…	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   40	
  
Summary:	
  Distributed	
  Systems	
  
•  Examples:	
  
–  Web	
  browsing	
  
–  MulAplayer	
  games	
  
–  Digital	
  (Stock)	
  markets	
  
–  CollaboraAve	
  ediAng	
  (Wikipedia,	
  reddit,	
  slashdot..)	
  
–  Big	
  data	
  processing	
  (hadoop	
  etc)	
  
–  Networks	
  
–  Mobile	
  and	
  sensor	
  systems	
  
–  Ubiquitous	
  compuAng	
  
–  Autonomous	
  vehicles	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   41	
  
Challenges	
  in	
  Distributed	
  system	
  
design	
  
•  Lack	
  of	
  global	
  knowledge	
  
•  No	
  perfect	
  (shared)	
  clock	
  
•  CommunicaAon	
  is	
  costly	
  in	
  large	
  volumes	
  
•  Failures	
  of	
  nodes/links,	
  loss	
  of	
  messages	
  
•  Scalability	
  
•  Transparency	
  
•  Security	
  
•  Mobility	
  
Distributed	
  Systems,	
  Edinburgh,	
  2014	
   42	
  

More Related Content

What's hot (17)

Computer Networks Lec#1
Computer Networks Lec#1Computer Networks Lec#1
Computer Networks Lec#1
 
Common Design Elements for Data Movement Eli Dart
Common Design Elements for Data Movement Eli DartCommon Design Elements for Data Movement Eli Dart
Common Design Elements for Data Movement Eli Dart
 
Msit computer networks 1
Msit computer networks 1Msit computer networks 1
Msit computer networks 1
 
Dc ch01 : data communications, data networks, and the internet
Dc ch01 : data communications, data networks, and the internetDc ch01 : data communications, data networks, and the internet
Dc ch01 : data communications, data networks, and the internet
 
Lecture 1 networking types roles
Lecture 1 networking types rolesLecture 1 networking types roles
Lecture 1 networking types roles
 
Network Topologies in Simple (Logical, Physical and Types)
Network Topologies in Simple (Logical, Physical and Types)Network Topologies in Simple (Logical, Physical and Types)
Network Topologies in Simple (Logical, Physical and Types)
 
Network Device
Network DeviceNetwork Device
Network Device
 
Peer to-peer networks
Peer to-peer networksPeer to-peer networks
Peer to-peer networks
 
Ch 15 .networks and communications
Ch 15 .networks and communicationsCh 15 .networks and communications
Ch 15 .networks and communications
 
Unit 4 Assignment 01
Unit 4 Assignment 01Unit 4 Assignment 01
Unit 4 Assignment 01
 
Networking
NetworkingNetworking
Networking
 
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 7 - Compute...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 7 - Compute...Understanding Computers: Today and Tomorrow, 13th Edition Chapter 7 - Compute...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 7 - Compute...
 
Computer communication network
Computer communication networkComputer communication network
Computer communication network
 
Lecture 1 an introduction to computer networks
Lecture 1  an introduction to computer networksLecture 1  an introduction to computer networks
Lecture 1 an introduction to computer networks
 
Ch04
Ch04Ch04
Ch04
 
Ch07
Ch07Ch07
Ch07
 
Ch01 ce
Ch01 ceCh01 ce
Ch01 ce
 

Viewers also liked

Chapter 10.slides
Chapter 10.slidesChapter 10.slides
Chapter 10.slideslara_ays
 
Introduction to distributed file systems
Introduction to distributed file systemsIntroduction to distributed file systems
Introduction to distributed file systemsViet-Trung TRAN
 
Distributed File Systems
Distributed File SystemsDistributed File Systems
Distributed File Systemsawesomesos
 
Chapter 8 distributed file systems
Chapter 8 distributed file systemsChapter 8 distributed file systems
Chapter 8 distributed file systemsAbDul ThaYyal
 
Distributed File System
Distributed File SystemDistributed File System
Distributed File SystemNtu
 
Unit 1 architecture of distributed systems
Unit 1 architecture of distributed systemsUnit 1 architecture of distributed systems
Unit 1 architecture of distributed systemskaran2190
 
Introduction to Peer-to-Peer Networks
Introduction to Peer-to-Peer Networks Introduction to Peer-to-Peer Networks
Introduction to Peer-to-Peer Networks Venkatesh Iyer
 
Peer-to-Peer Systems
Peer-to-Peer SystemsPeer-to-Peer Systems
Peer-to-Peer SystemsUwe Schmidt
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed SystemsRupsee
 
Distributed file system
Distributed file systemDistributed file system
Distributed file systemNaza hamed Jan
 

Viewers also liked (12)

Ch1
Ch1Ch1
Ch1
 
Chapter 10.slides
Chapter 10.slidesChapter 10.slides
Chapter 10.slides
 
Peer to peer system
Peer to peer systemPeer to peer system
Peer to peer system
 
Introduction to distributed file systems
Introduction to distributed file systemsIntroduction to distributed file systems
Introduction to distributed file systems
 
Distributed File Systems
Distributed File SystemsDistributed File Systems
Distributed File Systems
 
Chapter 8 distributed file systems
Chapter 8 distributed file systemsChapter 8 distributed file systems
Chapter 8 distributed file systems
 
Distributed File System
Distributed File SystemDistributed File System
Distributed File System
 
Unit 1 architecture of distributed systems
Unit 1 architecture of distributed systemsUnit 1 architecture of distributed systems
Unit 1 architecture of distributed systems
 
Introduction to Peer-to-Peer Networks
Introduction to Peer-to-Peer Networks Introduction to Peer-to-Peer Networks
Introduction to Peer-to-Peer Networks
 
Peer-to-Peer Systems
Peer-to-Peer SystemsPeer-to-Peer Systems
Peer-to-Peer Systems
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
 

Similar to Intro

Comptia Security + Chapter 1 601
Comptia Security           + Chapter 1 601Comptia Security           + Chapter 1 601
Comptia Security + Chapter 1 601AbdulalimBhnsawy
 
ENC 254_PPT_ch01.pptx
ENC 254_PPT_ch01.pptxENC 254_PPT_ch01.pptx
ENC 254_PPT_ch01.pptxshaker402
 
Computer network coe351- part1- final
Computer network coe351- part1- finalComputer network coe351- part1- final
Computer network coe351- part1- finalTaymoor Nazmy
 
CNE CHP1.pdf
CNE CHP1.pdfCNE CHP1.pdf
CNE CHP1.pdfNehaam3
 
Computer Networks.pptx
Computer Networks.pptxComputer Networks.pptx
Computer Networks.pptxLuckyGoyal23
 
Introduction to Network Devices & Addressing Schemes
Introduction to Network Devices &  Addressing SchemesIntroduction to Network Devices &  Addressing Schemes
Introduction to Network Devices & Addressing SchemesMuhammadRizaHilmi
 
UNIT I DIS.pptx
UNIT I DIS.pptxUNIT I DIS.pptx
UNIT I DIS.pptxSamPrem3
 
data communication and Network.ppt
data communication and Network.pptdata communication and Network.ppt
data communication and Network.pptGetachewDires1
 
Uc14 chap07
Uc14 chap07Uc14 chap07
Uc14 chap07ayahye
 
Concepts of Distributed Computing & Cloud Computing
Concepts of Distributed Computing & Cloud Computing Concepts of Distributed Computing & Cloud Computing
Concepts of Distributed Computing & Cloud Computing Hitesh Kumar Markam
 
_Cloud_Computing_Overview.pdf
_Cloud_Computing_Overview.pdf_Cloud_Computing_Overview.pdf
_Cloud_Computing_Overview.pdfTyStrk
 
Week 1 Lecture_1-5 CC_watermark.pdf
Week 1 Lecture_1-5 CC_watermark.pdfWeek 1 Lecture_1-5 CC_watermark.pdf
Week 1 Lecture_1-5 CC_watermark.pdfJohn422973
 

Similar to Intro (20)

Comptia Security + Chapter 1 601
Comptia Security           + Chapter 1 601Comptia Security           + Chapter 1 601
Comptia Security + Chapter 1 601
 
data communication
data communicationdata communication
data communication
 
ENC 254_PPT_ch01.pptx
ENC 254_PPT_ch01.pptxENC 254_PPT_ch01.pptx
ENC 254_PPT_ch01.pptx
 
Computer network coe351- part1- final
Computer network coe351- part1- finalComputer network coe351- part1- final
Computer network coe351- part1- final
 
networking
networking networking
networking
 
CNE CHP1.pdf
CNE CHP1.pdfCNE CHP1.pdf
CNE CHP1.pdf
 
Computer Networks.pptx
Computer Networks.pptxComputer Networks.pptx
Computer Networks.pptx
 
Osi model
Osi modelOsi model
Osi model
 
Introduction to Network Devices & Addressing Schemes
Introduction to Network Devices &  Addressing SchemesIntroduction to Network Devices &  Addressing Schemes
Introduction to Network Devices & Addressing Schemes
 
Application Layer
Application LayerApplication Layer
Application Layer
 
UNIT I DIS.pptx
UNIT I DIS.pptxUNIT I DIS.pptx
UNIT I DIS.pptx
 
chapter 2 architecture
chapter 2 architecturechapter 2 architecture
chapter 2 architecture
 
data communication and Network.ppt
data communication and Network.pptdata communication and Network.ppt
data communication and Network.ppt
 
Uc14 chap07
Uc14 chap07Uc14 chap07
Uc14 chap07
 
Uc14 chap07
Uc14 chap07Uc14 chap07
Uc14 chap07
 
Ch06
Ch06Ch06
Ch06
 
Concepts of Distributed Computing & Cloud Computing
Concepts of Distributed Computing & Cloud Computing Concepts of Distributed Computing & Cloud Computing
Concepts of Distributed Computing & Cloud Computing
 
Networking lecture1
Networking lecture1Networking lecture1
Networking lecture1
 
_Cloud_Computing_Overview.pdf
_Cloud_Computing_Overview.pdf_Cloud_Computing_Overview.pdf
_Cloud_Computing_Overview.pdf
 
Week 1 Lecture_1-5 CC_watermark.pdf
Week 1 Lecture_1-5 CC_watermark.pdfWeek 1 Lecture_1-5 CC_watermark.pdf
Week 1 Lecture_1-5 CC_watermark.pdf
 

Recently uploaded

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Recently uploaded (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

Intro

  • 1. Distributed  Systems   Rik  Sarkar     University  of  Edinburgh   Fall  2014  
  • 2. Course  InformaAon   •  Instructors:   –  Rik  Sarkar      (IF  3.45,  rsarkar@inf.ed.ac.uk)   –  TA:  ValenAn  Radu  (v.radu@sms.ed.ac.uk)   –  Marker:  Panagiota  katsikouli   (p.katsikouli@sms.ed.ac.uk)   •  Web  site:   hRp://www.inf.ed.ac.uk/teaching/courses/ds     •  Lectures:   –  Monday,  Thursday  10:00-­‐10:50,  HRB,  Lecture  Theatre   Distributed  Systems,  Edinburgh,  2014   2  
  • 3. Exams  and  Assignments   •  Grading:     –  Coursework:  1  assignment,  25%   •  A  programming  component  (Not  pla]orm  spceific)   •  Some  theory  problems  (Of  the  type  of  final  exam)   –  Final  Exam:  75%     •  Coursework   –  To  be  announced  around  October  6   –  Due  around  November  6     Distributed  Systems,  Edinburgh,  2014   3  
  • 4. Reading  &  Books   •  No  required  textbook   •  Suggested  references:   – Coulouris,  Dollimore,  Kindberg;  Distributed   Systems:  Concepts  and  Design   •  4th  EdiAon:  hRp://www.cdk4.net/wo   •  5th  EdiAon:  hRp://www.cdk4.net/wo       – Vijay  Garg;  Elements  of  Distributed  CompuAng   – Nancy  Lynch;  Distributed  Algorithms     Distributed  Systems,  Edinburgh,  2014   4  
  • 5. What  is  a  distributed  system?   Distributed  Systems,  Edinburgh,  2014   5  
  • 6. What  is  a  distributed  system?   •  MulAple  computers  working  together  on  one   task   •  Computers  are  connected  by  a  network,  and   exchange  informaAon   Distributed  Systems,  Edinburgh,  2014   6  
  • 7. What  is  a  distributed  system?   •  MulAple  computers  working  together  on  one   task   •  Computers  are  connected  by  a  network,  and   exchange  informaAon   Distributed  Systems,  Edinburgh,  2014   7  
  • 8. Networks  Vs  Distributed  Systems   Distributed  Systems,  Edinburgh,  2014   8  
  • 9. Networks  Vs  Distributed  Systems   Distributed  Systems,  Edinburgh,  2014     data  transport   rouAng    medium  access     Networks:  How  to  send   messages  from  one  computer  to   another   ComputaAon     Using  many  computers     Sending  messages  to   Each-­‐other   Distributed  Systems:  how  to   write  programs  that  use  the   network  to  make  use  of  mulAple   computers   9  
  • 10. Distributed  Systems:  Examples   •  Web  browsing:            client                  server   •  In  this  case:   –  Client  requests  what  is  needed   –  Server  computes  and  decides  what  is  to  be  shown   –  Client  shows  informaAon  to  user   Distributed  Systems,  Edinburgh,  2014   10  
  • 11. Distributed  Systems:  Examples   •  Mul:player  Games   –  Different  players  are  doing  different  things   –  Their  acAons  must  be  consistent   •  Don’t  allow  one  person  to  be  at  different  locaAons  in  views   of  different  people   •  Don’t  let  two  people  stand  at  the  same  spot   •  If  X  shoots  Y,  then  everyone  must  know  that  Y  is  dead   –  Made  difficult  by  the  fact  that  players  are  on  different   computers   –  SomeAmes  network  may  be  slow     –  SomeAmes  messages  can  be  lost   Distributed  Systems,  Edinburgh,  2014   11  
  • 12. Distributed  Systems:  Examples   •  Stock  markets:  Mul:player   games  with  High  stakes!   •  Everyone  wants  informaAon   quickly  and  to  buy/sell   without  delay   •  Updates  must  be  sent  to   many  clients  fast   •  TransacAons  must  be   executed  in  right  order   •  Specialized  networks  worth   millions  are  installed  to   reduce  latency   Distributed  Systems,  Edinburgh,  2014   12  
  • 13. Distributed  Systems:  Examples   •  Hadoop   –  A  big  data  processing  framework   –  Mapper  nodes  parAAon  data,   reducer  nodes  process  data  by   parAAons   –  User  decides  parAAoning,  and   processing  of  each  parAAon   –  Hadoop  handles  tasks  of  moving   data  from  node  to  node   –  Hadoop/mapreduce  is  a  specific   setup  for  distributed  processing  of   data   Distributed  Systems,  Edinburgh,  2014   13  
  • 14. Distributed  Systems:  Examples   •  Networks:  work  distributedly   –  DNS:  what  is  the  IP  address  of  www.google.com  ?   •  Search  local  DNS  server  (which  may  not  know  everything)   •  It  contacts  higher  level  (non-­‐local)  DNS  servers   •  IP  address  is  returned  to  user   –  RouAng:  Send  message  to  IP  address  X   •  Search  and  find  a  path  to  X     •  No  one  node  knows  the  enAre  network   –  Medium  access:  many  nodes  using  the  same  access  point   need  to  coordinate  their  transmissions   •  When  two  people  speak  at  the  same  Ame,  communicaAon  gets   garbled   •  One  node  does  not  know  the  intenAons  of  others     •  CoordinaAon  is  needed  with  incomplete  informaAon   Distributed  Systems,  Edinburgh,  2014   14  
  • 15. Distributed  Systems:  Examples   •  Main  issue  in  networking:  one  node  does  not   have  complete  (global)  knowledge  of  the  rest   of  the  network   – Need  distributed  soluAons  –  network  protocols   – Nodes  work  with  local  informaAon     Distributed  Systems,  Edinburgh,  2014   15  
  • 16. Distributed  Systems:  Examples   •  Mobile  and  Sensor  Systems   –  Mobile  phones  and  smart  sensors  are   computers   –  Opportunity  to  process  data  at   sensors  instead  of  servers   –  Distributed  networked  operaAon   –  In  addiAon,  nodes  are  low  powered,   baRery  operated   –  Nodes  may  move   •  Ubiquitous  compu:ng  &  Internet  of   things   –  Embedded  computers  are   everywhere  in  the  environment   –  We  can  use  them  to  process  data   available  to  them  through  sensors,   acAons  of  users,  etc.     –  Networking  and  distributed   compuAng  everywhere  in  the   environment   Distributed  Systems,  Edinburgh,  2014   16  
  • 17. Distributed  Systems:  Examples   •  Autonomous  vehicles   –  Computer  operated  vehicles,   will  use  sensors  to  map  the   environment  and  navigate   –  Sensors  in  the  car,  in  the   environment,  other  cars   –  Need  to  communicate  and   analyze  data  to  make  quick   decisions   –  Many  sensors  and  lots  of   data   –  Strict  consistency  rules  –  two   cars  cannot  be  at  the  same   spot  at  the  same  Ame!   –  Need  very  fast  informaAon   processing   –  Nodes  are  mobile   Distributed  Systems,  Edinburgh,  2014   17  
  • 18. Challenges  in  Distributed  CompuAng   •  Fundamental  issue:  Different  nodes  have   different  knowledge.  One  node  does  know  the   status  of  other  nodes  in  the  network   •  If  each  node  knew  exactly  the  status  at  all  other   nodes  in  the  network,  compuAng  would  be  easy.   •  But  this  is  impossible,  theoreAcally  and   pracAcally     Distributed  Systems,  Edinburgh,  2014   18  
  • 19. TheoreAcal  issue:  Knowledge  cannot   be  perfectly  up  to  date   –  InformaAon  transmission   is  bounded  by  speed  of   light  (plus  hardware  and   sorware  limitaAons  of   the  nodes  &  network)   –  New  things  can  happen   while  informaAon  is   traveling  from  node  A  to   node  B   –  B  can  never  be  perfectly   up  to  date  about  the   status  of  A   Distributed  Systems,  Edinburgh,  2014   19   A   B   e1   B  learns     about  e1   Time   C   e2   e3  
  • 20. PracAcal  challenges  in  distributed   systems   •  CommunicaAon  is  costly:  It  is  not  pracAcal  to   transmit  everything  from  A  to  B  all  the  Ame   •  There  are  many  nodes:  Transmisng  updates   to  all  nodes  and  receiving  updates  from  all   nodes  are  even  more  impracAcal   Distributed  Systems,  Edinburgh,  2014   20  
  • 21. •  The  criAcal  quesAon  in  distributed  systems:   •  What  message/informaAon  to  send  to  which   nodes,  and  when?     Distributed  Systems,  Edinburgh,  2014   21  
  • 22. Example  1   •  A  simple  distributed  computaAon:   – Each  node  has  stored  a  numeric  value   – Compute  the  total  of  these  numbers   Server   How  many  messages     does  it  take?   Distributed  Systems,  Edinburgh,  2014   22  
  • 23. Example  1   •  A  simple  distributed  computaAon:   – Each  node  has  stored  a  numeric  value   – Compute  the  total  of  these  numbers   Server   4   Distributed  Systems,  Edinburgh,  2014   23  
  • 24. Example  2   •  A  simple  distributed  computaAon:   – Each  node  has  stored  a  numeric  value   – Compute  the  total  of  the  numbers   Server   How  many  messages     does  it  take?   Distributed  Systems,  Edinburgh,  2014   24  
  • 25. Example  2   •  A  simple  distributed  computaAon:   – Each  node  has  stored  a  numeric  value   – Compute  the  total  of  the  numbers   Server   Total:  10   1   2   3   4  Number  of  messages:     Distributed  Systems,  Edinburgh,  2014   25  
  • 26. •  Complexity  may  depend  on  the  Network   Distributed  Systems,  Edinburgh,  2014   26  
  • 27. Example  2   •  A  simple  distributed  computaAon:   – Each  node  has  stored  a  numeric  value   – Compute  the  total  of  the  numbers   Server   Can  you  find  a  beRer,  more  efficient  way?     a   b   c   d   Distributed  Systems,  Edinburgh,  2014   27  
  • 28. Example  2   •  A  simple  distributed  computaAon:   – Each  node  has  stored  a  numeric  value   – Compute  the  total  of  the  numbers   Server   a   b   c   d   v(d)   V(c)  +v(d)   v(b)+v(c)+v(d)   v(a)+v(b)+v(c)+v(d)   Cost:  4  messages   Distributed  Systems,  Edinburgh,  2014   28  
  • 29. PracAcal  challenges  in  distributed   systems   •  Time  cannot  be  measured  perfectly   – Clocks  always  move  slightly  faster/slower;  speeds   change   – Hard  to  compare  before/arer  relaAons  between   events  at  different  nodes   – Makes  it  difficult  to  keep  causal  relaAons  correct   – E.g.  In  a  mulA-­‐player  game,  two  players  fired  their   guns.  Who  shot  first?       Distributed  Systems,  Edinburgh,  2014   29  
  • 30. PracAcal  challenges  in  distributed   systems   •  Failures   –  Some  nodes  may  fail   –  Some  communicaAon  links  may  fail,  messages  get  lost   –  We  need  systems  resilient  to  failures  –  it  should   conAnue  to  work  even  if  some  nodes/links  fail,  or  at   least  recover  from  failures   –  E.g.  In  network  rouAng,  if  some  nodes  fail,  the  rouAng   protocols  find  new  paths  to  the  desAnaAon   Distributed  Systems,  Edinburgh,  2014   30  
  • 31. PracAcal  challenges  in  distributed   systems   •  Mobility   – Some  nodes  may  be  mobile   – Not  easy  to  find  and  communicate  with  moving   nodes   – CommunicaAon  properAes,  delays,  message  loss   rates  etc  change  with  changing  locaAons   – LocaAons  of  nodes  are  important,  determine  their   needs  and  preferences   Distributed  Systems,  Edinburgh,  2014   31  
  • 32. PracAcal  challenges  in  distributed   systems   •  Scalability  with  size  (number  of  nodes)   –  Systems  may  need  to  grow  in  number  of  nodes  when  it   has  to  handle  more  data  or  users   –  The  design  should  easily  adapt  to  this  growth  and  not  get   stuck  trying  to  handle  large  amounts  of  data  or  many   nodes   –  E.g.  In  a  mulAplayer  game  with  many  players,  if  all  acAons   of  each  player  in  every  second  is  sent  to  all  other  players,   this  will  generate  O(n2)  messages  every  second.     –  OpAons:   •  Make  efficient  systems  that  can  handle  O(n^2)  messages  per   second  (more  and  more  difficult  with  growing  n)   •  Or,  make  clever  choices  of  which  messages  to  send  to  which   players,  and  keep  it  manageable   Distributed  Systems,  Edinburgh,  2014   32  
  • 33. PracAcal  challenges  in  distributed   systems   •  Transparency   – User  should  not  have  to  worry  about  details   •  How  many  nodes   •  How  they  are  connected   •  LocaAons,  addresses   •  mobility   •  Failures   •  concurrency   •  Network  protocols   Distributed  Systems,  Edinburgh,  2014   33  
  • 34. PracAcal  challenges  in  distributed   systems   •  Security   – ConfidenAality  –  only  authorized  users  can  access   – Integrity  –  should  not  get  altered/corrupted  or  get   into  an  undesirable  state   – Availability  –  should  not  get  disrupted  by  enemies   (e.g.  by  a  denial  of  service  aRack)   – Perfect  security  is  impossible.  Good  pracAcal   security  is  usually  possible,  but  takes  some  care   and  effort.  EncrypAon  helps.   Distributed  Systems,  Edinburgh,  2014   34  
  • 35. Distributed  computaAons:  Examples   •  Agreement   – Get  nodes  to  agree  on  the  value  of  something   •  When  should  we  go  to  the  movie?   •  What  should  be  the  mulAplayer  strategy?   •  When  should  we  sell  the  shares?   •  …   Distributed  Systems,  Edinburgh,  2014   35  
  • 36. Distributed  computaAons:  Examples   •  Leader  elecAon   – Which  node  is  the  coordinator  in  hadoop?   – Which  node  is  the  which  returns  the  final  result?   Distributed  Systems,  Edinburgh,  2014   36  
  • 37. Distributed  computaAons:  Examples   •  Deciding  maRers  of  Ame:   – What  happened  first?  A  or  B?   – What  sequence  of  events  definitely  happened  and   what  cannot  have  happened?     Distributed  Systems,  Edinburgh,  2014   37  
  • 38. Distributed  computaAons:  Examples   •  Store  and  retrieve  data   – Peer  to  peer  systems   – Sensor  networks     Distributed  Systems,  Edinburgh,  2014   38  
  • 39. Distributed  computaAons:  Examples   •  AggregaAon:  gesng  data  from  many  nodes   – What  is  the  average  temperature  recorded  by  the   mobile  phones?   – How  many  people  are  in  the  building?   – What  is  the  maximum  speed  of  cars  on  the   highway?   Distributed  Systems,  Edinburgh,  2014   39  
  • 40. Summary:  Distributed  Systems   •  MulAple  computers  operaAng  by  sending  messages  to   each  other  over  a  network   •  Integral  to  many  emerging  trends  in  compuAng   •  Reasons  for  distributed  systems:   –  Tasks  get  done  faster   –  Can  be  made  more  resilient:  If  one  computer  fails,  another   takes  over   –  Load  balancing  and  resource  sharing   –  SomeAmes,  systems  are  inherently  distributed.  E.g.  people   from  different  locaAons  collaboraAng  on  tasks,  playing   games,  etc.   –  Brings  out  many  natural  quesAons  about  how  natural   world,  ecosystems,  economies,  emergent  behaviors  work   •  Eg.  Birds  flocking,  fireflies  blinking  in  sync,  people  walking  without   colliding,  economic  game  theory  and  equilibria…   Distributed  Systems,  Edinburgh,  2014   40  
  • 41. Summary:  Distributed  Systems   •  Examples:   –  Web  browsing   –  MulAplayer  games   –  Digital  (Stock)  markets   –  CollaboraAve  ediAng  (Wikipedia,  reddit,  slashdot..)   –  Big  data  processing  (hadoop  etc)   –  Networks   –  Mobile  and  sensor  systems   –  Ubiquitous  compuAng   –  Autonomous  vehicles   Distributed  Systems,  Edinburgh,  2014   41  
  • 42. Challenges  in  Distributed  system   design   •  Lack  of  global  knowledge   •  No  perfect  (shared)  clock   •  CommunicaAon  is  costly  in  large  volumes   •  Failures  of  nodes/links,  loss  of  messages   •  Scalability   •  Transparency   •  Security   •  Mobility   Distributed  Systems,  Edinburgh,  2014   42