Archive for the Projects Category

29 March 2010

Hardware accelerated network monitoring: NetFPGA

NetFPGA

During my third year at Télécom Bretagne, I worked on a project with two colleagues to develop an hardware accelerated network monitoring tool using a NetFPGA. This low-level project was very interesting and made me discover how to develop directly in hardware using a language called Verilog.

To let you discover this project, I pasted below the abstract of our final report.

Abstract

The growing use of the Internet, with services like YouTube, Dailymotion or Peer-to-Peer, raises the demand for larger bandwidths continuously. This and the technological evolution leads to traffic which is becoming more and more important. With the increasing bandwidth, the observation and control of the traffic also needs to be accomplished at a higher speed. This new challenge is being encountered by using hardware implementations of monitoring algorithms.

During our third-year project at Télécom Bretagne we worked on such a hardware implementation using a NetFPGA, a PCI board containing an FPGA and four Ethernet ports. Starting with a simple Ethernet hub that we added to the existing structure of the NetFPGA, we continued with the implementation of a detection of TCP SYN packets. In order to count these SYN packets, needed for the detection of SYN flooding attacks, we used a special stream mining algorithm to reduce the memory needed : the CMS algorithm.

More information

Everything we did about this project is available online on the Trac of our project. The final report is also available (in French, sorry).

1 Comment »

14 December 2009

Django better than a CMS?

Django logo

I recently had to rewrite a website I’m maintaining for a very small business: Le fil à soi. They are 3 teacher who offer courses of chinese massage, qi gong and Gestalt therapy in Bordeaux, France. The requirements for the website are quite simple:

  • presentation of the place, the people, and contact information
  • pages for all courses sorted in categories
  • automatic management of courses dates display and RSS feed generation
  • simple backend to modify courses information (should be used by the teachers, although they don’t really like computers and prefer sending me an email…)

The version I wanted to replace was a hand-made PHP website. I started it years ago when I knew little about websites technical design, so it had become really messy and complicated to maintain. I considered letting someone else maintain the website, so I needed a cleaner version.

Using a CMS: Drupal or WordPress

A CMS (Content Management System) is a platform that makes building a website easy. WordPress is particularly intended to create blogs, but there are plenty of plugins that enable to create any type of websites. Drupal is really made to build websites of any type. There are plenty of plugins too that address about every possible needs (calendar, online shop…)

The strength of these CMSs is that they manage the two parts of the website: the user part, and the administration part. The administration part gives you many simple ways to personalize and watch the user part.

I started two small prototypes using these CMSs and came to the same conclusion: none of them perfectly addresses my very simple needs.

For example for the courses dates managment: plenty of plugins do something close enough to what I want, but none do it exactly. So I will have to personnalize a plugin, probably without real documentation of the code. This plugin will then be updated (without documentation again) by its author, and I’ll have to maintain my changes again and again…

It’s the same for the theme: plenty of themes are available but I can’t seriously download and use a design without customizing it.

So I can make my very simple website using a CMS but:

  • the result will be huge, with plenty of features I won’t use (no blog, no users management needed…)
  • it will be difficult to maintain, and I will have to watch updates to the plugins I have customized
  • I will have to make regular updates when the CMS is updated, because known security flows of well-known CMSs are rapidly used by “hackers”

This is a lot of work for such a small website.

Using Django

Django isn’t really a CMS. It’s a Python framework to build websites (comparable to PHP Zend, Ruby On Rails…). So it means that you have to actually write code to use it.

The huge difference with other web frameworks is that Django has originally be developped for a news website, so content management was very important. That’s why an impressive feature is available: an automatic administration generation.

I just had to define my models (what a course is, what a teacher is, what a date, a category is). Then it was mapped to my database and the administration part was generated. I finally defined my views, that is to say the way these models are displayed to the users (with simple tools to generate RSS feeds, sitemaps…)

The advantages of this approach are:

  • the final application is very small, no useless features
  • you get exactly what you want, you haven’t to adapt to random plugins found on the Internet
  • you know perfectly what each line of code does (even if you don’t document it…)
  • the only updates you have to watch are Python and Django updates, that are rare and usually well managed

The only possible drawbacks I see:

  • There are much fewer people who are used to Python Django than people who are used to WordPress, so it will be more difficult to find maintainers (but they will be better :p)
  • Python has to be properly supported by you host. I use OVH, that supports Django only in CGI, but it’s okay for such a small website.
  • There is no WYSIWYG editor by default in Django-generated administration: this can be bad to edit articles (or courses descriptions for me). But it’s fairly easy to add TinyMCE as it’s purely javascript.

Conclusion

If you want to create a simple full-featured blog, use WordPress. If you want complicated features like an online shop, use Drupal.

But if you want to build a simple, dynamic and easy to maintain website, and coding doesn’t scare you too much, use Python Django. You will get exactly what you want, without much efforts, and the result will be very easy to maintain.

Le fil à soi website main page

Le fil à soi website main page

Le fil à soi pages administration

Le fil à soi pages administration

2 Comments »

24 September 2009

Jolicloud internship: first steps of a start-up

Jolicloud internship: first steps of a start-up

I just finished my internship at Jolicloud as part of my studies in TELECOM Bretagne. It lasted almost one year.

Jolicloud is a new start-up created by Tariq Krim (who created Netvibes) that builds an operating system adapted to netbooks and focused on the web technologies and services.

I lived from the inside the launching of a start-up: idea, research, launching of a private alpha, founding, arrival of big competitors (like Google Chome OS), hiring, beta and release roadmap… We were three at the beginning: Tariq Krim, Romain Huet and me.

Regarding development, it is an interesting challenge: transform a Linux distribution into an ergonomic and beautiful operating system based on web technologies instead of the usual Linux technologies (HTML instead of GTK, Javascript instead of C…).

We use Ruby On Rails and JQuery to develop the central web application that constitutes Jolicloud and python to make our web application communicate with the system.

First developments were focused on two things: modify Ubuntu to transform it into the Jolicloud OS, and create an applications directory like the one on the Apple iPhone, to install/remove/update applications in one click. This directory is based on APT, the technology used by Debian (and Ubuntu) to manage files on the system. And Prism has been fully integrated to put web applications (Google Docs, GMail, Facebook…) on the desktop.

The currently available version of Jolicloud is far from complete: it is just an idea of what we want to do. Developments go faster now and we have plenty of ideas I can’t talk about. Sadly I have to go back to school for my 3rd year at TELECOM Bretagne, but I hope I will still be able to participate in Jolicloud.

While Google Chrome OS will probably only allow to launch web applications, local applications can be used with Jolicloud. And Jolicloud wants to integrate all web services, not only Google ones… And Moblin isn’t really focused on the web. Personnally, I would like the Jolicloud concept on my notebook too, if the interface were adapted. So Jolicloud probably has a bright future… to be continued :)

1 Comment »

11 January 2009

Let’s replace Facebook by blogs!

Many people who have blogs say that it’s their main social network. They interact with the commentators. They discover their blogs and enlarge their network of interesting blogs.

The interesting fact about blogs is that they aren’t centralized. So the blogger controls the information it publishes. Whereas in Facebook, only Facebook controls the information you publish. I think that with a few more functions and a dedicated interface, blogs could replace Facebook.

More opened an decentralized discussions

When someone starts a discussion on a blog, it would be interesting if other bloggers could continue the discussion in both their blog, and the original blog. Trackbacks are used for that now, but they are very too limited.

The best would be that your comment on the original blog transforms into a post in your blog, ande discussion would then continus simultaneously in both blogs. The audiences of both blogs would be merged and the discussions would become more interesting.

A Facebook-like administration panel

Many blogs already have a list of top commentators, a list of the most interesting blogs… But to transform a blog into a social network, we would need a list of commentators like the list of firends in Facebook.

It would be interesting too to be able to follow from the administration panel the last posts in the commentators’ blogs, like a Facebook news feed.

Plugins to manage pictures, events… would easily replace the most interesting Facebook functions. And we would have a decentralized network, where the users could control their data.

We could too imagin a platform like Wordpress.com that would allow you to create a social blog as easily as you now create a Facebook profile. Myspace or Skyblog have features that look like social blogs, but they don’t allow to host a blog on an external host, or to have decentralized discussions.

Realisation?

I’m hesitating to create a wordpress plugin and perhaps a small social blogs platform. Perhaps ideas like that already exist?

Il est évident que cette vision des blogs ne serait pas adaptée à tous les blogs : les blogs thématiques par exemple n’ont pas grand chose à voir avec les réseaux sociaux.

Obviously social blogs couldn’t completly replace all usual blogs, but only the ones focused on the blogger.

But I think blogs could be a more interesting, more open, and more secure social network than Facebook, because we could use our own host for our data.

3 Comments »

28 September 2008

Multilingual Wordpress blog

[lang_fr]Drapeaux multicolores dans un temple à Darjeeling en Inde[/lang_fr][lang_en]Multicolor flags in a temple in Darjeeling, India[/lang_en]

This blog uses the Wordpress blog platform. All articles are available in French and English, and the interface of the blog is fully translated.

To do this, I use the qtranslate plugin. It enables to write easily articles, tags and categories in multiple languages. Default Wordpress widgets are also supported.

Use

The plugin modifies the administration of Wordpress by adding a field for each language for articles, tags and categories. For the rest, you have to use a very simple tags system: [ lang_en]English text[ /lang_en][ lang_fr]Texte français[ /lang_fr]

I use too on this blog many other plugins (for the widgets on the right for example). I had to slightly modify almost all plugins to support the languages tags system. You just need to add a call to the __() function – used in Wordpress to translate the interface using .mo files – to translate the strings before they are displayed using the languages tags system.

To enable users to switch from a language to an other, the plugin provides a widget to display. I rather liked to add the links on the top right of the page by inserting <?php echo qtrans_generateLanguageSelectCode('both'); ?> in the header of my template.

Improvements

For now, qtranslate doesn’t provide any system to detect the user language. I added on my blog a message that shows below the header if there is a more adapted translation of the blog available for you.

To do this, I inserted in the header of my template the PHP code in this file.

3 Comments »

Tiny6 – IPv6 in sensor networks

[lang_fr]Capteur MicaZ[/lang_fr][lang_en]MicaZ sensor node[/lang_en]

During the semester I spent in India from January to June 2008, I participated to the Tiny6 project between TELECOM Bretagne in France, the Indian Institute of Technology Guwahati (IITG) and an university in China.

Goal of the project

Sensor networks arenetworks of small nodes that communicate through a wireless link. They often use their own protocol to communicate together and with a machine that fetches data and makes them available on the Internet.

IPv6 is the next version of IP, the Internet Protocol. This new version provides much more adresses than the present IPv4.

All these adresses enable us to give a specific IPv6 adress to each mote in a sensor network, and to let them communicate through the IPv6 protocol. This allows us to simplify the network and make it more reliable by using many bridges between the sensor network and the Internet.

But IPv6 is made to be used with normal computers, while sensor nodes have very limited memory and computing ressources. So it is necessary to create a light protocol, this is what the 6lowpan working group has done.

In IITG, Alexandre, Antoine and me wanted to make this light protocol work on precise sensor nodes, and to let the nodes communicate through IPv6 with TELECOM Bretagne. We used the Matus Harvan thesis, a partial implementation of 6lowpan (IPv6, ICMPv6 and UDP are partially implemented) in NesC, a language used to program the motes, but for different motes.

Difficulties

The first difficulty was to understand how the motes and the Nesc language work. Nesc is a language derived from the C used to minimize the memory and CPU use. To program the motes, we used a base plugged in our laptop through USB. We used an adapted version of Xubuntu, XubunTOS in a virtual machine as an environment to program the motes and to connect them to the Internet.

We have then adapted the code of Matus Harvan to let it work on our motes, less powerful than the ones he used. Debugging the motes was a bit complicated because we had only 2 leds to make blink to know what was happening in the motes.

Finally we had to set up an IPv6 link between TELECOM Bretagne and the IITG. It proved to be complicated because the IITG had IPv6 adresses, but the routers of its access provider weren’t compatible. So we had to establish an IPv6 over IPv4 tunnel.

The most complicated in this project was to communicate with our indian supervisers. Many mutual misunderstandings made us waste a lot of time. It has for example been very complicated to get a routable IPv4 adress to communicate with TELECOM Bretagne. We had to work in the computer center, and the adress was only allowed to communicate with one server in TELECOM Bretagne.

Results

We finally managed to make the sensor motes communicate through UDP with TELECOM Bretagne, and send their measured data. But our will to make the network simpler was made difficult by the use of an IPv6 over IPv4 tunnel between the IITG and TELECOM Bretagne, and a NAT between our virtual and real machine:

Schéma de la connexion des capteurs au réseau IPv6

2 Comments »

10 June 2008

My UWA widgets

[lang_fr]Widgets UWA : write once, run everywhere[/lang_fr][lang_en]UWA widgets: write once, run everywhere[/lang_en]

I am yet migrating to this blog all the projects I maintain. As part of this process, I just migrated all the UWA widgets I created.

UWA widgets are tiny web applications that can run on platforms like Netvibes, IGoogle, Live.com, Opera, the Vista sidebar or the Apple dashboard.

I describe all these widgets in the category "UWA widgets".

Don’t hesitate to try these widgets, and please tell me in the comments on the page about the widget if you encounter problems.

No Comments yet »

1 June 2008

TvOnResEl: watch TV on your computer easily!

[lang_fr]Logo de TvOnResEl[/lang_fr][lang_en]Logo of TvOnResEl[/lang_en]

As I arrived at TELECOM Bretagne, I discovered the ResEl : the students’ network. I discovered too that they were broadcasting all free TV channels on the network. The problem : the recommended software to watch these channel was VLC, a very powerful media player, but very complicated to use and not really adapted to watch TV.

So I decided to create a Java multiplatform open-source piece of software that controls VLC with a more adapted interface: TvOnResEl. I released the first version the 16th of october 2006.

In its present version, TvOnResEl allows to watch and save TV, program savings and browse the TV program.

For more information about TvOnResEl, go to the page dedicated to the project.

No Comments yet »

Develop a website for students to choose projects

[lang_fr]Logo de l\\\'UBO[/lang_fr][lang_en]UBO logo[/lang_en]

From january to june 2007, for my second semester project at TELECOM Bretagne “Development project”, I was asked, with 3 other students, to develop an online projects management system for the computer science department of the university Université de Bretagne Occidentale (UBO).

Goals

This website had to allow the persons invited by the projects session administrator to enter projects propositions. These propositions were then validated by the administrator, and shown to the students. THe interested students could then sort their choices. Once it was done, the administrator could assign projects to students, trying to satisfy a maximum of students. The assignments were then notified to the students.

The students had to be identified thanks to the LDAP of the UBO. However the persons who entered projects propositions weren’t all in the LDAP.

The website had to work in the most used browsers, and to use PHP and MySQL server-side.

Problems and solutions

The most difficult problem was the assignment of projects to the students. First we wanted to make an automatic system, but it wouldn’t have been flexible enough, and we hadn’t enough time to implement it. So we decided to create an AJAX interface that allowed the administrator to see in live which students and projects were unsastsified, and which changes could improve the situation. The changes could be saved at any moment to prevent data lost.

The interface for the students to sort the projects was a bit complicated too. So we used javascript to allow the student to slide and sort the projects. However the interface worked properly if javascript was disabled.

We had a little technical problem too to test the authentification system: we worked in TELECOM Bretagne and we hadn’t access to the UBO’s LDAP. So we tested the authentification with the TELECOM Bretagne’s LDAP, and we made the last changes during the deployment on the UBO’s server.

Difficulties

La première difficulté que nous avons rencontrée est que parmi le groupe de 4 étudiants pour ce projet, j’étais le seul à avoir déjà développé en PHP. Il a donc fallu du temps pour que les 3 autres apprennent ce langage.

THe first difficulty was that among 4 students, I was the only one to already know PHP. So the 3 others needed time to learn this language.

An other problem was due to a bad requirements gathering at the beginning of the project. As the problem wasn’t precise, the requirements have changedduring the project, making us waste a lot of time.

Conclusion

Despite these difficulties, the final result was functional, not beautiful (none of us was designer). It was fairly easy to maintain and properly documented.

I don’t know if our system is presently used at the UBO.

No Comments yet »

31 May 2008

A short adventure: Netvibes modules directory

[lang_fr]Un mini module Netvibes[/lang_fr][lang_en]A Netvibes mini module[/lang_en]

Do you know Netvibes ? This is (in my opinion) the best customizable start page (competitor of iGoogle).

It allows you to put on the same page all the information you are interested in on the web. For this, it uses a modular structure: each user can add the modules it is interested in.

The idea of a netvibes modules directory

Au début, seuls les développeurs de Netvibes créaient des modules, qui étaient accessibles à partir d’une barre latérale dans Netvibes.

At the beginning, only netvibes developpers could create modules, that users accessed thanks to a sidebar integrated in Netvibes.

But on 3rd March 2006, Netvibes announced on its blog the Mini Module API. So anyone with HTML knowledge could create modules for Netvibes. I then tried to create some modules.

Some days later, modules had been created by Netvibes users, but there was no easy way to list these modules. I then decided to create a modules directory. I released it some weeks later at http://twisterss.free.fr/netvibes. The website is now closed, but you can still see it in this blog’s archives.

This directory, that was available in English, French and later in German, was very successful, and most of netvibes modules were rapidly added by their authors.

Collaborating with Netvibes

A bit later, I was contacted by Tariq Krim, then Netvibes CEO, to integrate the directory to Netvibes. Thanks to this collaboration, the design was improved by a Netvibes designer (Maurice Svay), and I added RSS and Ical feeds support to the directory (an idea of Tariq).

Due to difficulties in the integration, my original code hasn’t been used in the Netvibes directory, but my database has been integrated to the Netvibes directory, that is still working.

To avoid multiplying the modules lists, I then deactivated my directory, and replaced it with a redirection to the Netvibes directory.

Conclusion

Finally my directory has only worked during some months, but it has had a lot of visitors. Thus I was obliged to create an advanced caching system, to avoid overloading my free host.

This short adventure allowed me to discover the Netvibes team. I understood too the necessity to write readable code, and to separate it from the appearance of the website, in order to ease the collaboration with other developpers and the reuse of the code. If I had properly used the PHP Zend framework, my code could probably have been reused in Netvibes directory.

No Comments yet »

  • Welcome!

    I write on this blog about my projects, my practices and my discoveries in the domains of the internet, networks and computer science.

    Tristan, French student in TELECOM Bretagne, a "grande école" specialized in telecommunications

    Contact me Twitter Facebook

    Read more »