Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

Distributed Systems

Research Group

Distributed Systems Course


Labs Presentation
What are the labs about?

• Apply and implement the concepts you will see


during the lectures
• In Python
• Groups of 2
• Over an emulated, distributed infrastructure

• The goal: a resource-efficient, fault-tolerant,


consistent data storage (a.k.a. a distributed
blackboard)
• Each lab adds new features / concepts
• + At the end, you create your own project from scratch

Distributed Systems 2
Where do you get information

• All information & news -> iLearn


• Please mail me if you do not have access
• Deadlines & News -> “Course Schedule, Lecture Notes, and News”

• Weekly Q&A -> Zoom


• Thursday, 14:15 - 15:45
• Non-mandatory to join, for you to ask questions (about the labs!)
• Link given on iLearn

• Please form groups of 2 in iLearn!

Distributed Systems 3
Timeplan (iLearn contains the most up-to-date version)

Distributed Systems 4
In a nutshell
• Prelab (1.5 week)
• Learn the basics of Python
• setup your environment

• Labs 1 to 3 Project
• Three labs, build a distributed Lab 4
system, and improve it everytime Lab 3
• Lab 1: basic distributed blackboard
Lab 2
(2 weeks)
• Lab 2: Centralized blackboard (3 Lab 1
weeks) Prelab (Setup environment)
• Lab 3: Eventually consistent
blackboard

Distributed Systems 5
In a nutshell
Then, you must choose between Lab 4 or
a Project
• The project is more work, but gives
more points!
• Remember, lab points can help
you improve your final grade
Project
Lab 4
• Lab 4
• Byzantine fault-tolerance Lab 3
• 2 weeks, 10 pts max Lab 2

Lab 1
• Project
Prelab (Setup environment)
• You propose and work on your own
system
• 3 weeks, 20 pts max

Distributed Systems 6
How to pass the labs?

• You must submit a solution for each exercise


• Submit Prelab + Lab1 + Lab2 + Lab3
• + {Submit Lab4 OR submit a Project}

• You need more than 50% of the points


• One lab is 10 points
• Project is 20 points
• Required: 26 / 50
10 pts
10 pts 10 pts 10 pts Lab 4
Prelab Lab 1 Lab 2 Lab 3 20 pts
Project
Required to pass (26 / 50) Total
Distributed Systems 7
In a nutshell – the labs
• Design and implement a distributed
system

• RESTful distributed blackboard


• Clients send notes/messages to any server
• Servers do distributed systems magic to
provide a reliable, consistent, efficient, fault-
tolerant service
• Clients from all other the world should see Ite
m
the same result on all servers! 1

Di s p l

Items 1
Item
:
ay?
• In short, we apply and implement the
concepts you’ll see in the lectures

Distributed Systems 8
How we will do it

• Incremental steps
Lab 1 – naïve
make it work

• Explore different design choices Lab 2 – centralized


strong consistency

• Make your code base grow Lab 3 – leaderless


eventual consistency
• Learn your lessons on the way

Lab 4 – byzantine fault-tolerant Project – Your own system!


You define your goals and implement your
resilient to malicious servers project

Distributed Systems 9
How we will do it

User

Can interact with any server

Your python code Your python code Your python code


Goes over an unreliable network

Network Emulator
(delays, losses, etc.)

• We will use mininet as network emulator

Distributed Systems 10
Distributed Systems
Research Group

Labs Deliverables
What you NEED to give/show us
(Prelab deliverable is described in prelab)
(Project deliverables will be explained later)
Deliverables

• Your implementation
• Including any script you used to test consistency! iLearn
• Must be commented and understandable!
• Upload it on iLearn

• A video of your work


• Around 5 minutes (max 10)
• Use slides (you can use figures, screenshots, CAU-Cloud
videos…)
• Main focus: Design, Demo, Evaluation
• Upload on CAU-Cloud (link given in iLearn)
• All videos will be available to all members
• we will share the best videos to help struggling groups
Distributed Systems 12
Your code
• I should be able to run it

• I should be able to understand what you do just by looking at it


• Use sensible naming for variables & functions

• For the most complex parts, explain what you do


• Use comments!

• If you use scripts to unit-test your code, please include them

• Scripts to parse & plot your data is not mandatory

Distributed Systems 13
Video – Design & Demo
• Explain what concepts / algorithms you used
• Why did you choose this one instead of another?
• What are the pros/cons?
• You can use slides and diagrams to explain things, if your algorithm is not
studied in the course

• Provide a short demo of your system


• Add/modify/delete elements on one machine, does it work on another?

• What are typical corner cases? Would your system survive them?
• Concurrent write, modify, delete
• Delayed write, modify, delete
• Out of order write, modify, delete
• Lost write, modify, delete

Distributed Systems 14
Video – Evaluation
• How well does your system perform?
• Here, I do not want to see if your system works (it should, at this point), but rather how well

• If I input 50 requests on each machine, how long until the last machine receives
the last request?

• How long does it take with 3 machines, 5? 10?

• Are the results different if you run your test 5 times?

Distributed Systems 15
Distributed Systems
Research Group

Mininet
The platform
Mininet
• Network emulator
• Emulate hosts (machines), switches, controllers, and network links
• All of that, on one PC!

• Often used in research


• Especially in computer networking

• Can handle large scale networks


• If your machine is powerful enough

Distributed Systems 17
Mininet: How does it work?
• Container-based virtualization

• Nodes are emulated as a UNIX OS (Linux)


process
• Cannot access any other processes Mininet Emulation
locally
• webserver on machine 1 does not share
memory with webserver on machine 2
• Run on an emulated network
• With latency, packet drops, …!
• Use the host network stack
• Real IP, real TCP!

Distributed Systems 18
Very Simple Network using Lightweight Virtualization

firefox httpd

10.1.0.1 10.1.0.2
eth0 eth0
Network Namespace 1 Network Namespace 2
veth1 veth2
ovs-vswitchd
Linux Kernel openvswitch kernel module

Server (or VM!)

Credits: SIGCOMM 2014 tutorial Distributed Systems 19


Mechanism: Network Namespaces and Virtual Ethernet Pairs

firefox httpd

10.1.0.1 10.1.0.2
eth0 eth0
Network Namespace 1 Network Namespace 2
virtual Ethernet pairs

veth1 veth2

Software
Switch
Root Namespace

Credits: SIGCOMM 2014 tutorial Distributed Systems 20


Some basic commands to test
• Running tests
• pingall
• iperf
• h1 ping h2
• h1 ifconfig
• h1 xterm
• opens a terminal on the machine called h1
• very useful to start a server yourself!
• Stopping the network
• exit
• Your network crashed?
• sudo mn –c
• Will clear all mininet files

Distributed Systems 21
Some useful links

• How to install mininet http://mininet.org/download/

• Walkthrough from the basic commands to custom scripts


http://mininet.org/walkthrough/

• SIGCOMM 2014 tutorial


• https://docs.google.com/a/onlab.us/presentation/d/1Xtp05lLQTEFGICT
xzV9sQl28wW_cAZz6B1q9_qZBR_8/edit

• Some code examples (advanced):


https://github.com/mininet/mininet/tree/master/examples
Distributed Systems 22
Distributed Systems
Research Group

Goto Lab 1
Prelab deadline:
Thursday 12th, November
Credits – based on slides from
• Beshr Al Nahas
• Charalampos Stylianopoulos
• Olaf Landsiedel
• Christos Profentzas
• Iosif Salem
• Ioannis Nikolakopoulos
• And many others

Distributed Systems 24

You might also like