Coder Social home page Coder Social logo

o2r-project / o2r-informer Goto Github PK

View Code? Open in Web Editor NEW
0.0 6.0 0.0 96 KB

:warning: Project discontinued :warning: Funcions now integrated in o2r-project/o2r-muncher

Home Page: http://o2r.info

License: Apache License 2.0

JavaScript 53.98% HTML 32.81% Shell 3.38% Dockerfile 9.83%

o2r-informer's Introduction

⚠️ Project discontinued ⚠️ Funcions now integrated in https://github.com/o2r-project/o2r-muncher

o2r informer

Node.js implementation of the WebSocket status update part of the o2r-web-api.

Requirements:

  • nodejs
  • npm
  • MongoDB

Preparing the MongoDB

This service uses the MongoDB oplog (operations log), which is normally used in replication sets, to trigger status events for clients. The oplog originally records all changes to the master MongoDB and provides them to potential replications. On a single-server installation, this is not enabled by default, so you will need to enable replication to enable the oplog.

Dockerfile

This project includes a Dockerfile which can be built with

docker build -t informer .

Available environment variables

  • INFORMER_PORT Define on which Port o2r-informer should listen. Defaults to 8082.
  • INFORMER_MONGODB Required Connection string for the MongoDB. Defaults to mongodb://localhost:27017/. You will very likely need to change this.
  • INFORMER_MONGODB_HOST and INFORMER_MONGODB_PORT Port for the MongoDB. Defaults to localhost respectively 27017. You will very likely need to change this. This information is duplicated with the previous setting because different packages are used to connect to the MongoDB.
  • INFORMER_MONGODB_DATABASE Which database inside the mongo db should be used. Defaults to muncher.

API endpoint

The current status of a job logs is published using WebSockets using the socket.io library. You can connect to the namespace api/v1/logs/job with the corresponding Socket.io JavaScript library:

var socket = io('http://<host>/api/v1/logs/job');

See an example in test/index.html.

License

o2r-informer is licensed under Apache License, Version 2.0, see file LICENSE.

Copyright (C) 2017 o2r project.

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.