Hacker News new | past | comments | ask | show | jobs | submit login
Grimwire.js: A RESTful Browser OS that does Peer-to-peer over WebRTC (grimwire.com)
66 points by wesray on April 5, 2013 | hide | past | favorite | 13 comments



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.


I've built something along this line, which I'm hoping to launch in the next few weeks.

It's not done yet, but what ever is? ;)

It works by building a system of distributed identity and messages around GPG signed JSON, and can be distributed over any medium. Right now, It's web-based and HTTPS calls, but I'm actively looking for a good webrtc solution I can use without leaking users IPs and other data.

There's some information about it at Tavern.com

If anyone's interested, I'd love to work with you to figure out how to make it better ;)


What you're describing is similar to a darknet like WASTE or Freenet; they connect to friends and store-and-forward the content as requested.

As for UID, if you just want some kind of unique identifier, you can just use a public RSA key. If you want an unique but readable name (like a nickname), you need something more sofisticated. A possible approach is Namecoin's, which tries to guarantee unique but decentralized domains.


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.


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.


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


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.


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.


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?


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


Heh, I'm sure a spot can be found ;)


This sounds a lot like an fancy iframe with a communications layer. How is it different? (this makes it sound worse than it is -- in truth, this sort of visible integration is interesting, but I'm just trying to understand exactly what problem you're trying to solve)


Good question. Iframes (currently) share the process with the parent document, making it possible to DoS the page. They're also bound to a single node in the page, whereas the Workers exist outside the lifecycle of the DOM elements (and can serve multiple areas of the DOM).

The kind of gains we're looking for are the kind that you get out of unix's small programs and pipes. URLs are a fairly powerful primitive-- they can represent remote endpoints, local endpoints, and pieces of data (with data-uris). So, for instance, with some artful configuration/linking, you could have the same webapp write to local storage, remote storage, or the filesystem-- and make it easy for the user to choose, not with a premade choice, but with the ability to load software.

Program-sharing can also continue the gains made by Ajax, where you can deliver programs to the client which understand a remote service's API. For instance, if my profile links to "send-pfraze-a-message.js", you pull that down and load the interface next to your files interface, drag in the file, then hit send. Then you load "send-pfraze-a-message.js" next to your strategy game interface, drag in a battle plan, and hit send. In both cases, your existing programs didn't have to understand whatever service I use to receive messages-- they just had to bundle data for click-and-drag.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: