bug-hurd
[Top][All Lists]
Advanced

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

Concept: Forking the web with the Hurd and Mercurial


From: Arne Babenhauserheide
Subject: Concept: Forking the web with the Hurd and Mercurial
Date: Wed, 11 Aug 2010 00:17:05 +0200
User-agent: KMail/1.13.5 (Linux/2.6.31-gentoo-r6; KDE/4.5.0; x86_64; ; )

Hi, 

This is just a concept. It would be nice, to see it become reality,
though. 

In my opinion it shows how the Hurd makes complex concepts easy.


You could also call it read/write web ;)

It is still untested, though.


Goal
------

Being able to edit any website in the web, see the changes
locally and share it with others. 

Example: On his statitc site, HurdJoker
writes the latest Duke Nukem Forever. I want to add a link with info about
our usability report, and I want those who trust me to see my comment.


Used technology
--------------

translators: 

- hostmux with httpfs to
get all websites into the filesystem. 
- unionfs to mount a local tree over
the web. 
- hgmerger (Mercurial integration doesn’t exist yet) to check
websites and commit and merge my versions. 

Approach
-----------

Websites
are being accessed via /http://… using the hostmux translator with httpfs.
So we have a filesystem tree of the http sites. 

The unionfs mounts a local
tree over it. All writes are redirected to the local tree. The same goes for
all reads to file which exist in the local tree. 

hgmerger sits on that
local tree. When a file is read in the local tree, hgmerger gets its
equivalent from the bare http tree, commits that and merges it with the
local changes. 

To make it simple, we can use the following layout:


/http://* - the real web
~/.http://* - the overlay
~/.bare-http://* -
incoming changes. 

### Reading websites

When a site is read which also
exists in ~/.http*, the hgmerger first copies the site from /http* to
~/.bare-http* and commits it. 

Then it pulls the changes from ~/.bare-http*
into ~/.http* and merges them with the local tree. In case of conflict, the
bare site wins (to make sure that merges always work). 

Additionally
~/.bare-http* uses a named branch: "bare". That way, ~/.http* can be shared
with others who can then clone the "bare" branch on ~/.http-bare*. 

###
Writing to websites

When a site is edited and then saved, hgmerger first
copies its unchanged version (from /http*) to ~/.bare-http*. Then it merges
the bare copy into ~/.http*. 

Now it writes the changed file to ~/.http*
and commits. 

unionfs and the selective reading for changed files ensure,
that I’ll see the changed version from now on. 

At this point, the
mercurial repository in ~/.http* can be shared on the web and people can
pull from it to get my changes to websites. 

Conclusion
---------

The
hostmux and httpfs translator in the Hurd make it extremely easy to get the
internet into the filesystem. 

Using unionfs and Mercurial, the filesystem
tree can then easily be given a transparent editing layer which can be
shared with everyone else. 

No need anymore to add comment sections to
static websites. You have a builtin editing overlay right in your system –
hooked into the very http grabber. 

Note: using Git or Bazaar instead of
Mercurial should not change the workflow in any relevant way. 


So, for
those brave souls who followed me till here :) : what do you think about the
concept? 

Does it show the strength of the Hurd as I think it does? And
would you also love to have this kind of shared decentral read/write web? :)


Best wishes, 
Arne

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]