Wednesday, June 3, 2015

Why are we going to 2.0 ? Third post

I have another cookie to share with you about the advantages that are coming with the rewrite of a second version of Netsukuku.
The modularization work has brought the code to a point where the critical sections about multithreading have been refactored. Without going through too deep details, this has to do with the fact that Netsukuku code makes use of lightweight collaborative threads (also known as microthreads or tasklets).

The old implementation in python was using Stackless Python for this. The new one in Vala is using GNU Pth.

The good news is that this modularization work is going to make it easy to plug in another implementation of a "tasklet" system.

This is good because GNU Pth poses some problems. For instance it is common in a glibc-based operating system, such as most Linux distributions. But it has problems with a uClibc-based system, such as default builds of OpenWRT. Furthermore it's not on Windows.

Hence, next version of Netsukuku will be more easy to port to Windows.


Tuesday, April 14, 2015

Why are we going to 2.0 ? Second post

Modularity


Modularity is another reason for the rewriting of Netsukuku.

The software is being structured in modules, with the aim that each module will be able to operate independently from the others and has no knowledge of the others.

This modularity has advantages. The implementation of simulated network environments will be possible, that will prove the correctness of each aspect of the whole system, putting apart the other ones.

For an example of that, let me introduce the Neighborhood module. This module is responsible for the detection of nearby nodes through a number of NICs. Furthermore, it has the duty to periodically measure the "cost" of the link to a neighbor, expressed as the latency of a message through it. Finally it has to detect when a link becomes unusable.

This module has been already well documented and an implementation has been completed. Then, a testbed has been prepared (both a simulated and a real-world one) that allowed me to verify the behaviour of just this aspect.

The tests have highlighted a couple of problems with the mechanisms of the old implementation, which were an issue in particular when a network segment was under load. And allowed me to explore some adjustments and finally find a good solution.

Status report


There are two other modules that have been documented and for which I feel that the current approach is the final one. The coding phase is going on for them. They are the Qspn and the Peer-Services.

The Qspn module is responsible for the exploration of the network in order to give to each node its knowledge base of the network graph.

The Peer-Services module lays the basis for the creation of peer-to-peer services.

Then, some more aspects of the system have to be addressed. I don't want to bore you with details. A complete release will be ready, I hope, before winter.

Tuesday, March 31, 2015

Why are we going to 2.0 ? First post in a series...


An important reason for the rewriting of Netsukuku 2.0 is the fact that a good documentation is being written, at the same time, for each software module.

There is an overview of the problem that the module addresses and how it is solved.  The problem is described as a whole, but at the same time in a precise and detailed manner.  Also, the role of this module in the solution of that problem is described in details.

Then, the algorithm is described that implements the role of the module. The algorithm is described in great details when it is the case, although using a "pseudo code" language. To the point that it would not be difficult for a developer to follow the steps and write the code in his favourite programming language.

Not all the modules, that will make up the full app, have been described yet. However, if one has already read the old Netsukuku documents written by Alpt and companions, he could easily guess which modules are yet to be described and how they should be integrated in the whole.

There is a problem with this documentation, that is it is written in my mother language: Italian. Since it is a work constantly in progress, I'm not going to translate it into English soon. Do not hold your breath.

At this link you can see the most recent draft of the documentation: https://lab.dyne.org/Netsukuku/ita/docs/development