GSoc Idea: Update System Calls in Core for Event Processing

Update System Calls in Core for Event Processing

Areas Core programming, Kernel APIs
Good if student knows Tcl, C, system programming
Priority Medium
Difficulty medium to high
Benefits to the student learn about hot new network programming paradigms
Benefits to Tcl Improved performance in core
Mentor ?

Project Description

Event-based programming has come into vogue recently for network services; and though historically Tcl has been a pioneering tool in this field, new apps such as node.js and nginx have been eating Tcl's lunch in the mainstream programming arena.

This is due in part to Tcl's conservative use of less-performant system calls such as select() and its equivalents to retrieve event messages from the OS kernel. New high-performance alternatives have appeared on some operating systems such as epoll() on Linux and kqueue() on BSD, which the above-mentioned new tools exploit.

The goal of this project would be to investigate ways to integrate the new higher-performance system calls into Tcl's event loop code.

A preliminary patch has already been developed for using epoll() on Linux [1 ]. This could be used as a starting point for the project.

To resolve concerns about backward- and cross-platform compatibility, various means of instantiating the new calls could be explored as part of the project, such as: a compile-time option, script-level configuration choice, provision of an API allowing loadable libraries to provide custom event-processing code.

Requirements:

Knowledge of:

  • C programming