Fandom

Fosm Wiki

Fosm API server

15pages on
this wiki
Add New Page
Comments0 Share

fosm API server is a machine running Debian GNU/Linux 5.0. The API is implemented using GT.M 5.5 database. HTTP requests are handled by apache 2.2. The hard drives are part of a multi-disk array.

Instructions for installing the server on Debian/Ubuntu/Mint are available

File systems Edit

Oct 2016:

Filesystem            Size  Used Avail Use% Mounted on
/dev/md1              924G  751G  127G  86% /
tmpfs                 3.9G     0  3.9G   0% /lib/init/rw
udev                   10M  660K  9.4M   7% /dev
tmpfs                 3.9G  4.0K  3.9G   1% /dev/shm
/dev/md0              856M   36M  778M   5% /boot

Components by folder Edit

Most of the API code is in the /fosm folder.

  • data - storage of database. Approx 700Gb (Oct 2016).
  • fosm.conf - configuration information
  • gtm - symlink to gtm54
  • gtm54 - database executables
  • gtmx - provides the ability to have a GT.M process run with an arbitrary process name
  • journal - GT.M journaling files. Approx 2Gb (Oct 2016)
  • log - ?
  • planet - downloads and minutely updates. Accessible at http://fosm.org/planet/
  • scripts - scripts to handle queries and updates from the public website. Implemented mostly in M script.
  • serenji - M debugging tool
  • temp - Usually empty
  • tools - Usually empty
  • www - Public website http://fosm.org/planet/, available on github, /var/www/xapi symlinks to here

Services Edit

xapi

Apache 2 Configuration Edit

Fairly standard stuff. /etc/apache2/sites-enabled/fosm

It defines environment variables to specify the TCP port M server is using:

  • SERVER_LINK_IP = IP address of M server
  • SERVER_LINK_PORT = Port number on which M server is listening
  • SERVER_LINK_PASSPHRASE = ServerLink's passphrase

Scripts Edit

The main API accesses the perl script /fosm/scripts/serverLink.cgi which passes the relevant environment variables and any POST data to the M server using a TCP connection. The results are passed back to the HTTP client.

serverLink.m is the main entry point for API requests.

xapi.gld maps from M global variables to database files.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.