Unhosted Adventures

41 views
Skip to first unread message

mic...@michielbdejong.com

unread,
Nov 25, 2012, 7:04:30 AM11/25/12
to unho...@googlegroups.com
We set out two years ago to create freedom from web2.0's platform monopolies. During this time we have learned a lot, and invented two tools
which a user can run to make unhosted web apps become just as powerful as hosted web apps: remotestorage and sockethub.

Remotestorage is nearing what you could call "1.0" status - we are writing up the specification as an IETF Internet Draft, and Niklas is doing an
amazing job developing and maintaining the remotestorage.js library. There are already 5 or 6 unhosted web apps out there that rely on it.

In the meantime we launched "Terms of Service; Didn't Read" as a now fully independent spin-off project.

Now that remotestorage and tosdr are both in good hands, I'm shifting my focus more and more towards sockethub. 10 days ago I decided to switch entirely to
unhosted web apps, except when there is no other option. I'm using Firefox for the apps, and a debian server that hosts my website, as well as both my
remotestorage and my sockethub. The first things I set up were:

- root access over a websocket, so that I can administer my Rackspace server from Firefox
- a simple editor based on CodeMirror which can load and save files both from/to my local filesystem as well as from/to my remotestorage.
- owncloud with remotestorage enabled, so that i can use unhosted web apps.
- a webserver that serves my website from the file storage of my owncloud installation, so that i can easily edit it via remotestorage
- a sockethub with modules for "unhosted" (sending simple json-ld objects over websockets between unhosted web apps), "shell" (execute commands
on my Debian server), "smtp" (both incoming and outgoing email) and "irc"
- logging of all messages that go through my sockethub to my remotestorage
- a generic sockethub client app, based mainly on typing javascript commands into the Firefox console; powerful in its simplicity.
- a simple remotestorage browser which i use to read the sockethub logs (for instance: email that came into it while i was offline)

I even have cookies disabled in Firefox. Virtually every hosted web app needs you to have cookies enabled.
I'm not saying all hosted web apps are to be avoided, but by disabling cookies, i can make absolutely sure I don't accidentally use any hosted
web apps. For instance, I can read etherpad and stackoverflow, but not interact with them, because that would require a server-side session.

At the same time I am avoiding the use of anything except Firefox itself. So no desktop apps, no plugins like Flash and Quicktime, and no built-in
operating system features (I'm using a MacBook with OSX to run Firefox).

Whenever there is something for which I need anything else than Firefox+Rackspace, I make a note of it and try to learn from it, and find alternatives.
So far in the first 10 days, I found I had to use the following:

Non-web apps that my version of Firefox can not (yet) replace:
- Finder (but only for filesystem operations, so to delete, copy and move files and directories)
- Wifi indicator / password dialog
- battery indicator
- DVD Player

Non-web apps that i still used during those 10 days, but aim to try to replace:
- spotify
- vlc
- clock widget
- TextEdit (for viewing word documents)
- skype
- Flash
- Quicktime
- preview (for viewing pdf documents)
- terminal

Hosted web apps that I will need to log in to:
- my own owncloud installation
- paypal and online bank accounts
- Rackspace admin interface
- ecommerce websites (e.g. buying a plane ticket)

Hosted web apps that I used these 10 days but aim to somehow replace with unhosted ones:
- Gmail
- irccloud
- Google Groups admin interface
- github
- w3c community groups website

I am also using Duckduckgo instead of Google search now, and have used the "!g" option only twice. I will aim to use no monopolized services, but
at the same time allow others to use them (provided there are APIs that my sockethub server can communicate with).

Ciao!
Michiel

☮ elf Pavlik ☮

unread,
Nov 25, 2012, 3:34:06 PM11/25/12
to unhosted
Excerpts from michiel's message of 2012-11-25 12:04:30 +0000:
respect! :)

Nick Jennings

unread,
Nov 26, 2012, 8:00:58 AM11/26/12
to unho...@googlegroups.com
Does youtube count as a webapp that you are trying to avoid using?
> --
>
>
>

Benoit Chesneau

unread,
Nov 26, 2012, 9:00:29 AM11/26/12
to unho...@googlegroups.com
Nice ... I probably missed a mail is this implementation of the
sockethub available online?

- benoît

On Sun, Nov 25, 2012 at 1:04 PM, <mic...@michielbdejong.com> wrote:
> --
>
>
>

mic...@michielbdejong.com

unread,
Nov 27, 2012, 1:23:20 AM11/27/12
to unho...@googlegroups.com
Nick wrote:
>Does youtube count as a webapp that you are trying to avoid using?

I haven't decided on the exact rules yet. :) In theory i would like to use youtube and soundcloud, and they both support html5, but both only when you accept their cookie. Ideally people host their own videos on their own webservers. But as soon as youtube starts allowing public (cookie-less) viewing using only web technology (and no Flash), which probably they will do at some point, they become effectively a generic yet-another-webserver, "federated" rather centralized.

Having said that, searching or browsing videos on youtube makes it centralized again.
Why are you asking? Does that answer your question?
Ciao,
Michiel.

mic...@michielbdejong.com

unread,
Nov 27, 2012, 1:46:22 AM11/27/12
to unho...@googlegroups.com
hi Benoit! i did not publish the code yet, and it is not really meant for publishing, only as an experiment to learn from. i will publish it as snippets with blog posts describing the lessons learned. But the basis is very simple: i use 'forever' to run several nodejs processes: one for websocket connections, one for smtp, and one for irc. They are 40-line scripts, based on sockjs, simplesmtp+mailparser, and nodejs-irc respectively. They each run as their own node process, so that i can easily update one part without affecting the other parts. For instance, i can restart my mail server, but leave my irc bot running. They way the modules communicate with each other (mainly websocket<->smtp and websocket<->irc) is through http-over-unix-sockets. When starting a nodejs http server, you can specify a 'socketPath' parameter instead of the usual 'port'

Nick Jennings

unread,
Nov 27, 2012, 5:52:19 AM11/27/12
to unho...@googlegroups.com
yes, that answers my question, thanks. the reason i was asking was
just in trying to address the issues in vidmarks:
https://groups.google.com/forum/#!topic/unhosted/PwmEdBVN7ZI

Thad Guidry

unread,
Nov 27, 2012, 9:10:51 AM11/27/12
to unhosted
Michiel,

My understanding is that YouTube API v3 is rather public already, and only needs OAuth when needing to access private data. https://developers.google.com/youtube/v3/guides/authentication

Using AngularJS or another similar javascript library you can make a rather robust YouTube search and view app that stores your private user data in remotestorage.  (btw, AngularJS is amazingly cool in itself http://angularjs.org/ )

A video example of this idea from YoutTube developer that uses entity search in YouTube API v3 and AngularJS to design a search and view tool in HTML5 of his favorite searched entities (keywords) from YouTube videos.  http://youtu.be/figBl6sFdZ0

Nick Jennings

unread,
Nov 27, 2012, 9:15:56 AM11/27/12
to unho...@googlegroups.com
Thanks for the info Thad! I'm using the public YouTube API for my
vidmarks app and agree it is very useful and contains lots of functionality.
Now if only they would allow you to download the videos without having
to be sneaky ;)
> --
>
>
>

Melvin Carvalho

unread,
Nov 28, 2012, 10:43:27 AM11/28/12
to unho...@googlegroups.com

Sounds very interesting.  I do a lot of dogfooding too.  Though not yet ready to make the full dive yet.

Is there some place I can learn about sockethub?
 

Ciao!
Michiel

--




Jan-Christoph Borchardt

unread,
Nov 28, 2012, 2:56:45 PM11/28/12
to Unhosted
Nice man! Some pointers:

Youtify is a really good web music player http://www.youtify.com/ and it just waits to have remotestorage integrated: https://github.com/youtify/youtify/issues/160
Subway is a good open source IRC client, based on node: https://github.com/thedjpetersen/subway
Skype alternative: http://hackview.sdslabs.co.in/
GateOne is a half-python/half-html SSH client & terminal emulator: https://github.com/liftoff/GateOne

Firefox OS simulator for Firefox: https://github.com/mozilla/r2d2b2g

Lastly, can you document how you set up everything so others can try the same?


On Sun, Nov 25, 2012 at 1:04 PM, <mic...@michielbdejong.com> wrote:

--




Manuel Schölling

unread,
Nov 28, 2012, 3:56:51 PM11/28/12
to unho...@googlegroups.com
Am 28.11.2012 20:56, schrieb Jan-Christoph Borchardt:
> Nice man! Some pointers:
>
> Youtify is a really good web music player http://www.youtify.com/ and it
> just waits to have remotestorage integrated:
> https://github.com/youtify/youtify/issues/160
> Subway is a good open source IRC client, based on node:
> https://github.com/thedjpetersen/subway
> Battery API: http://davidwalsh.name/more-html5-apis
> Network connection:
> http://rakaz.nl/2009/09/iphone-webapps-101-detecting-essential-information-about-your-iphone.html
> Skype alternative: http://hackview.sdslabs.co.in/
> PDF viewer: https://github.com/mozilla/pdf.js
> GateOne is a half-python/half-html SSH client & terminal emulator:
> https://github.com/liftoff/GateOne
>
> Firefox OS simulator for Firefox: https://github.com/mozilla/r2d2b2g
> More info:
> http://www.blueskyonmars.com/2012/11/08/r2d2b2g-is-becoming-the-firefox-os-simulator/
>
> Lastly, can you document how you set up everything so others can try the
> same?

Hi,

I shamelessly also mention my browser-side PDF creation javascript API:
http://manuels.github.com/hpdf.js/

mic...@michielbdejong.com

unread,
Nov 29, 2012, 1:12:41 AM11/29/12
to unho...@googlegroups.com
Melvin wrote:
>Is there some place I can learn about sockethub?

I will start blogging about it as soon as it settles down a bit. For now you just have to write your own server and maintain it yourself so that it does what you need. The first step is of course setting up shell access, so that you can execute commands on your server, including "apt-get install" and "npm install". And really that is all you need, of course, although for example now if i want to send 1 tweet, i write a custom program that tweets that specific text when you run it, i upload that to my remotestorage, and then use the "web shell" to execute it as a node script. So that way in theory i can do anything i could ever need to do, but of course it's cumbersome. So then you can go automate things you do often, to make it easier.

But if what you want is a server that just does common tasks out of the box, Nick will (if the funding comes together) write a polyglot server that you can actually use. :) So then your app can for instance send out emails to people, talk on your behalf on irc, tweet, like things on facebook, etcetera. If you want to add that functionality to your own apps without having to write your own server also, then you have to wait for Nick's project! :)

HTH,
Michiel.

Melvin Carvalho

unread,
Nov 30, 2012, 5:42:29 AM11/30/12
to unho...@googlegroups.com

Sounds great.  I dont mind writing a server.

Would I be right to say that the current implementation is similar to an ssh terminal over websockets?
 

HTH,
Michiel.

--




Melvin Carvalho

unread,
Nov 30, 2012, 5:52:47 AM11/30/12
to unho...@googlegroups.com
On 29 November 2012 07:12, <mic...@michielbdejong.com> wrote:

HTH,
Michiel.

--




Reply all
Reply to author
Forward
0 new messages