Google Summer of Code 2012 :: Project Ideas

In Monkey HTTP Daemon Project, we have defined our most highest priorities, the ideas proposed here are not exclusive and they could be taken as a base for your proposal, you are encouraged to expand them or to propose your own ideas. Feel free to contact us to discuss them, you can reach us in our mailing list or through the e-mail address . We want to hear about you!



Project Ideas

  • Android / Lightweight Webservices with Monkey
  • Duda: Redis and Memcache support
  • Duda: Memory handler and Garbage Collector
  • FastCGI
  • Monkey SDK (Software Development Kit)
  • Benchmark / Resources usage
  • GIT Protocol Support
  • WebSockets
  • Lib Monkey
  • Lua Integration

  • Android / Lightweight Webservices with Monkey

    • Keys Android, HTTP, C, Java, API
    • Difficulty High
    • Description The Android software stack, expose different objects to perform networking tasks. Currently if one application wants to create a web service, it have to use the HttpService class. That HTTP processor provided by HttpService class cannot handle multiple applications instances under the same process context, each application requires to start a new HTTP processor for it needs, they cannot share the service among different applications. So this impact performance and could waste extra resources when is not necessary.

      To solve the issue mentioned, this project aims to connect and expose a Java Android API for high level applications looking for expose web services through Monkey HTTP Daemon, gaining huge performance improvements compared with the current HttpService Java class.

      Monkey expose a web services API interface through the plugin called Duda, so this project involves to work with the Android NDK and Android SDK related tools to create the integration between the actors. Please review the following slides which cover the global overview of the project in question:


      Monkey is currently ported to Android, so the project it self is to implement the C/Java interfaces to expose the features to the high level applications.

      • Tasks involved are (but not restricted to):
      • Implement web services listener/manager
      • Extend Duda to support a proxy interface
      • Implement Android HTTP service layer connected to previous components mentioned
      • Create and Android application example that uses the web service feature implemented
      • Create an Android bundle to distribute the Web Services implementation
      • Documentation of web service API (C/Java) and code internals
      We aim to empower every Android platform with a strong and lightweight web services interface, are you ready for this ?

    • Skills Required High knowledge of C ; Medium knowledge of Java

    Duda: Redis and Memcache support

    • KeysC, Socket, Web Services
    • Difficulty Medium
    • Description Monkey provides a web services framework called Duda. This framework expose a friendly API to develop event-driven web services in C. This project aims to add support for Redis and Memcache as key-value store technologies in Duda.

      The implementation of Redis and Memcached will be pretty similar but not equal, both of them have a similar methodology of work based on asynchronous sockets and a clean API. A short description of each project:

      • Redis is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.
      • Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.
      The integration must be done using the C interface provided by the official client libraries of each project, the mentor will assist teaching the Monkey API and how duda integrates on it.
    • Skills Required High knowledge of C, Networking and Protocols

    Duda: Memory handler and Garbage Collector

    • Keys C, Cache, Memory
    • Difficulty Medium
    • Description Monkey provides a web services framework called Duda. This framework expose a friendly API to develop event-driven web services in C. This project aims to create a new memory handler and garbage collector for web services.

      Duda framework tries to hide as much as possible the web server internals and architecture complexity, providing a high level API easy to use. Currently the developer is forced to allocate memory space by their self and then take care of release it when it have done, this is not the desired behavior so we propose to improve Duda to have a memory handler and a garbage collector who cares about unused memory when the web services finish their work. For this project is required to design a new memory allocation API and a garbage collector capable to handle the many object types provided by Duda. Remember that we care a lot of performance so the implementation must be smart.

    • Skills Required High knowledge of C

    FastCGI

    • Keys C, FastCGI
    • Difficulty High
    • Description FastCGI is an open extension in replacement to the old CGI interface, it provides a flexible and remote environment for applications generating dynamic content, making it scalable and reuse-resources when new OS process context are required for each request.

      This project aim to develop the FastCGI extension/plugin for Monkey Project, it must cover the full specification and provide a flexible configuration based on Monkey indented configuration mode.

      Some tasks involved are:

      • Design configuration schema
      • Load balancing between nodes
      • Specific log writter for fastcgi requests/responses
      • Configurable persistent TCP connections
      • Non-blocking sockets (event-driven)
      • Timeout Watcher
    • Skills Required High knowledge of C, Networking and Protocols

    Monkey SDK (Software Development Kit)

    • Keys UI, Python
    • Difficulty Medium
    • Description Monkey is developed with embedded in mind, due it is potent API and flexible architecture, it fills perfect in any Linux based device, in short terms, is a very attractive software for embedded developers.

      In order to improve the developer experience, this project aims to create a Software Development Kit (SDK) for developers who looks for extend monkey and requires an easy way to debug, introspect the HTTP core internals and get resource usages, all this in a beautiful user interface.

      The SDK components tools, must have/perform at least the following features:

      • PyGTK User Interface
      • Manage development environments of Monkey instances
      • Check on fly properly plugins hooks declarations
      • Meassure CPU, network and memory usage (some graphs would be good)
      • Viewer of open file descriptors per worker
      • Run unit test scripts (already available under qa/ directory)
      • SDK Plugin: this component export Monkey internals to the SDK UI
      • Integration with Cheetah interface
      • Customized unit tests for developers
      • Support web services creation through Duda
      Remember that a SDK makes life easier, you are encourage to have happy end-developers.
    • Skills Required Required Medium knowledge of C and Python, GTK is a good to know but not mandatory

    Benchmark / Resources usage

    • Keys C, Performance, API
    • Difficulty High
    • Description One of Monkey project goals is performance, and optimize for embedded systems requires a continue measure and improvements. Actually exists many tools to measure software but for our case we need a specific set of tools to perform benchmark and analyze the resources usage.

      This project requires to write a set of tools to cover the following topics:

      • Measure global performance over specific architectures (mostly ARM) (based in a HTTP request unit)
      • Profiling plugin: it gather timing stats from Monkey Core API calls, HTTP stage events and also plugin hooks for further analysis. It must generate report in normal text format as well for rrdtool.
      • Resource usage: Analyze and report a different set of metrics based on: file descriptors (by type: file or socket), Memory usage by HTTP cycle, CPU cycles/jiffies, etc.
      • Automated reports for deployments

      Is good to mention that all memory allocations by Monkey are performed inside specific wrappers, so you can adjust the code and add conditional macros for compiling time to include the resource usage features, more details will be shared by the mentor.
    • Skills Required Good background in C

    GIT Protocol Support

    • Keys C, GIT
    • Difficulty Medium
    • Description Git is a free and distributed version control system. This project aims to add Git HTTP support to Monkey web server so it can be used to export repositories over HTTP in a efficient manner.

      Git since it's version 1.6.6 implements a "Smart HTTP Transport" over git-http-backend CGI, the implementation works under a CGI context, that means common web servers requires to fork(2) and pipe(2) to make it work, even when using FastCGI it requires extra resources when high concurrency exists decreasing performance. The project aim to create a similar code of git-http-backend to Monkey as a plugin/extension obtaining the following improvements: no forks required, no CGI context, asynchronous sockets, less overhead on server, etc. It must be configurable through configuration files.

      The project also cover to perform different benchmarks comparing git-http-backend versus the integrated version in Monkey. We also expect to benefit many open source projects with this implementation. Are you ready ? ;)
    • Skills Required High knowledge of C, Basics of HTTP

    WebSockets

    • Keys protocols, http, C, events
    • Difficulty High
    • Description Websockets is a technology providing for bi-directional, full-duplex communications channels, over a single TCP socket. The goal of this project is to provide full support of Websockets specification to Monkey through the plugin interface.

      This is a very interesting and potent protocol that works on top of HTTP, its considered a 'rich' feature due to it's low resources usage.

      Some tasks for this project are (but not restricted to):

      • Implement websocket protocol
      • Design configuration schema at global and vhost levels
      • Meassure communication timmings and delays
      • Analyze resources usage
      • Collect and export statistics through web or command line interface
      • Create websocket broadcaster application
      • Document the code and create How To's

      Is required that you have a basic knowledge of HTTP and a good background in C, having experience with event-driven sockets is a plus.
    • Skills Required High knowledge of C, Basics of HTTP

    Lib Monkey

    • Keys C
    • Difficulty High
    • Description Monkey core is a fully feature HTTP server with extensions support through it APIs. The idea of this project is to create an alternative building system to adapt Monkey and convert it in a shared library instead of a standalone executable, so it can be used by third party programs as any library is used.

      The project cover at least the following tasks:

      • Create a shared library instead of a executable binary file
      • Design and create the library API
      • The API should be able to setup everything as it's done in executable mode
      • Document the library API and create examples of it's usage
      • Expose HTTP event hooks so the developer can define specific behaviors
      • Adapt debian builder system to package the library so we can distribute it :)
    • Skills Required High knowledge of C, Basics of HTTP

    Lua Integration

    • Keys C, Lua
    • Difficulty Medium
    • Description Lua is an interpreted programming language that can be embedded easily in any program, it can be merge in C programs without issues. The idea of this project is to extend Monkey to add Lua support, so then Lua scripts can be executed to process and render responses for HTTP requests.

      The project cover at least the following tasks:

      • Create a Monkey plugin which handle the requests for resources written in Lua
      • Define an API for the Lua side and what variables and functions can be used by them
      • Evaluate and port an existing Lua-based web framework, e.g Lua Web Tools http://code.google.com/p/lua-web-tools
    • Skills Required High knowledge of C, Basic Lua Scripting is desirable

    KConfig build system style

    • Keys Kernel Menuconfig, ncurses
    • Difficulty Medium
    • Description Monkey uses a customized and compatible 'configure' script to set the flags and options before the build process. As we are hitting many devices and different Linux system, we need a friendly configuration system to save states of different build setups. We are proposing to implement the same configurator tool that Linux Kernel uses: KConfig. The project cover at least the following tasks:

      • Design a configuration spec for Monkey features
      • Handle platform specifics
      • Support multiple configuration files
      • Handle built in plugins
      • Handle Duda web services
    • Skills Required Compiling Linux Kernel experience