Páginas

miércoles, 1 de mayo de 2013

Not so dead...

Remember my last post where I told would kill DataChannel-polyfill and work since now on native DataChannels because I got too much behind with them? Well...

...not so real :-)

Since the last post I have been thinking almost obsesively with the problem of needing a deprecated browser version just because of using my DataChannel-polyfill using WebSockets, and not working in latest versions with native support for DataChannels (that, by the way, sucks). So taking in account that the DataChannel-polyfill test code works with native ones I conclude that it would be just a problem on ShareIt! side not being fully compliant, so I went straight to it, removed all references to my polyfill and started again over with the handshake and PeerConnections layer from scratch, fixing one bug at a time.

And finally, after just some hours of work (instead of several days as I thought), it worked :-)

I must to admit that it's not the best implementation ever (I still ask my self why the h*ll is required to exchange some 'candidate' messages between the peers) and also it only support to transfer files and data up to 1Kb until they implement native reliable support (or I use reliable library, whatever comes first... :-) ), but the fact is that this almost mystical sensation after seen this thing working and with so few work (just some little tune-ups on the code thanks to the fact I develop DataChannel-polyfill trying to mimic the original specification API) it's really awesome :-D

So, not only I have experimental native DataChannels support on ShareIt! (F*ck yeah!!!!! :-D) but also being so little the diferences I've decided not only don't kill DataChannel-polyfill, but also try to improve it now that I know how native DataChannels work (and being so easy to use :-) ) and think about how to make a backward compatible API so older browsers could talk with newer ones :-)

But don't get me wrong little friends, the most important part of this post, if it was not clearly noticed yet, is the fact that now we don't need servers at all, being fully decentralized and serverless :-D Combine this with the Holy Grail of Internet that almost can bring us the HandshakeManager and the handshake servers, and wonder what an awesome future is waiting us... :-D

No hay comentarios:

Publicar un comentario