Nrod-go - Sample application to process Train Movements messages from the Network Rail Open Data feed

Related tags

DevOps Tools nrod-go
Overview

NROD Train Movements Processor

Sample application to process Train Movements messages from the Network Rail Open Data feed.

General information about the feed data can be found on the excellent Open Rail Data wiki. The connection is made with the STOMP protocol.

Example Output

2022/01/29 11:56:16 Connecting: datafeeds.networkrail.co.uk:61618 ...
2022/01/29 11:56:16 Connected: ID:opendata-prod[...]
2022/01/29 11:56:16 Subscribed: 1

2022/01/29 11:56:16 Waiting for messages...

2022/01/29 11:56:22 train 1P27 by South Western Railway has arrived at HAVANT (HAV) platform 2 travelling DOWN
2022/01/29 11:56:22 train 1L40 by South Western Railway has departed from TEMPLECOMBE (TMC) platform 1 travelling UP towards GILLINGHAM (DORSET) (GIL)
2022/01/29 11:56:22 train 1L40 by South Western Railway has arrived at GILLINGHAM (DORSET) (GIL) platform 1 travelling UP
2022/01/29 11:56:22 train 2U32 by South Western Railway has arrived at DATCHET (DAT) platform 1 travelling UP
2022/01/29 11:56:22 train 1D25 by South Western Railway has departed from STONELEIGH (SNL) platform 2 travelling DOWN towards EWELL WEST (EWW)
2022/01/29 11:56:22 train 2D27 by South Western Railway has arrived at VAUXHALL (VXH) platform 6 travelling DOWN
2022/01/29 11:56:22 train 2G30 by South Western Railway has arrived at CLAPHAM JUNCTION (CLJ) / CLAPHAM JN. C.S. (XCP) platform 10 travelling UP
2022/01/29 11:56:22 train 1W58 by South Western Railway has arrived at HOLTON HEATH (HOL)
2022/01/29 11:56:22 train 1L44 by South Western Railway has departed from HONITON (HON) platform 1 travelling UP
2022/01/29 11:56:22 train 1P38 by South Western Railway has departed from FRATTON (FTN) platform 1 on line "M" travelling UP
2022/01/29 11:56:22 train 2L38 by South Western Railway has departed from BASINGSTOKE (BSK) platform 1 travelling UP towards HOOK (HOK)
2022/01/29 11:56:22 Waiting for messages...

^C

2022/01/29 11:56:25 Cleaning-up...
2022/01/29 11:56:25 Unsubscribing from subscription...
2022/01/29 11:56:25 Successfully unsubscribed from subscription.
2022/01/29 11:56:25 Disconnecting from connection...
2022/01/29 11:56:25 Sucessfully disconnected from connection.
2022/01/29 11:56:25 Cleaned-up; exiting.

Usage

Prerequisites

  1. an account at the Network Rail Data Feeds website
  2. a subscription to the Train Movements feed of one or more TOCs

Invocation

  1. copy the .env.example file to .env
  2. fill in the username (STOMP_USERNAME) and password (STOMP_PASSWORD) with your log-in credentials of the Network Rail Data Feeds website.
  3. fill in the TOC code for the feed name FEEDS_TRAIN_MOVEMENTS, e.g. a subscription to Stagecoach Sth Western Trains Ltd (HY) shows a TOC code of HY to create the feed name TRAIN_MVT_HY_TOC. Multiple feeds are comma-separated, e.g. FEEDS_TRAIN_MOVEMENTS=TRAIN_MVT_HY_TOC,TRAIN_MVT_ET_TOC
  4. build the container with docker build -t nrod-go:latest .
  5. run the container with docker run --rm --env-file ./.env nrod-go:latest
You might also like...
An experimental Go application that allows an SSH session to interact with the clipboard of the host machine and forward calls to open

Remote Development Manager An experimental Go application that allows an SSH session to interact with the clipboard of the host machine and forward ca

k6 extension to load test Apache Kafka with support for Avro messages and SASL Authentication

xk6-kafka This project is a k6 extension that can be used to load test Kafka, using a producer. Per each connection to Kafka, many messages can be sen

Gmail-cleanup - CLI tool for deleting attachments from gmail messages

gmail-cleanup CLI tool for deleting attachments from gmail messages Quickstart C

Grafana-threema-forwarder - Alert forwarder from Grafana webhooks to Threema wire messages

Grafana to Threema alert forwarder Although Grafana has built in support for pus

The AWS Enumerator was created for service enumeration and info dumping for investigations of penetration testers during Black-Box testing. The tool is intended to speed up the process of Cloud review in case the security researcher compromised AWS Account Credentials.
Sample Driver that provides reference implementation for Container Object Storage Interface (COSI) API

cosi-driver-minio Sample Driver that provides reference implementation for Container Object Storage Interface (COSI) API Community, discussion, contri

Sample multi docker compose environment setup

Instructions This is a demonstration of a Multi Docker Compose. The purpose of this repositoy is ongoing research on "Docker compose" architecture des

This process installs onto kubernetes cluster(s) and provisions workloads designated by the uffizzi interface

Uffizzi Cloud Resource Controller This application connects to a Kubernetes (k8s) Cluster to provision Uffizzi users' workloads on their behalf. While

Composer is a simple process manager for dev environments.

Composer Composer is a simple service manager for dev environments. How to build/install it? To build composer under ./bin, run: make build To build

Owner
ben
amateur computologist. may contain hops.
ben
EdgeDB-Golang-Docker-Sample - The sample of connection between EdgeDB Server and Go Echo API Server

EdgeDB Golang Docker Sample 『Go + Docker Composeを使ってEdgeDBを動かしてみた』のサンプルコードです。 使い

null 7 Nov 2, 2022
network-node-manager is a kubernetes controller that controls the network configuration of a node to resolve network issues of kubernetes.

Network Node Manager network-node-manager is a kubernetes controller that controls the network configuration of a node to resolve network issues of ku

kakao 102 Dec 18, 2022
K8s-network-config-operator - Kubernetes network config operator to push network config to switches

Kubernetes Network operator Will add more to the readme later :D Operations The

Daniel Hertzberg 6 May 16, 2022
Bubbly is an open-source platform that gives you confidence in your continuous release process.

Bubbly Bubbly - Release Readiness in a Bubble Bubbly emerged from a need that many lean software teams practicing Continuous Integration and Delivery

Valocode 35 Nov 29, 2022
go-opa-validate is an open-source lib that evaluates OPA (open policy agent) policy against JSON or YAML data.

go-opa-validate go-opa-validate is an open-source lib that evaluates OPA (open policy agent) policy against JSON or YAML data. Installation Usage Cont

chenk 6 Nov 17, 2022
Sample application accessing kubernetes secrets

Kubernetes secrets API example This git repo illustrates a small application which can access kubernetes secrets. Build small application To test the

Ben Wells 0 Dec 19, 2021
This is a sample application of golang's web framework gin and orm ent.

Gin Ent Sample This is a sample application of golang's web framework gin and orm ent. Components Web Framework: Gin ORM: ent SQL Migration tool: goos

Takumi Ikeda 0 Dec 5, 2021
💧 Visual Data Preparation (VDP) is an open-source tool to seamlessly integrate Vision AI with the modern data stack

Website | Community | Blog Get Early Access Visual Data Preparation (VDP) is an open-source tool to streamline the end-to-end visual data processing p

Instill AI 646 Jan 5, 2023
An open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developersAn open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developers

Developer-oriented Continuous Delivery Product ⁣ English | 简体中文 Table of Contents Zadig Table of Contents What is Zadig Quick start How to use? How to

null 0 Oct 19, 2021
Application open new tab in chrome when your favourite youtuber add new video.

youtube-opener This application open new tab in Chrome when your favourite youtuber add new video. It checks channel every one minute. How to run go r

null 1 Jan 16, 2022