Skip to content

Latest commit

 

History

History
122 lines (98 loc) · 4.84 KB

tutorials.txt

File metadata and controls

122 lines (98 loc) · 4.84 KB

-*- mode: org; fill-column: 78 -*-

tutorials

  • icfp, for functional programming types
  • ofelia, for openflow/networking types

syllabus

  • toolchain- ocaml, git, github, ocamlbuild, mir-build/-run
  • basic io- console
  • concurrency- lwt
  • storage- blkdev, orm
  • network- channels, flows, sockets, tuntap, netfront
  • syntax extensions- (lwt), cow
  • backends- unix-sockets, unix-direct, node.js, xen

samples

  • hello world
  • echo server
  • openflow controller
  • http server

storyboards

assume prior knowledge of

  • git
  • mirage tree, preferably installed
  • ocaml, even if only basic

icfp

3 hours total

””” We will:

  • begin by introducing the Mirage programming framework, and how to use it under a familiar UNIX environment
  • introduce high-level OCaml abstractions for a console, lightweight threads, and channels that map to UNIX sockets
  • use the tuntap infrastructure to insert a TCP/IP/Ethernet stack as an alternative to the UNIX kernel stack
  • compile the same source code to a microkernel running directly under Xen
  • build your own “hello world” webserver and execute it on the public internet using Amazon EC2!

”””

notes

suggest primarily using unix targets for ease-of-development. [avsm] Start with unix-socket, introduce the HTTP layer, get a web server started early [avsm] Then move to unix-direct and show the lower-layers of the stack. [avsm] Finally, compile up a xen backend…

how is xen best used- will there be a local dom0 available for demo? [avsm] Yes, Dave and I will both bring laptops with debian-testing running Xen, and hand out user/pass combinations to attendees

or just use EC2? if so, how to manage? [avsm] I’ll preconfigure my personal EC2 keys on my laptop, so users can upload kernels via it.

tuntap- what’s the spec of the vm image to be used, presume it includes tuntap support, do we need to talk explicitly about tuntap, or just use the unix-direct target? [avsm] it should include tuntap support, but I havent tested this. hrm.

storyboard

TOPICMINSHOURS
intro+toolchain10
- what is mirage?
- motivation
- clone+install tree
- mir-build %.spec files and targets
hello world! (console i/o)10
- tests/perf/sieve/sieve.ml
lwt intro10
COMFORT BREAK5-10
simple concurrency (lwt)20-25
- lwt/heads1.ml
- lwt/heads2.ml
- basic/sleep.ml
1 hour
networking
- echo server w/ flow10
- abstractions:20
– flows, channels, datagrams
TEA BREAK30
http server (mirage-www)30
- cow syntax
1 hour
storage30
- devices
- extended http server to use storage
COMFORT BREAK5-10
backends (can elide if no time)30
- what exists
- capabilities/limitations
- runtimes
- main.ml
- devices.ml
- …
1 hour

ofelia

2 hours total