Git Product home page Git Product logo

fanout's Introduction

/dev/fanout

Kernel-based publish-subscribe system

WHAT:

  • simple, efficient, broadcast IPC, or alternatively
  • simple, efficient, publish-subscribe IPC
  • kernel module implementing a character device

WHY:

  • Efficient: Only N writes for N subscribers compared to 2*N writes for a sockets based system
  • Simple: Kernel based, no need for a new process or daemon
  • Simple: Use mknod to create a channel or topic as a device node
  • Simple: API is just open()/read()/write()/close()
  • Simple: Works with select() for event driven programming
  • Simple: Works with ALL programming languages, even Bash
  • Simple: No dependencies and no libraries to install
  • Simple: Builds on all Linux systems
  • Secure: Access rights tied to filesystem permissions on device node

INSTALLATION:

// comment out #define DEV_MKNOD if on Ubuntu 20.04.
sudo apt-get install linux-headers-`uname -r`
git clone --depth=1 https://github.com/bob-linuxtoys/fanout
cd fanout
make
sudo make install

TEST:

sudo modprobe fanout   # load the kernel module, create 8 nodes
# rename one of the nodes for our use of it
# (or create /dev nodes manually if Ubuntu 20.04)
sudo mv /dev/fanout7 /dev/fanouttest
# Add three subscribers to the topic on /dev/fanouttest
cat /dev/fanouttest &
cat /dev/fanouttest &
cat /dev/fanouttest &
# Publish a messagte to fanouttest topic
echo Hello, World > /dev/fanouttest

NOTES:

See http://linustoys.org for an article on fanout. See Linux Journal of August, 2010 for another article See also http://github.org/bob-linuxtoys/proxy

COPYRIGHT

Copyright 2010-2021, Bob Smith, Frederic Roussel

LICENSE:

At your discretion, you may consider this software covered by either the GNU Public License, Version 2, or the BSD 3-Clause license. http://opensource.org/licenses/GPL-2.0 http://opensource.org/licenses/BSD-3-Clause

fanout's People

Contributors

bob-linuxtoys avatar therishidesai 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.