CrossSpider

From Tučňák Wiki
Revision as of 20:04, 22 October 2016 by Ok1zia (talk | contribs)
Jump to navigation Jump to search

CrossSpider is web frontend for DX-Spider DX cluster software. Some DX clusters used Java applet client. But this technology is little obsolete yet. So I wrote this small frontend from scratch for OK0DXI.

Limitations

  • CrossSpider can be used only for read-only access to DX cluster. It does not handle user connection. It is connected as special user which have no filters set.
  • Band filtering is done on client so all spots are transferred via network.

How it works

On the DX cluster computer, small Perl daemon "robot.pl" is running. It is connected to DX cluster using telnet (exactly using netcat program). I start it using systemd but in older distros I used traditional nohup robot.pl & in /etc/rc.local.

The daemon inserts all spots and other messages to PostgreSQL database.

Next part is web page which uses HTML5/Ajax to access latest spots from PostgreSQL.

Download

http://ok1zia.nagano.cz/crossspider


Install

Database

First set up the PostgreSQL database. In this text database name is crossspider, user is robot:

# su - postgres
$ createdb crossspider
$ psql crossspider
crossspider=# create table lines(id serial, stamp timestamp with time zone, call text, qrg numeric(10,1), spot text);
crossspider=# create user robot with password '01001'
crossspider=# grant all on lines TO robot;
crossspider=# grant all on lines_id_seq TO robot;


Allow access for user robot. Edit /etc/postgres/*/pg_hba.conf and add this line:

# TYPE    DATABASE    USER  ADDRESS METHOD      
localhost crossspider robot         password

Robot

Robot is reference to PE1NWL's DX robot.

Of course you have to install Perl first. But it is probaly already part of your distribution. Copy robot.pl somewhere (/usr/local/sbin).

If you use current linux distribution, you probably use systemd for service maintain. It's config directory is /etc/systemd/system. Here create file named robot.service:

[Unit]
Description=DX-robot daemon
Requires=spider.service # depends on how you start the DX spider
After=network.target spider.service

[Service]
Type=simple
User=nobody
StandardOutput=journal
StandardError=journal
Restart=always
RestartSec=3

ExecStart=/usr/bin/perl /usr/local/sbin/robot.pl
RestartSec=10
Restart=on-failure 

[Install]
WantedBy=multi-user.target

If you use older distro, you can use traditional /etc/rc.local or something:

# /etc/rc.local
nohup /usr/bin/perl /usr/local/sbin/robot.pl &