Management Console Functions
This is the start of a seriously missing part of the functionality. I've been thinking along the lines of some form of UI to manage the system for a while. There are three main functions I want to cover.
- Managing the configuration files including profiles and capabilities for one or more separate instances of erlink-sr.
- Managing the database of options, static and state data, again for one or more systems.
- Starting, stopping and monitoring the systems.
This rather rough diagram may help to show what I intend.

The principle is pretty simple, a web application that has access to everything, the configuration, the database and the applications themselves. To make this work as well as it possibly can it has to be 100% Erlang. The Erlang Web Server 'Yaws' and the application framework 'ErlyWeb' are going to make this happen. It's very early days, I have them running on Windows, but that's all so far.
Why use the Erlang Web Application
There are many advantages to making this web based and also to making it Erlang based.
- I can get a decent user interface without leaving Erlang.
- Because the server code is Erlang it will integrate seamlessly with the rest of the system and editing configurations etc will be much easier as will managing the instances.
- The web application is completely separate from the instances. It is the means of starting up the system, so profiles etc can be selected before starting the radio system(s) itself.
- The current database management is poor. I use dets in Erlang (a kind of persistent term storage) and to edit the static data the Erlang source has to be edited. For the Java parts I useJson which is just persistent structure storage and the same issues apply. Not only is it poor but a lot of the configuration parameters are simply not implemented yet and the updating of these through the user interface has only a very basic implementation. By using ErlyWeb I can take advantage of the bindings to Mnesia, the distributed Erland DBMS and make that the central database for everything. Mnesia is distributed so it can serve multiple instances and can also serve multiple nodes of an instance where they are distributed across machines.
- The web interface becomes the central point for creating and mantaining the system database, as well as querying, repairing and migrating the structure as necessary. Again this can be done outside of the radio application,.
- A major advantage is the browser can be started anywhere to manage local or remote systems. It can manage multiple systems either from one central web server or from multiple servers.
- It's the best cross-platform solution.
This piece of work will give the system a high level of usability and flexibility. It will also complete the basic system when the full database has been implemented and can be maintained. It won't be a quick fix. If it works as well as expected a logical step would be to provide a basic set of radio functions through the browser and maybe eventually a full set.
Progress so far...
I had some teething troubles. The Yaws build was done for Linux
and after a bit of trauma trying to build it under Cygwin and
using various Windows builds people kindly pointed me to I discovered
that Cean, http://cean.process-one.net/download/, has pre-built
Erlang stuff for most platforms. I had Yaws running within a short
while. The next stumbling block was ErlyWeb, the web framework. It had
a little buglet on Windows which took a while to sort out, again kindly
people on the list.
Wow! The combination of Yaws and ErlyWeb is soooooo powerful. I thought
Ruby on Rails had cut down the code to a minimum, believe me this does
all that ROR does and in even less code and with more elegance.
At the moment I have the Yaws server running as a straight forward
Erlang node. It starts in a few seconds. Running a permanent process
started from the web server is easy. I can send that process a message
to start my OTP based radio system. It's going to be easy to get
feedback on the startup and reflect that in the browser.
I have checked out CSS, that works fine and I am starting to use jQuery
(a javascript library) which looks really cool. This will give all the
effect and widgets I need as well as Ajax support to make things much
more interactive. At present I am using MySQL as the database and
have quite a few of the static tables in there as a test (ErlyWeb
creates testing code just like ROR does).
I think I know enough now to forge on with the design. Once the
design is in place and I have a few screens up I will add them. This is
going to be such a major addition to the system I wish I had pursued
this route earlier.