[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] Mirage-WWW porting status



Perfect, this works for me now with Mirage-WWW!

I've also fixed a build issue with the HTTP libraries, by splitting them out into:



With all of this merged into OPAM shortly, Mirage 1.0.3 will be good to be released, and will build the Mirage website in the following modes:

- Unix: filesystem passthrough to make editing files locally easy
- Unix: FAT filesystem parsed in userspace via mmap/ocaml-fat
- Xen: crunch filesystem

That's finally good enough for the blog post,  yay!  Only 3 days late, a new Mirage record :-)

-anil

On 18 Dec 2013, at 12:52, David Scott <scott.dj@xxxxxxxxx> wrote:

Hi,

The problem reading files from a FAT filesystem turned out to be a bug in mirage-block-unix: there was no mutex around calls to seek() and read(), allowing two parallel threads to interleave badly. With this fixed I was able to run a Unix mirage-www, and it all seemed to work. I've tagged mirage-block-unix.1.2.0.

I've also sped up the construction of the FAT images via the 'fat' command-line tool by making it use buffered I/O. I've tagged the new faster-fat as 0.10.0.

Note the default Unix block device uses unbuffered I/O, the same as xen. Some apps would clearly benefit from caching (like the webserver) -- perhaps we should add an optional caching layer over KV_RO?

Cheers,
Dave


On Sun, Dec 15, 2013 at 7:26 PM, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote:
I've been making good progress on porting Mirage/WWW to the 1.0 libraries. The main website now compiles with 1.0 and crunch, with this (now-merged) pull request:
https://github.com/mirage/mirage-www/pull/56

It was a fairly brute-force merge, but makes it much easier to break up the old website into a cleaner one based on the Cowabloga library.

I then took a shot at recompiling the website to use a dynamic FAT block device instead of the static crunch filesystem.  This required a few minor changes to libraries:

- Add a KV_RO compatible mode to FAT which simplifies its normally read/write FS interface: https://github.com/mirage/mirage/pull/160
- Modify the Mirage command line to have a FAT_KV_RO option: https://github.com/mirage/mirage/pull/160
- Parameterise the Mirage-WWW config.ml to use either crunch or static; https://github.com/mirage/mirage-www/pull/57

This plumbing was all pretty straightforward, but triggers a bug somewhere in the FAT directory traversal, so the resulting website doesn't actually read the files in FAT mode yet.

Once that's tracked down (hello Dave!), I can add a Unix_KV_RO module too, and we'll have a pass-through to the filesystem to make it easier to develop code without recompiling all the time.

TL;DR: blog post very soon, forgive the slight delay :-)

-anil
_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel



--
Dave Scott

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.