Skip to content

barrydevp/bpsp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

132 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic Publish Subscribe Protocol (BPSP)

BPSP is light weight publish subscribe protocol. The project contain the specification and the source code implementation of a client-server for version 1.0.

Installing

Quick start

After install the binary broker server, it can be started with basic configuration:

$ bpsp_server

  INFO] Creating broker listen on 0.0.0.0:29010
  INFO] Binding...
  INFO] Listen...
  INFO] Broker listening on 0.0.0.0:29010 !

The borker will listen on all available network interfaces on your machine. Then use bpsp cli tool to interacting with broker:

$ bpsp sub locationA/sensorA

Broker 1.0.0BPSP - Basic Publish Subscribe Broker

Subscribing on locationA/sensorA .
127.0.0.1:33912 ->> "locationA/sensorA" Received 11 bytes : hello there

$ bpsp pub locationA/sensorA

Broker 1.0.0BPSP - Basic Publish Subscribe Broker

enter: hello there
Published 11 bytes to "locationA/sensorA" .
enter:

Documentation

Building from source

Dependencies

Building

First, download the source code:

$ git clone https://github.com/barrydevp/bpsp .

To build the library, use CMake. Make sure that CMake is added in your path, to verify run:

$ cmake --version

cmake version 3.21.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).

Create a build directory (any name you like) from the root source code, and cd into it. Then run the following command once for all:

$ mkdir build && cd build
$ cmake ..
$ cmake --build . [--config Release]

After building, the server binary file in current directory is the output broker server program.

Testing

After building, run test command:

$ ctest

Development

TODO

Coding convention

Exporting something need prefix with file name. eg: file name status.c export function get_text() will result in status__get_text(). Unexported something ignore this prefix.

Links

Credits

BPSP was written by Hai Dao - barrydevp barrydevp@gmail.com

About

Basic Publish Subscribe Protocol

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages