Code Monkey home page Code Monkey logo

httpmsgbus's Introduction

httpmsgbus (HMB) can be used as a standalone program or as an add-on to
SeisComP [1]; the code can be copied to SeisComP source tree and compiled
together with the rest of the SeisComP using CMake or installed separately using
the install.sh script. Go compiler (<1.16) [2] is required to compile the code.
Go 1.16 and newer are currently not supported due to incompatibilities of the
module system.

Libpcre (pcre-devel, libpcre3-dev or similar Linux package) is also
required, unless the "vendor" directory is removed to link with standard Go
regexp package. Using the standard Go regexp package creates a portable
binary, but there seems to be a memory leak (ever growing cache) in some
Go versions.

In SeisComP, HMB is disabled by default and can be enabled by adding the
following options to ~/seiscomp/etc/kernel.cfg:

hmb.enable = true
hmb.port = 8000

The distribution includes an alternative Seedlink implementation consisting
of "hmbseedlink" and "wavefeed" modules, which can used as a drop-in
replacement for the standard "seedlink" module. Normal seedlink bindings
are used, but only chain sources are supported.

There are two simple demo scripts, send_json.py and receive_json.py, in
doc/examples/python directory. Start httpmsgbus without arguments and call
"python send_json.py notice 'something happened'" in another shell. The bus
http://localhost:8000/test and the queue SYSTEM_ALERT will be created
dynamically. Now start "python receive_json.py" in third shell window. You
can observe that messages sent by send.py will be received by receive.py.

BSON counterpars of the scripts, send_bson.py and receive_bson.py require
the "python-pymongo" package to be installed.

You may also test persistent storage by using the option "-D filedb://filedb"
of httpmsgbus. The folder "filedb" will be created in the current directory
(use filedb:/// for absolute path).

If you are running MongoDB, try "-D mongodb://localhost:27017".

HMB does not implement SSL, HTTP compression and authentication. Those
features can be provided by a reverse proxy (eg., Apache with mod_proxy).

[1] https://www.seiscomp.de/
[2] https://golang.org/dl/

httpmsgbus's People

Contributors

andres-h avatar jmfee-usgs avatar jsaul avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.