Web framework for embedded system

Discussion in 'Python' started by Thomas Heller, Apr 28, 2009.

  1. I'm looking for a lightweight web-framework for an embedded system.
    The system is running a realtime linux-variant on a 200 MHz ARM
    processor, Python reports a performance of around 500 pystones.

    The web application will not be too fancy, no databases involved
    for example, but it will need to control some simple peripherals
    (some parallel in/out, some dacs) attached to the system.

    It should provide a user interface showing the current state and
    allowing to manipulate it via a browser, and I will probably need
    to support some rpc as well.

    Does this sound sensible at all? Any suggestions?

    Thomas
    Thomas Heller, Apr 28, 2009
    #1
    1. Advertising

  2. Thomas Heller wrote:
    > I'm looking for a lightweight web-framework for an embedded system.
    > The system is running a realtime linux-variant on a 200 MHz ARM
    > processor, Python reports a performance of around 500 pystones.
    >
    > The web application will not be too fancy, no databases involved
    > for example, but it will need to control some simple peripherals
    > (some parallel in/out, some dacs) attached to the system.
    >
    > It should provide a user interface showing the current state and
    > allowing to manipulate it via a browser, and I will probably need
    > to support some rpc as well.
    >
    > Does this sound sensible at all? Any suggestions?


    I'd try first what I know best. In my case Django. Despite the
    restricted hardware, it might just work fine because you'll only use a
    tiny fraction of it.

    If this doesn't work because of CPU or memory requirements, I'd next try
    to build my own using components like

    - CherryPy for the web server, it should also be able to handle your
    (XML)RPC requirements
    - some templating language like Mako (my favourite)

    It doesn't sound like you need much more.

    You could even build upon wsgiref, string.Template and the XMLRPC stuff
    in the standard library, but that's for people who like tinkering ;-)

    -- Gerhard
    Gerhard Häring, Apr 28, 2009
    #2
    1. Advertising

  3. On Apr 28, 3:43 am, Thomas Heller <> wrote:
    > I'm looking for a lightweight web-framework for an embedded system.
    > The system is running a realtime linux-variant on a 200 MHz ARM
    > processor, Python reports a performance of around 500 pystones.
    >
    > The web application will not be too fancy, no databases involved
    > for example, but it will need to control some simple peripherals
    > (some parallel in/out, some dacs) attached to the system.
    >
    > It should provide a user interface showing the current state and
    > allowing to manipulate it via a browser, and I will probably need
    > to support some rpc as well.
    >
    > Does this sound sensible at all? Any suggestions?
    >
    > Thomas



    You should definitely check out the SIMPL toolkit (http://
    www.icanprogram.com/simpl). We have used this ultra lightweight
    toolkit in several embedded Linux projects. It will allow you to
    seamlessly connect your Python bits with bits more appropriately
    written in other languages like C.

    There is a "hello world" level tutorial on the Python-SIMPL
    capabilities (which includes a web CGI interface) at:

    http://www.icanprogram.com/06py/main.html

    If you have any questions about our SIMPL experiences don't hesitate
    to ask.

    bob
    bobicanprogram, Apr 28, 2009
    #3
  4. Thomas Heller <theller <at> python.net> writes:
    >
    > I'm looking for a lightweight web-framework for an embedded system.
    > The system is running a realtime linux-variant on a 200 MHz ARM
    > processor, Python reports a performance of around 500 pystones.


    You can start with webpy (http://webpy.org/) and build up from there.

    >
    > The web application will not be too fancy, no databases involved
    > for example, but it will need to control some simple peripherals
    > (some parallel in/out, some dacs) attached to the system.
    >
    > It should provide a user interface showing the current state and
    > allowing to manipulate it via a browser, and I will probably need
    > to support some rpc as well.
    >
    > Does this sound sensible at all? Any suggestions?


    I don't know how Python will affect the real-time tasks your system is
    performing. You may want to look at a web framework in C (e.g.
    http://www.koanlogic.com/klone/index.html).
    Regards,
    Suraj
    Suraj Barkale, Apr 28, 2009
    #4
  5. Thomas Heller

    alex23 Guest

    On Apr 28, 5:43 pm, Thomas Heller <> wrote:
    > I'm looking for a lightweight web-framework for an embedded system.
    > [...]
    > Does this sound sensible at all? Any suggestions?


    I'd highly recommend taking a look at CherryPy: http://www.cherrypy.org/

    The developers describe it as a "HTTP framework", being lower-level
    than most of the available web frameworks. But it should be very
    straightforward and more than suitable for your needs.
    alex23, Apr 29, 2009
    #5
  6. Thomas Heller schrieb:
    > I'm looking for a lightweight web-framework for an embedded system.
    > The system is running a realtime linux-variant on a 200 MHz ARM
    > processor, Python reports a performance of around 500 pystones.
    >
    > The web application will not be too fancy, no databases involved
    > for example, but it will need to control some simple peripherals
    > (some parallel in/out, some dacs) attached to the system.
    >
    > It should provide a user interface showing the current state and
    > allowing to manipulate it via a browser, and I will probably need
    > to support some rpc as well.


    Thanks for all the replies I got.

    I will take the 'traditional' route, and probably go with cherrypy first,
    but will still keep an eye on webpy.

    I'm very happy to see that these frameworks deliver ~10 pages per second
    (cherrypy) or ~3.5 pages per second (webpy) out of the box on a system
    that is 50 times slower than a typical desktop PC. Of course these
    were very short pages.


    The other ideas that were posted, the SIMPL toolkit and the
    'Batteries Included! Python on Low Cost Tiny Embedded Wireless Devices'
    stuff, are very interesting as well, but not for this project. Food for
    thought, at least.


    Thanks again,
    Thomas
    Thomas Heller, Apr 29, 2009
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Colin Paul Gloster
    Replies:
    48
    Views:
    1,853
    Colin Paul Gloster
    Apr 10, 2007
  2. Nathan Sokalski
    Replies:
    5
    Views:
    994
    Gaurav Vaish \(www.Edujini-Labs.com\)
    Jan 10, 2007
  3. Nathan Sokalski
    Replies:
    4
    Views:
    273
    Nathan Sokalski
    Dec 21, 2006
  4. Thomas Dodds

    Databind an embedded control in an embedded datagrid

    Thomas Dodds, Jul 26, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    387
    Thomas Dodds
    Jul 26, 2004
  5. Nathan Sokalski
    Replies:
    4
    Views:
    307
    Nathan Sokalski
    Dec 21, 2006
Loading...

Share This Page