Coder Social home page Coder Social logo

waterviewsrl / irondomo Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 2.0 150 KB

ZeroMQ Majordomo Pattern with CURVE authentication

License: GNU General Public License v3.0

Python 29.47% C 40.67% C++ 29.45% Shell 0.40%
zeromq-majordomo-pattern curve-authentication zeromq zmq iot iot-gateway broker pyzmq majordomo-pattern zeromq-czmq

irondomo's Introduction

IronDomo

ZeroMQ Majordomo Pattern with CURVE authentication, allowing encripted and clear communication between clients and workers.

Extends ZMQ Majordomo (https://rfc.zeromq.org/spec:7/MDP) pattern with CURVE authentication and encription
It provides a Broker with two endpoints for client connection, providing both a clear and a trusted communication channels.

Irondomo Sketch

APIs

APIs and examples are provided for python3 and C/C++.

Python

The package can be installed from source or directly from pip

pip install irondomo

Examples provide documentation of the various APIs and necessary configuration

C/C++

APIs are provided for C and C++ as header only distribution in order to simplify target build. Examples provide documentation of the various APIs and necessary configuration Please find information on how to build and run these examples here: https://github.com/desmoteo/IronDomo/blob/master/C/examples/README.md

irondomo's People

Contributors

desmoteo avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

irondomo's Issues

C: IronDomo broker leaks memory

in s_broker_worker_msg()
zframe_t * command is not properly released.
in idbrokerapi.h:282 free() is called on the zframe pointer. This should be zframe_destroy().

broker implementation in C not purging expired workers

s_broker_purge() is assuming workers in the self->_waiting list are sorted by oldest first.

the original libmdp achieved that by pushing a worker element to the end of the list upon a heartbeat received.
that part is missing in your implementation.

As a result expired workers are never purged from the _waiting list.

To fix:
idbrokerapi.h:259ff should read:

} else if (zframe_streq(command, IDPW_HEARTBEAT)) {
       if (worker_ready) {
           if (zlist_size(self->_waiting) > 1) {
               // Move worker to the end of the waiting queue,
               // so s_broker_purge will only check old worker(s)
               zlist_remove(self->_waiting, worker);
               zlist_append(self->_waiting, worker);
           }
           worker->_expiry = zclock_time() + HEARTBEAT_EXPIRY;

cheers,

Joerg

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.