Skip to content

Commit

Permalink
more contents; paper links, about status
Browse files Browse the repository at this point in the history
  • Loading branch information
avsm committed Oct 6, 2010
1 parent 7f80ce4 commit 6b859cf
Show file tree
Hide file tree
Showing 15 changed files with 186 additions and 77 deletions.
10 changes: 10 additions & 0 deletions .gitignore
@@ -0,0 +1,10 @@
*.o
*.cmi
src/.depend
*.cmo
*.cma
*.cmx
*.annot
mirage-unix
filesystem_*.ml
.*.swp
Binary file added files/graphics/acm.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/graphics/pdf.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/graphics/prezi.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 10 additions & 2 deletions files/styles/index.css
Expand Up @@ -113,7 +113,7 @@ a#logo:hover {

#linkbar {
float: right;
height: 50px;
height: 30px;
}

#linkbar ul {
Expand Down Expand Up @@ -230,10 +230,14 @@ a#logo:hover {

.left_column, .right_column {
float: left;
margin: 15px 0px 0px 0px;
margin: 0px 0px 0px 0px;
width: 480px;
}

.left_column {
margin: 10px 0px 0px 0px;
}

.right_column {
float: right;
width: 460px;
Expand Down Expand Up @@ -818,3 +822,7 @@ ul#file_not_found_list li.list_head {
background-color: #ddd;
cursor: pointer;
}

.impl_red { background-color: #FE9696; }
.impl_orange { background-color: #FDC086; }
.impl_green { background-color: #B0ECB0; }
Empty file removed src/.depend
Empty file.
2 changes: 0 additions & 2 deletions src/config.ml
@@ -1,4 +1,2 @@
let port = 8080
let baseurl = Printf.sprintf "http://localhost:%d" port

let index = "index.inc"
16 changes: 6 additions & 10 deletions src/dispatch.ml
Expand Up @@ -13,14 +13,10 @@ module Resp = struct

(* dispatch non-file URLs *)
let dispatch req = function
| [] | "index.html" :: [] ->
let b = Pages.Index.t in
(dyn req b)
| "" :: "code" :: [] ->
let b = Pages.Code.t in
(dyn req b)
| x ->
(Http_daemon.respond_not_found ~url:(Http_request.path req) ())
| [] | "index.html" :: [] -> dyn req Pages.Index.t
| "resources" :: [] -> dyn req Pages.Resources.t
| "about" :: [] -> dyn req Pages.About.t
| x -> (Http_daemon.respond_not_found ~url:(Http_request.path req) ())
end

(* handle exceptions with a 500 *)
Expand All @@ -33,10 +29,10 @@ let exn_handler exn =
let t conn_id req =
let path = Http_request.path req in

logmod "HTTP" "%s %s [%s]" (Http_common.string_of_method (Http_request.meth req)) path
logmod "HTTP" "%s %s %s [%s]" (Http_request.client_addr req) (Http_common.string_of_method (Http_request.meth req)) path
(String.concat "," (List.map (fun (h,v) -> sprintf "%s=%s" h v)
(Http_request.params_get req)));

logmod "header" "Connection: %s" (String.concat ", " (Http_request.header req ~name:"connection"));
let path_elem = Str.split (Str.regexp_string "/") path in

(* determine if it is static or dynamic content *)
Expand Down
42 changes: 19 additions & 23 deletions src/pages.ml
Expand Up @@ -7,32 +7,28 @@ open Lwt

let md_file f =
let f = match Filesystem_templates.t f with |Some x -> x |None -> "" in
let t = Str.split (Str.regexp_string "\n") f in
let md = Markdown.parse_lines t in
let md = Markdown.parse_text f in
Markdown_html.t md

module Index = struct

let body =
let intro = md_file "intro.md" in
(
"<div class=\"left_column\"><div class=\"summary_information\">"
^ intro
^ "</div></div>")
let col_files l r =
"<div class=\"left_column\"><div class=\"summary_information\">"
^ (md_file l)
^ "</div></div>"
^ "<div class=\"right_column\">"
^ (md_file r)
^ "</div>"

let t =
let b = body in
Template.t "index" b
module Index = struct
let body = col_files "intro.md" "ne.md"
let t = Template.t "index" body
end

module Code = struct
let code =
let intro = md_file "arch.md" in
(
"<div class=\"left_column\"><div class=\"summary_information\">"
^ intro
^ "</div></div>")
let t =
let b = code in
Template.t "index" b
module Resources = struct
let body = col_files "docs.md" "papers.md"
let t = Template.t "index" body
end

module About = struct
let body = col_files "status.md" "ne.md"
let t = Template.t "index" body
end
30 changes: 20 additions & 10 deletions src/template.ml
@@ -1,4 +1,5 @@
open Lwt
open Printf

let subst_re ~frm ~tos s =
let rex = Str.regexp_string frm in
Expand All @@ -10,19 +11,28 @@ let subst_url =
let subst_title tos =
subst_re ~frm:"@@TITLE@@" ~tos

let subst_content tos =
subst_re ~frm:"@@CONTENT@@" ~tos
let subst_bar cur =
prerr_endline cur;
let bars = [ "/","Home"; "/blog/","Blog";
"http://github.com/avsm/mirage", "Code";
"/resources/","Resources"; "/about/","About" ] in
let tos = String.concat "\n" (List.map (fun (href,title) ->
sprintf "<li><a%s href=\"%s\">%s</a></li>"
(if ("/"^cur)=href then " class=\"current_page\"" else "")
href title
) bars) in
subst_re ~frm:"@@BAR@@" ~tos

let subst t body s =
subst_title t (subst_url (subst_content body s))
let subst url title body =
subst_bar url (subst_title title (subst_url body))

let subst_file filename title body =
let subst_file url filename title =
match Filesystem_templates.t filename with
|Some s -> subst title body s
|Some s -> subst url title s
|None -> assert false

let index =
subst_file Config.index

let t title body =
index title body
let h = subst_file "" "header.inc" title in
let f = subst_file "" "footer.inc" title in
h ^ body ^ f

5 changes: 5 additions & 0 deletions tmpl/docs.md
@@ -0,0 +1,5 @@
!! Documentation

As Mirage is still under heavy development, there is no detailed documentation available. However, if you are keen to hack, you can read the [INSTALL](http://github.com/avsm/mirage/blob/master/INSTALL) file and give it a shot. Feedback and questions are always welcome via e-mail to <tt>mirage at recoil.org</tt> or occasionally catch us on <tt>#mirage</tt> on FreeNode IRC.

The best way to look out for a release is to <a href="http://github.com/avsm/mirage/toggle_watch">watch</a> the project on [GitHub](http://github.com/avsm/mirage).
17 changes: 17 additions & 0 deletions tmpl/footer.inc
@@ -0,0 +1,17 @@
</div>

<div class="clear_div"></div><!-- Clears above floated columns -->
</div>

<div id="footer">
<h4>&copy; 2009-2010 Anil Madhavapeddy</h4>

<ul>
@@BAR@@
</ul>
</div>

</div>
</body>

</html>
33 changes: 3 additions & 30 deletions tmpl/index.inc → tmpl/header.inc
Expand Up @@ -22,7 +22,7 @@

<div id="wrapper">
<div id="header">
<a id="logo" href="index.html"><img src="/graphics/mirage-logo.png" alt="Logo" /></a>
<a id="logo" href="/"><img src="/graphics/mirage-logo.png" alt="Logo" /></a>

<div id="search_bar">
<form method="post" action="">
Expand All @@ -35,36 +35,9 @@
<div id="info_bar">
<div id="linkbar">
<ul>
<li><a class="current_page" href="/">Home</a></li>
<li><a href="/blog/">Blog</a></li>
<li><a href="http://github.com/avsm/mirage">Code</a></li>
<li><a href="/resources/">Resources</a></li>
<li><a href="/about/">About</a></li>
</ul>
@@BAR@@
</ul>
</div>
</div>

<div id="content">
@@CONTENT@@

</div>

<div class="clear_div"></div><!-- Clears above floated columns -->
</div>

<div id="footer">
<h4>&copy; 2009-2010 Anil Madhavapeddy</h4>

<ul>
<li><a href="/">Home</a></li>
<li><a href="/blog/">Blog</a></li>
<li><a href="http://github.com/avsm/mirage">Code</a></li>
<li><a href="/resources/">Resources</a></li>
<li><a href="/about/">About</a></li>
</ul>
</div>

</div>
</body>

</html>
55 changes: 55 additions & 0 deletions tmpl/papers.md
@@ -0,0 +1,55 @@
!! Academic Papers

<a name="hotcloud"></a>
<a href="http://anil.recoil.org/papers/2010-hotcloud-lamp.pdf"><img src="/graphics/pdf.png" width="22" height="22" alt="PDF" /></a>
<a href="http://portal.acm.org/citation.cfm?id=1863114"><img src="/graphics/acm.png" width="22" height="22" alt="ACM Portal" /></a>
<b>Turning down the LAMP: Software Specialisation for the Cloud</b>

<i>Anil Madhavapeddy, Richard Mortier, Ripduman Sohan, Thomas Gazagnaire, Steven Hand, Tim Deegan, Derek McAuley and Jon Crowcroft</i>,
2nd USENIX Workshop on Hot Topics in Cloud Computing ([HotCloud '10](http://www.usenix.org/events/hotcloud10/)), June 2010

This paper positions work on the Xen backend for Mirage. It is a decent summary of the idea, although some details such as the filesystem extension are likely to be significantly different in the first release.

<hr />

<a href="http://anil.recoil.org/papers/2010-bcs-visions.pdf"><img src="/graphics/pdf.png" width="22" height="22" alt="PDF" /></a>
<a href="http://www.bcs.org/server.php?show=nav.11980"><img src="/graphics/acm.png" width="22" height="22" alt="BCS homepage" /></a>
<b>Multiscale not Multicore: Efficient Heterogeneous Cloud Computing</b>

<i>Anil Madhavapeddy, Richard Mortier, Jon Crowcroft and Steven Hand</i>,
ACM/BCS <a href="http://www.bcs.org/server.php?show=nav.11980">Visions of Computer Science</a>, April 2010

This is a vision paper that lays out the broader background to the project, including some of the problem areas we are tackling in social networking and scientific computing. The first half is a good introduction to the area, but read the later <a href="#hotcloud">HotCloud</a> paper instead of the technical second half.

<hr />

<a href="http://anil.recoil.org/papers/2010-dyntype-wgt.pdf"><img src="/graphics/pdf.png" width="22" height="22" alt="PDF" /></a>
<a href="http://prezi.com/qjkrijlacqiq/mirage/"><img src="/graphics/prezi.png" width="22" height="22" alt="Prezi presentation" /></a>
<b>Statically-typed value persistence for ML</b>

<i>Thomas Gazagnaire and Anil Madhavapeddy</i>,
<a href="http://wgt2010.elte.hu/">Workshop on Generative Technologies</a>, April 2010

This paper defines the [dyntype](http://github.com/mirage/dyntype) dynamic typing extension we developed for OCaml, and the SQL mapper that converts ML values directly into SQL calls. The approach is useful as it is purely meta-programming instead of compiler patching, and thus much easier to integrate with other OCaml code. There is an extended journal paper currently under review; please contact the authors if you wish to read it.

<hr />

<a href="http://anil.recoil.org/papers/2009-icfem-spl.pdf"><img src="/graphics/pdf.png" width="22" height="22" alt="PDF" /></a>
<b>Combining Static Model Checking with Dynamic Enforcement using the Statecall Policy Language</b>

<i>Anil Madhavapeddy</i>,
International Conference on Formal Engineering Methods ([ICFEM](http://icfem09.inf.puc-rio.br/ICFEM.html)), December 2009.

A small domain-specific language which compiles to both PROMELA (for static model checking) and OCaml (for dynamic enforcement) of state machines. This paper defines the DSL and an example against an [SSH server](http://github.com/avsm/melange/tree/master/apps/sshd/) written in pure OCaml.

<hr />

<a href="http://anil.recoil.org/papers/2007-eurosys-melange.pdf"><img src="/graphics/pdf.png" width="22" height="22" alt="PDF" /></a>
<a href="http://portal.acm.org/citation.cfm?id=1272996.1273009"><img src="/graphics/acm.png" width="22" height="22" alt="ACM Portal" /></a>
<b>Melange: Towards a "functional" Internet</b>

<i>Anil Madhavapeddy, Alex Ho, Tim Deegan, David Scott and Ripduman Sohan</i>,
[EuroSys 2007](http://www.gsd.inesc-id.pt/conference/EuroSys2007/), March 2007.

The original paper that formed the basis of Mirage. We define [MPL](http://github.com/avsm/mpl), a DSL to express bi-directional packet descriptions and compile them into efficient, type-safe OCaml code. Performance is tested for DNS and SSH servers written in OCaml versus their C counterparts (BIND and OpenSSH).

41 changes: 41 additions & 0 deletions tmpl/status.md
@@ -0,0 +1,41 @@
Mirage has several backends, each of which expose a different level of I/O API depending on what the platform supports. Below is a summary, with the color indicating its implementation status (Red is under design, Orange is partially implemented, and Green means it is working).

Keep an eye on the [blog](/blog) for more details about what some of these actually mean, over the next few weeks.

<table class="impl">
<tr>
<th> Target </th>
<th> Memory </th>
<th> Timer </th>
<th> Network </th>
<th> Storage </th>
</tr>
<tr>
<td class="impl_orange"> Xen </td>
<td class="impl_orange"> x86_64 pagetable </td>
<td class="impl_green"> tickless domain block </td>
<td class="impl_orange"> ethernet AIO </td>
<td class="impl_orange"> block AIO </td>
</tr>
<tr>
<td class="impl_orange"> Linux low-level </td>
<td class="impl_green"> malloc </td>
<td class="impl_green"> select </td>
<td class="impl_orange"> tuntap ethernet AIO </td>
<td class="impl_red"> mmap block AIO </td>
</tr>
<tr>
<td class="impl_orange"> Linux </td>
<td class="impl_red"> hugetlbfs </td>
<td class="impl_red"> epoll </td>
<td class="impl_orange"> async sockets </td>
<td class="impl_red"> mmap block AIO </td>
</tr>
<tr>
<td class="impl_orange"> Browser </td>
<td class="impl_green"> Javascript </td>
<td class="impl_green"> DOM callback </td>
<td class="impl_red"> websockets </td>
<td class="impl_red"> SQL localstorage </td>
</tr>
</table>

0 comments on commit 6b859cf

Please sign in to comment.