Status Report: Marionnet Marionnet Status Report: “How to implement a virtual How to implement a virtual “ network laboratory in six network laboratory in six months and be happy” months and be happy” Jean-Vincent Loddo <loddo@lipn.univ-paris13.fr> Jean-Vincent Loddo <loddo@lipn.univ-paris13.fr> Luca Saiu <saiu@lipn.univ-paris13.fr saiu@lipn.univ-paris13.fr> > Luca Saiu < Université é Paris 13 Paris 13 Universit Luca Saiu < <saiu@lipn.univ-paris13.fr saiu@lipn.univ-paris13.fr> > - ML Workshop, Freiburg, 2007-10-05 - ML Workshop, Freiburg, 2007-10-05 Luca Saiu
Requirements Requirements T eaching first- and second-year students to T eaching first- and second-year students to setup and configure networks. networks. setup and configure Either: Either: in the traditional way: in a in the traditional way: in a room full of room full of computers, wires, and devices computers, wires, and devices Or: We want it: want it: Or: We In a In a simulated environment simulated environment Fast to write Fast to write Robust Robust faithful faithful simulation simulation easy easy to use to use Luca Saiu < <saiu@lipn.univ-paris13.fr saiu@lipn.univ-paris13.fr> > - ML Workshop, Freiburg, 2007-10-05 - ML Workshop, Freiburg, 2007-10-05 Luca Saiu
Let's give it a look Let's give it a look Live demo Live demo Luca Saiu < <saiu@lipn.univ-paris13.fr saiu@lipn.univ-paris13.fr> > - ML Workshop, Freiburg, 2007-10-05 - ML Workshop, Freiburg, 2007-10-05 Luca Saiu
Some data Some data Code size: Code size: ~12,000 lines ~12,000 lines OCaml OCaml ~1,000 lines ~1,000 lines C C Notable features: Notable features: GUI (GTK+) GUI (GTK+) 6 man months 6 man months Concurrency Concurrency Fault tolerance Fault tolerance File format backward- & foward- foward-compatibility compatibility File format backward- & Reuse of C code (with modifications): Reuse of C code (with modifications): UML, by Jeff Dike (User-Mode Linux) UML, by Jeff Dike (User-Mode Linux) VDE, by Renzo Davoli VDE, by Renzo Davoli Luca Saiu < <saiu@lipn.univ-paris13.fr saiu@lipn.univ-paris13.fr> > - ML Workshop, Freiburg, 2007-10-05 - ML Workshop, Freiburg, 2007-10-05 Luca Saiu
Emulation-level vs. vs. user-level user-level network network Emulation-level Luca Saiu < <saiu@lipn.univ-paris13.fr saiu@lipn.univ-paris13.fr> > - ML Workshop, Freiburg, 2007-10-05 - ML Workshop, Freiburg, 2007-10-05 Luca Saiu
Treeviews Treeviews Luca Saiu < <saiu@lipn.univ-paris13.fr saiu@lipn.univ-paris13.fr> > - ML Workshop, Freiburg, 2007-10-05 - ML Workshop, Freiburg, 2007-10-05 Luca Saiu
The 'a forest datatype The 'a forest datatype type 'a forest = type 'a forest = Empty Empty | NonEmpty of | NonEmpty of 'a * 'a * (* first tree root *) (* first tree root *) ('a forest) * ('a forest) * (* first tree subtrees *) (* first tree subtrees *) ('a forest);; ('a forest);; (* other trees *) (* other trees *) What could be a reasonable could be a reasonable 'a ? What 'a ? The right data structure for treeviews... The right data structure for treeviews... ...but for network graphs? ...but for network graphs? Luca Saiu < <saiu@lipn.univ-paris13.fr saiu@lipn.univ-paris13.fr> > - ML Workshop, Freiburg, 2007-10-05 - ML Workshop, Freiburg, 2007-10-05 Luca Saiu
Messages and thunks Messages and thunks class ['a] queue : class ['a] queue : object object val elements : 'a list ref val elements : 'a list ref val empty_condition : Condition.t val empty_condition : Condition.t val mutex : Mutex.t val mutex : Mutex.t method private __empty : bool method private __empty : bool method dequeue : 'a method dequeue : 'a method enqueue : 'a -> unit method enqueue : 'a -> unit method prepend : 'a -> unit method prepend : 'a -> unit end end Our message-passing infrastructure is built on a Our message-passing infrastructure is built on a . (unit -> unit) queue . (unit -> unit) queue Luca Saiu < <saiu@lipn.univ-paris13.fr saiu@lipn.univ-paris13.fr> > - ML Workshop, Freiburg, 2007-10-05 - ML Workshop, Freiburg, 2007-10-05 Luca Saiu
More on thunks More on thunks let with_mutex mutex thunk = let with_mutex mutex thunk = lock mutex; lock mutex; try try let result = thunk () in let result = thunk () in unlock mutex; unlock mutex; result result with e -> begin with e -> begin unlock mutex; unlock mutex; Printf.printf Printf.printf “%s raised in critical section.\n" %s raised in critical section.\n" “ (Printexc.to_string e); (Printexc.to_string e); raise e; raise e; end;; end;; Passing an anonymous thunk to with_mutex is a Passing an anonymous thunk to with_mutex is a pattern in our code. in our code. pattern Luca Saiu < <saiu@lipn.univ-paris13.fr saiu@lipn.univ-paris13.fr> > - ML Workshop, Freiburg, 2007-10-05 - ML Workshop, Freiburg, 2007-10-05 Luca Saiu
What now What now Marionnet will be distributed to students will be distributed to students Marionnet and used in courses about networks... and used in courses about networks... on GNU/Linux on GNU/Linux live DVD live DVD systems systems “ Marionnettix Marionnettix ”, based on Knoppix ”, based on Knoppix “ by now only at the Universit by now only at the Université é Paris 13 IUT Paris 13 IUT We've ordered 1500 1500 virgin DVDs for this virgin DVDs for this We've ordered semester semester so the thing should better work so the thing should better work We confide in a wider wider adoption in the future adoption in the future We confide in a Luca Saiu < <saiu@lipn.univ-paris13.fr saiu@lipn.univ-paris13.fr> > - ML Workshop, Freiburg, 2007-10-05 - ML Workshop, Freiburg, 2007-10-05 Luca Saiu
About Marionnet Marionnet About You're welcome welcome to share and change to share and change Marionnet Marionnet : : You're it's free software free software, distributed under the , distributed under the GNU GNU it's General Public License. . General Public License Luca Saiu < <saiu@lipn.univ-paris13.fr saiu@lipn.univ-paris13.fr> > - ML Workshop, Freiburg, 2007-10-05 - ML Workshop, Freiburg, 2007-10-05 Luca Saiu
Thanks Thanks Thanks Thanks Thanks Thanks http://www.marionnet.org http://www.marionnet.org It will be online “Real Soon Now” It will be online “Real Soon Now” (yes, trust me) (yes, trust me) Download it! Download it! It's functional!! It's functional!! No questions yet? No questions yet? (mostly) (mostly) It works!!! It works!!! This slide is over... This slide is over... (it should) (it should) No more easter eggs... No more easter eggs... Ok, enough. Ok, enough. This is the last one. This is the last one. Luca Saiu < <saiu@lipn.univ-paris13.fr saiu@lipn.univ-paris13.fr> > - ML Workshop, Freiburg, 2007-10-05 - ML Workshop, Freiburg, 2007-10-05 Luca Saiu
Recommend
More recommend