mod_wsgi to the stars…

At risk of boring some people I will post once more on my star viewer app and report the latest development. It all started long ago as a Java / java-gnome exercise while I was doing an evening class on astronomy.  Basically the program is based on a PostgresSQL database of celestial coordinates, which can be selected and projected via the brilliant Postgres spatial extension, PostGIS.  A simple GUI allows the user to select stars by constellation and provides an image, annotated with the principal star names.

Now it has transmogrified from an astronomy exercise to a demonstrator of RPi capability.

First, a a brief resumé:

  • it was ported to Raspberry Pi – to see if I could, and retaining Java as its language and java-gnome as its GUI
  • then re-engineered to Python 2, using PyGTK for the GUI
  • then up-graded to Python 3, introducing TkInter as the GUI
  • a web version was developed using an Apache HTTP Server module called mod_python as a CGI type interface – still accessing the PostGIS enabled database server for stereographic projections of star maps

Now a new web technique has been adopted, relying on a new Apache module called mod_wsgi which supports the Python WSGI interface, i.e. the Python Web Server Gateway Interface.  WSGI is said to provide a standard way to interface different web-apps without hassle and it does sem to work pretty well when you get the hang of it.

It’s still not very fast but click here to try it out. A much quicker version is often available here, hosted by Archie, RPi’s desk-side companion – which is a significantly bigger computer.

The end-user sees pretty little difference of course: