Páginas

jueves, 27 de diciembre de 2012

How to run Chromium v26 on Ubuntu

As you would know, since several months ago there's no official Chromium Nightly builds PPA, but since last week was enabled the support for native DataChannels on Chrome Canary (yeah!!! :-D ) I was decided to test it whatever it cost.

To do it, here we have two options: Canary versions only available for Windows, or hack a way to get to run a Nightly release on Linux. The Canary was fairly easy, just reboot on my dust-filled Windows partition, but to test and debug DataChannels-polyfill was a PITA thanks to Windows files protection idiosyncrasy so this morning I've managed to achieve the second method... and won :-D

First of all, we need to get a Nightly build. We can download or compile it by ourself, but I find fairly better to use this script that also makes a backup of previous versions, a command called chromium-cont to distinguish it from the stable one, and create a shortcut on the apps menu. Just a piece of cake. The problem here is that it's a vanilla compilation of Chromium, so it will try to use our default profile and if we have a previous version of Chromium running, it will just open a new window tab on it, so we'll need to launch it with a flag telling him a new folder where to store his config info. A good one would be ~/.config/chromium-cont, to be on pair with Chromium and Google Chrome config folders:
--user-data-dir=~/.config/chromium-cont
To do this just add the flag when launching from command line, or to add it to the shortcut right-click on the apps menu, select "Edit menus" and navigate up to "Internet > Chromium Updated" and set it there. Another option would be to just change the chromium-cont symlink to a full-fledged shell script that also pass automatically the selected config folder (more or less what Chrome Canary does) so it will be used everywhere is being launched, but I'll leave this as an exercise for the reader :-)

Finally, to enable native DataChannels on it you will have to add a --enable-data-channels flag when launching it, or better put on the browser navigation bar "about://flags", scroll down to the bottom of the page and click on "Enable RTCDataChannel". Now you have a full fledged Chromium v26 ready to start experimenting with native DataChannels directly from Linux!!! :-D

domingo, 23 de diciembre de 2012

Better... impossible

Now that's official I can be able to announce it.

What was the best I expected I could achieve with ShareIt!? That it could get a good reception on the community and some social repercussions.
What would be better? That it got taken in account for two degree and a doctorate thesis.
Better than that? It was referenced on a book.
Maybe the best?...

...a job offer (almost) directly related with it :-)

Merry Chistmas and Happy New Year to all!!! :-D

viernes, 21 de diciembre de 2012

ShareIt! 1.0 "Armageddon"

Some centuries ago some guys from central America supposed today would be a great day (you know, with Sun in the sky and singing birds all the way :-P ), so being today the End of the World, why don't try to collaborate a little bit on it on a so-signed date? ;-)

This is the reason why after an infernal week (literally, 6 exams in just four days... :-S ), some adjust on my scheudle and too much work coding up to late I'm so proud to announce that, finally, I've released the first stable, usable and feature complete (up to some degree) version of ShareIt!, the first server-less pure client-side Javascript and HTML5 P2P application in the world build over WebRTC DataChannels, that sweetly I've decided to nickname it "Armageddon" to remember this marvelous day (hey, at first I decided to name it "Doom's Day", but "Armageddon" starts by "A" that's fairly better for a first release :-P ).

So here you have it, with improved control on the transference code and an upgraded user interface. Finally it's working using MD5 for the hashes instead of TTH but it was just a lack of time to do it (basically, I will have to build my own implementation from scratch...) and currently there's no search support, but I have finished to add documentation on the code and hope to do this improvements soon and also some other cool ones like a headless daemon and a mobile version ;-) Obviously, all the code is on my GitHub repository, so go ahead, fork it, send me your patches and start using it with your colleages. Let's begin the party! :-D

martes, 18 de diciembre de 2012

The book is published!

I have just get noticed that the second edition of the book "HTML5 for Masterminds" by J.D. Gauchat have just been published on Amazon and will be ready on paper (also in spanish! :-D ) in some weeks, but the best part (at least for me) is the next paragraph:
IMPORTANT: At the time of writing, the specification for data channels is under development, and this part of the API was not yet implemented in browsers. To test the last example, we used a polyfill developed by Jesús Leganés Combarro (pirannafs.blogspot.com) and available at https://github.com/piranna/DataChannel-polyfill. This script implements data channels using its own Websocket server. For this reason, the script of Listing 24-12 might have to be modified to work with the official implementation. Please check our website for updates.
I'm happy :-)

jueves, 6 de diciembre de 2012

I have competence!

It was really a surprise when on the ShareIt! commits network graph I see a new history line under mine. Who is that guy? What's doing? And why didn't tell me he is working on my code?

QuickShare is a little web page whose only purpose is just share files between two peers though an intermediate server using websockets in a similar way to how PasteBin works, that it's exactly the idea I had when started to build ShareIt! up to the most minimal details before knowing the existence of the WebRTC technology and changed it to a full fledged P2P filesharing application. The truth is that is not using my code at all... it's a fork done directly from the same commit of DirtyShare where I started ShareIt! so our projects are somewhat siblings :-P

But hey, at least I would be able to use its terms of use as basis for my own ones... :-D

sábado, 1 de diciembre de 2012

A game changer

The last week I told you about the crazy weekend I had with the ReatTimeWeb conference and the 3DS seminary, but also I promised you to talk about some ideas they give me related to the signalling problem. Ok, here we go: they worked :-D

The problem is simple, althought not easy to solve (someone told me I touched the Holy Grail of Internet... :-P ): a web browser on a LAN can go and surf over Internet without problems, since it's a request from the internal network to a server the bigger Internet, there's no mistery here. Since this way every browser can access to Internet, they could be able to be reached on the other way from one browser to another, but how to do this without using a server, or at least without deploying a custom one, just using currently available Internet technologies?

On a first point, I though about SIP, and specially SIP-over-WebSockets, a specification to use WebSockets as transport layer for SIP communications instead of plain BSD sockets (and whose author I was able to meet and talk on person on the conference :-) ). I worked hard here until I got noticed by a bad point: public SIP servers require to have a registered account somewhere to allow to connect to them, what breaks annonimity in a very bad way (and having the user to create a new random account on every page reload it's all except user friendly...). Thinking about it, I took a look at XMPP (Jabber), since being a from-the-people builded protocol it would probably to have an annonimous session option... and yes, it has it, but only on the EJabberD server implementation and any of the public servers has it enabled. End road.

Being so frustated by not being able to send a little piece of text from one end to another one without a server or a previously created PeerConnection (who give us up to the chicken-or-the-egg problem...) and not being able to use directly the STUN servers (PeerConnection manage the connection creation just doing what I wanted to do, but the specification doesn't give access to this low-level functionality) I decided to wait until the conference, where they gave me a little proposition about how to solve it, although I was a little reluctant about it, and in fact I believe they didn't hope it would work flawlessly: PubNub.

PubNub is a web service that allow to publish messages to a group of peers subscribed to a channel. It's say:   you send a message, and it's received by everyone it's listening. It's a little bit like killing a fly with a gun since the signalling message is sent to everyone is connected, but checking by hand that the message is for you the problem is easy to solve and also it has several advantages:

  1. It's not a dedicated server, it's a public server, so it's dificult to break it down (there would be too much affected...)
  2. there are other alternatives, and also it's being developed a public specification
  3. the free accounts have a very restrictive limit about the number of connected peers, what helps to focus on it as a bootstrap protocol and change inmediatelly on a DataChannels based one, increaing the network density just as I designed originally (the last week I was too much focused thinking about using the signalling channel for everything...)
But also it has another good point: since I have been testing so much protocols these day and thinking about to be able to use several of them at a time since no one gave me the flexibility and annonimity I wanted, the fact is that I ended developing a SignalingManager that could be able to abstract the signalling mechanism and adding a new one was just a matter of build a little class, so I did a new one for PubNub (after registering me as a developer on their page), launched the webapp... and it worked, period. Just like magic the both peers were talking though PubNub without a dedicated server... and also from two different host domains!!! :-D This means that you can download the webapp from different hosting and all of them could be able to communicate, allowing more heterogenety: if one of them gets down, you just need to navigate to another one and keep sharing :-) I need to investigate about how to share IndexedDB between the different domains in case of problems, but it seems will be something difficult to achieve and will only be able to show "backup cache" link so you can import it on another one... :-/

But these are only the good news? No, there's another one, maybe more little, but with greater consecuences: yesterday I was helping to Arindra Das over Skype with her problems with ShareIt! (really, he found a bug :-P ) and asked to him to share something so I could be able to make some test on my side, and the fact was that "magically" a PDF was shared with me from Findland to Spain. Yes: ShareIt! WORKS!!! :-D Having problems previously on some demos and not able to test it before between machines (just my main computer and my parent's one, both on my home LAN), it was a great surprise to see that it worked on the wild Internet, so adding this the "server-less" signalling thanks to PubNub, when we got native DataChannels on the browsers this project will be able to take flight :-D Let's hope they will be ready for New Year Eve... ;-)