What are the IT needs of a train station? If you were sitting in a train station's control room, what kinds of things would it be useful to have control over? Aside from the display of information to passengers, you're probably also interested in doors and in fallback measures when there are network blockages. Sohard AG in Berne, Switzerland is in the business of responding to these types of needs.
In this earlier article on NetBeans Zone, you were introduced to Sohard AG and a NetBeans Platform training that was recently held there. This time, let's have a look at the requirements and architecture of the NetBeans Platform application they've created as the passenger information solution for Regionalverkehr Bern-Solothurn RBS, a local transportation company in Berne.
The entire system controls passenger information displays in four different train stations. The number and types of displays vary from station to station:
- Two stations are equipped with electromechanical "Flap-Board" displays with printed numbers and texts on thin plastic sheets (tracks 9&10, 21&22).
- One station features monochromatic LCD-displays with a rather coarse resolution (tracks 4&5) and an integrated micro kernel Linux controller.
- The main station in Berne is equipped with 16 40" LCD-displays (tracks 21-24, 4 overview displays and 4 waiting room displays), each with its own integrated PC (WinXP embedded). All displays in Berne are fed their content by posting SVG over HTTP. The display software is just a custom built SVG renderer with a HTTP interface.
Doors and Servers
Each station has its own server (Win2008 Server), which controls its displays and connects to one or more stored program control units, which in turn provide information regarding train arrivals or departures. In Berne the system also controls the opening and closing of automatic doors of two waiting rooms, depending on the arrival and departure of the corresponding trains.
There was a requirement that every station has to remain fully operational even in the event of loss of network connectivity from one station to the other. So each station had to have its own server and database node. Sohard AG used HA-JDBC for data synchronization and JGroups for communication between the servers themselves and the UIs.
Central Control Center
The entire information system as well as all train operations are monitored from a control center in Worblaufen. For this control center Sohard AG had to develop a client application on which every single display in every station can be monitored, most of them concurrently, running on a WinXP workstation. This requirement led to the need for a windowing framework supporting detaching of a component from a main Window and placing it in its own Window or Frame on another display. For this application Sohard AG chose the NetBeans Platform simply because of this feature.
The implementation is pretty much straightforward Swing without using (and knowing at that time) too much about the other possibilities provided by the NetBeans Platform.
Photos from the control center with the application running (taken by Toni Epple) can be see here in a previous NetBeans Zone article.
This is the UI running in the control center on two wide screen displays placed one above each other. You can see four TopComponents representing a station each and a TopComponent with the current train list:
Below, the TopComponent of a station (here Berne) shows each track with its two displays and a table containing all remaining arrivals and departures on that track:
Between track 23 and 24 you can see the waiting room door control panel. Here you see the feedback of all four waiting room displays, feedback of the door status (three doors per waiting room), button controls for opening or closing the doors 'manually' and an animated 'timeline' indicating what will happen within the next 20 minutes or so on the two corresponding tracks and when which doors will be opened or closed by the system automatically.
Finally, below, you can see the door situation view of the station in Berne. Door status and errors are indicated here. The visualization is rendered using SVG and the Apache Batik toolkit: