bbc/node-radiovis-stomp-server

Name: node-radiovis-stomp-server

Owner: BBC

Description: RadioVis STOMP server written in node.js

Created: 2017-03-10 10:11:52.0

Updated: 2017-10-05 16:25:03.0

Pushed: 2017-05-19 09:03:56.0

Homepage:

Size: 75

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Build Status

RadioVis STOMP Server

This is an implementation of a subset of the STOMP protocol in node.js, for purpose of deploying a RadioVis service.

RadioVis was standardised in ETSI TS 101 499, Hybrid Digital Radio (DAB, DRM, RadioDNS); SlideShow; User Application Specification.

Running
npm install
npm start

This will start a STOMP server running on port 61613.

Deploying

The BBC deploys a lot of its services using RPMs on the CentOS operating system. We use the speculate tool to generate the RPM spec files and service descriptions in order to install and deploy this RadioVis server.

These are the steps to generate an RPM:

npm install
npm test
npm run spec

Then if you are running on a BBC machine:

cosmos-build --os=centos7 --repository=radiovis

Or if you arn't working within the BBC's development environment, you can use:

rpmbuild -ba --define "_topdir $PWD" SPECS/radiovis-stomp-server.spec
Publishing images and text

Content is pushed to clients via a HTTP POST. The content can be sent using either URL encoding, or as JSON. Text and Image can be sent using separate requests or in the same request. A link may optionally be specified at the same time as an image.

For example to update the text for a station using curl:

curl -v http://localhost:3000/services/station1 -d 'text=Hello World'

Or to update the image and link:

curl http://localhost:3000/services/station2 \
  -d 'image=http://www.example.com/images/myimage.jpg' \
  -d 'link=http://www.example.com/programmes/breakfast'
Running Tests
npm test

To generate a test coverage report:

npm run coverage
License

Copyright 2017 British Broadcasting Corporation

The RadioVis STOMP Server is free software; you can redistribute it and/or modify it under the terms of the Apache License, Version 2.0.

The RadioVis STOMP Server is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache License, Version 2.0 for more details.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.