Monkey HTTP Daemon v0.11.0 has been released

July 18th, 2010 Eduardo Silva No comments

Monkey HTTP Daemon is a very Fast and Lightweight Web Server for Linux. It has been designed to be very scalable with low memory and CPU consumption, the perfect solution for embedded and high production environments.

The project was started in 2001, internally it used to work with forking and threading networking models to attend clients, now, our current branch 0.11 is the second major milestone, we have a new web server working in asynchronous mode, fixed threads, stable API, indented configuration mode and with an excellent performance.

What is new ?

  • Indented Configuration mode
  • Cheetah! Plugin: New ‘config’ command
  • New MaxRequestSize configuration variable
  • Plugin API Interface improved: new functions available
  • Add RPM spec file (Welcome Fedora!)
  • Palm Server
  • Palm Plugin
  • Liana Plugin: Base networking plugin interface
  • Logger Plugin: the logger has been dropped from the core and moved to a plugin
  • Dirlisting Plugin: Allows to list the content of a directory in HTML format
  • Performance improvements
  • Minor fixes

Contributors

We would like to thanks to the following person who have been involved doing code and bug fixes contributions on this release:

Also thanks for take some time to help the project being sysadmin and maintaining our new server.

Join us!

We want to hear about you, our community is growing and you can be part of it!, you can met us in:

  • Mailing list: http://lists.monkey-project.com
  • IRC: irc.freenode.net #monkeyd
  • Categories: Announces, C, Monkey, Programming Tags:

    Monkey HTTP Daemon 0.11.0 coming soon!

    July 12th, 2010 Eduardo Silva No comments

    This week we will release Monkey HTTP Daemon v0.11.0,  stay tuned to our updates in :

    Categories: Announces, C, Monkey Tags:

    Save Python objects to disk

    July 5th, 2010 Eduardo Silva No comments

    Doing some hacks yesterday i found a way to save any Python object to a disk file. Let’s suppose that you have created your own class with some data and you want to save that class to disk and load it later (or even sent the object through a socket :P ), you can do it with the ‘pickle’ core module.

    import pickle

    class Test:

        def __init__(self):

            self.data = ['a', 'b', 'c']

    # Instance object

    t = Test()

    # Open file

    f = open(‘myobject.dat’, ‘w’)

    # Dump data on it

    pickle.dump(t, f)

    # Close file descriptor

    f.close()

    Now let’s load the object and print the class data information:

    import pickle

    # Open object container file

    f = open(‘myobject.dat’, ‘r’)

    # Load object information

    test_class = pickle.load(f)

    # Print class data information

    print test_class.data

    A very useful module, also exists a C implementation of Pickle called cPickle which is faster, give it a try!

    Categories: Programming Tags:

    Monkey HTTP Daemon v0.10.3 is Out !

    June 24th, 2010 Eduardo Silva No comments

    Monkey HTTP Daemon v0.10.3 has been released, check the official site for more details :)

    Categories: Monkey Tags:

    Monkey: Palm Protocol / Application Server

    May 24th, 2010 Eduardo Silva No comments

    In some previous post about Monkey HTTP Daemon project, i have been describing some parts of the new architecture and goals that we are trying to accomplish. Now we have a faster asynchronous web server, very lightweight and with a good designed API to extend the features through plugins.

    I have received some questions about dynamic content generation support, specifically questions like “what about CGI and PHP support ?”, so now is time to describe more in detail how we are handle this through our Palm Protocol.

    Palm Protocol, aims to provide a simple CGI applications server which work over TCP. Is pretty much similar to FastCGI or SimpleCGI, but still more simple :) , basically is a TCP server listening in different ports to serve different dynamic content in a pre-forked model. To explain it better take a look to the following diagram:

    Server Side

    Palm server create specific handlers per configuration, for example, it can be configured to serve PHP and Python scripts, each handler contains information about how many child process will be available, the executable interpreter and optional arguments for it, for example, in order to define a handler for PHP we could add this entry in palm.conf:

    [PHP]
    Port = 2010
    Exec = /usr/bin/php-cgi
    Arguments = -f
    Childs = 5

    That entry specify that the handler will be listening in TCP port 2010, it will create 5 child process and each request will be server by the php-cgi program, adding the -f argument before the script to be called.

    Each handler created is called a ‘Palm’, you can configure as many Palms as you want.

    Client Side

    In the client side, the Palm Plugin for Monkey HTTP Daemon will be listening for specific file extension on each HTTP request, so it can be configured to handle files with .php extension and connect to the right Palm. Here’s a simple configuration line for PHP in the client side, this configuration take place in the plugins/palm/palm.conf file:

    Palm   php   application/x-httpd-php    127.0.0.1     2010

    Each row in the configuration file represents a Palm entry, the fields required are: protocol, file extension, mime type, palm server address and palm server port. This configuration must match the Palm server configuration. So every time that a PHP file is requested, the Palm client will connect to the Palm server to the specific port, send the request and wait for a response.

    Protocol details

    The protocol as mentioned before, is very basic, is composed by the following:

    absolute_script_path + CRLF    (mandatory)
    cgi_header = value + CRLF      (optional)
    CRLFCRLF                                (mandatory)

    a text example could be:

    /home/foo/monkeyd/htdocs/info.php\r\n
    SERVER_SOFTWARE=Monkey/0.11.0-dev\r\n
    SERVER_PROTOCOL=HTTP/1.1\r\n
    HTTP_HOST=localhost\r\n
    QUERY_STRING=a=1&b=2&c=3\r\n
    \r\n\r\n

    The first mandatory row indicates the absolute script path to be interpreted or executed, the second optional row represent the CGI/1.1 headers used by the interpreters, you can add N cgi headers as required, and the final mandatory row indicates the end of the request.

    If any error occurred in the server side, the Palm server must return a formatted plain text or HTML error to the client side, Palm Protocol does not handle error codes.

    Categories: C, Monkey, Programming Tags:

    Flisol Santiago 2010 + Monkey Project !!!

    May 13th, 2010 Eduardo Silva No comments

    El Festival Latinoamericano de Instalación de Software Libre (FLISoL) es el evento de difusión de Software Libre más grande en Latinoamérica. Se realiza desde el año 2005 y su
    principal objetivo es promover el uso del software libre, dando a conocer al  público en general su filosofía, alcances, avances y desarrollo.

    El proyecto Monkey HTTP Daemon y su comunidad, participarán del ciclo de charlas denominadas Rincón del Hacker. El objetivo de nuestra participación, es introducir a los asistentes en la arquitectura de Monkey HTTP Daemon, sus distintos componentes y la interfaz para desarrolladores  (API).

    El evento se llevará a cabo el día 29 de Mayo a las 9:30am en las dependencias de la Universidad de Santiago de Chile en el Centro de Eventos Nacionales e Internacionales, ubicado en Av. Libertador Bernardo  O’Higgins #3363.

    Quienes deseen cooperar a publicitar el evento, pueden hacer uso de los siguientes recursos:

    1) Web     :   http://www.monkey-project.com/flisol2010

    2) Banner :  http://www.monkey-project.com/img/monkey_flisol2010.png

    Más detalles de como llegar al evento… ver aqui:  http://santiago.flisol.cl/donde-y-cuando/

    Los esperamos !

    Categories: Announces, Monkey, Talks Tags:

    Monkey Project Supported by OSUOSL

    May 12th, 2010 Eduardo Silva No comments

    I’m proud to announce that Monkey HTTP Daemon Project now is officially supported by the Open Source Lab of the Oregon State University.

    The OSUOSL has provided a full Virtual Machine which is dedicated to Monkey Project, now we will can host our own services and reduce to zero the hosting costs that we were assuming. Now we are free to add new features, create a demo section and shortly serve the content with Monkey HTTP Daemon :)

    Just thanks to all OSUOSL team who have make this possible!, thanks for support us!

    As an additional reference, OSUOSL support great scale projects as Inkscape, Enlightenment, CentOS and others, check more details in http://osuosl.org/services/hosting/communities

    Categories: Announces, Monkey Tags:

    FLISOL 2010 – Santiago de Chile

    May 4th, 2010 Eduardo Silva No comments

    Categories: Announces, Monkey Tags:

    Nerd Score

    April 21st, 2010 Eduardo Silva 2 comments
    Categories: About me, General Tags:

    Announcement: Monkey HTTP Daemon 0.10.0 has been released

    April 5th, 2010 Eduardo Silva No comments

    Monkey Development team is proud to announce our major milestone: Monkey 0.10.0 !!!

    Introduction

    Monkey HTTP Daemon is a very Fast and Lightweight Web Server for Linux. It  has been designed to be very scalable with low memory and CPU consumption, the perfect solution for embedded and high production environments.

    The project was started in 2001, internally it used to work with forking and threading networking models to attend clients, now, our current release 0.10.0 is one of our major milestone, we have a new web server working in asyncronous mode, fixed threads and with an excellent performance.

    This version has been in development for the last two years, we have rewritten almost 85% of the old code and we have met our goals in a very
    stable product :)

    What’s new ?

    • Asynchronous Server: No more blocking calls.
    • New Pipelining request support
    • New ‘Listen’ configuration directive: allow to restrict incoming
      connection to a determinated network interface
    • QA Packages: We have added a quallity assurance package which help us to
      determinate if the server is working properly as expected, it has different
      type of request and expect specific responses, also it checks the log files
      for every QA request made
    • Plugins Support: Now Monkey support Plugins, we have created a new API
      which provides a very easy way to extend the behavior and features of the
      server.
    • Cheetah! Shell Plugin: This plugin add a command line interface (shell) to
      Monkey!, it has been writen for debugging purposes, check workers status and
      others.
    • Security Plugin : It adds optional security rules to restrict the access
      to the server
    • Worker logger: A new worker is in charge to register the log entries, it
      helps to reduce the I/O
    • Configuration Files: The configuration structure has changed, now we have
      a more organized configuration for global variables and virtual hosts
      directives.
    • A lot of minor bug fixes

    Contributors

    We would like recognize the contribution and help provided by the following
    volunteers:

    • Carlos Ghan
    • Thorsten Schmale
    • Niedobryjasiu
    • Jonathan Gonzalez
    • GreenFox
    • Felipe Astroza

    Join us!

    We want to hear about you, our community is growing and you can be part of
    it!, you can met us in:

    Official Announcement: http://www.monkey-project.com/Announcements/v0.10.0

    Categories: Announces, C, Monkey, Programming Tags: