

Grimwire.js: A RESTful Browser OS that does Peer-to-peer over WebRTC - wesray
http://blog.grimwire.com/#2013-04-04-grimwire.md

======
nkoren
Very interesting! I've long dreamed of an architecture which does exactly
this, and is geared towards implementing fully distributed social networks.
P2P and social networking were made for each other -- it should be a lot more
efficient to peer with your actual social circle rather than a group of
strangers, since the data you're most interested in is more likely to already
exist somewhere within your own social circle.

Imagine a simple Twitter-like system built on top of this, for example. Each
web client would function as a store-and-forward. Every time you connect with
a friend, both parties would reconcile the latest posts from all friends that
they share in common. In this way, information on social networks could be
disseminated rapidly and efficiently with no centralisation whatsoever.

Seems to me like just two other bits of technology would be needed for this:
ubiquitous dual-key authentication, and a good UID system. I don't think
either of those would be a problem, and I really hope somebody does this,
since centralised social networks bother me more than a little bit.

~~~
lmm
I've been working on-and-off on such a thing, and was hoping this would
provide a useful bit of technology. Sadly, when I scrolled to the bottom it
seems like they haven't got the WebRTC part working, which has always been the
hardest part - it's not easy to run something like a web server in the
browser.

~~~
pfraze
Author here, that's correct, we haven't implemented the WebRTC binding yet.
The way grim's communication works, we put REST semantics and protocol over
messaging transports. We've already done it over Web Workers' postMessage API,
and don't expect any trouble doing the same over WebRTC's DataChannels. In
fact, the blog post's content is served by a Worker server which proxies out
to a markdown file on the remote host, converts to HTML using
<https://github.com/chjj/marked>, and responds.

------
wmf
P2P frameworks sound interesting, but I'm very skeptical of any "browser OS"
since we already have browser tabs.

~~~
marssaxman
I don't understand the phrase "browser OS", but the description of what
they're actually building sounds like they are decoupling the webapp frontend
from the datastore backend, allowing you to use webapps without having to give
control of your data over to the publisher of the app. Maybe I am
misunderstanding the project, and I don't see why they need to call that a
"browser OS", but at root it seems like a pretty cool idea.

~~~
pfraze
You're right about the decoupling, and the key mechanism for doing that is a
multi-process program model built on Web Workers. With small, independent
programs populating the page, you gain versatility and reusability, as
components can be swapped and configured by the user. Compare this to the
monolithic client of one-tab/one-app, and you have the answer to the
grandparent post's question.

Because of the custom program model, Grimwire's concerns include program
lifecycle, resource management, permissioning, peer connectivity, and UI
toolset, so that's why we call it an OS.

~~~
marssaxman
Got it. Sounds like you guys are actually building something I fantasized
about while I was working at Google, while I grew steadily more disillusioned
with their whole data-warehouse business model...

Got any work for someone who has experience with large distributed systems but
is basically allergic to frontend web technologies?

~~~
pfraze
Yeah, no doubt we could use the expertise. Shoot me an email at
pfrazee@gmail.com

