poniedziałek, 4 czerwca 2012

Hello there !

After all efforts I've put into my application for GSoC 2012 I've managed to get involved in this event. My host organization is Jitsi.org under umbrella of XMPP Standards Foundation. The project that I work on is pseudo-tcp protocol implementation in Java. It's about reliable and controlled data transfer, but lightweight at the same time. This can be achived by using UDP as a transport layer and implementing only the most essantial parts of TCP specification. In fact the protocol is already implemented in Google's libjingle in C++. My implementation must be fully comapatible with this one.

My work has started when I was writing my application. I've spent a few days on digging into libjingle's code and documentation to build it and run. After that I realized that it wasn't so simple to run the protocol itself on some sockets. It was hidden below few other layers which were no use for me and it was impossible to get into it in such a small amount of time I had. There was available strictly protocol's logic class which requires specific environment to run. It exposes interface to get notified about progress in time and data receivied from another side. So in fact there must be one thread to track time and another to handle socket. It may be not much for someone who writes in C++ everyday, but I had some problems with that as I used it some time ago only for small projects during studies. Finally I've managed to create some code which transferred data between two UDP sockets.

The other task I worked on while applying for the project was to find out how the protocol may be integrated with ice4j library(ICE protocol for Java). So I had read introduction parts of ICE's RFC and tried to understand how it works. As I understood it's about choosing the best connection option of all that are available. When we are connecting using some application through the internet there are usually few routers on the way and our external ip address is different that the local one. Sometimes we can be accessed by local or external address or by using STUN server or maybe something else. ICE is there to choose the best option for us.

My first idea was to add new transport type to ICE library like there are UDP and TCP already. Later I thought that maybe there's no need for that and it would be enough when we will only discover UDP connectivity (there would be no checks if there's pseudo tcp on another side). Then just use UDP adresses to establish pseudo-tcp connection. In this case we should decide on some higher level that we are going to use pseudo-tcp on that sockets. However I'm still not sure which approach should I use and I'll decide about it later when the protocol's implementation will be finished. Probably jitsi dev team will help me with that.

It's been a while since I've started working on the project although official date was the 21st of May. Now the protocol is almost completed and I'll write about that next time.

Brak komentarzy:

Prześlij komentarz