FAQ
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

Search Discussions

  • Gerhard Häring at Apr 28, 2009 at 8:57 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?
    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
  • Bobicanprogram at Apr 28, 2009 at 12:54 pm

    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
  • Suraj Barkale at Apr 28, 2009 at 2:12 pm

    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
  • Scott David Daniels at Apr 28, 2009 at 4:54 pm

    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....
    Does this sound sensible at all? Any suggestions?
    Look at this talk from PyCon:
    Title:
    Batteries Included! Python on Low Cost Tiny Embedded Wireless Devices
    http://blip.tv/file/1947528

    You might want to try contacting them.

    --Scott David Daniels
    Scott.Daniels at Acm.Org
  • Alex23 at Apr 29, 2009 at 2:55 am

    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.
  • Thomas Heller at Apr 29, 2009 at 5:32 pm

    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
  • Alex23 at Apr 30, 2009 at 12:53 am

    On Apr 30, 3:32?am, Thomas Heller wrote:
    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.
    I was remiss earlier in not mentioning circuits:
    http://trac.softcircuit.com.au/circuits/
    http://groups.google.com/group/circuits-users

    Circuits is an event & component framework that just happens to
    include a cherrypy-like web server, and apparently (I can't find a
    cite) outperforms cherrypy in a number of tests:

    from circuits.web import Server, Controller

    class Root(Controller):
    def index(self):
    return "Hello World!"

    (Server(8000) + Root()).run()

    Full disclaimer: circuits is written by a friend & former colleague,
    who will never forgive me for not having mentioned it in the first
    place :)

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedApr 28, '09 at 7:43a
activeApr 30, '09 at 12:53a
posts8
users6
websitepython.org

People

Translate

site design / logo © 2023 Grokbase