All Projects → bitwyre → megaphone

bitwyre / megaphone

Licence: GPL-3.0 License
Hear ye, hear ye 📣

Programming Languages

C++
36643 projects - #6 most used programming language
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to megaphone

Facil.io
Your high performance web application C framework
Stars: ✭ 1,393 (+9186.67%)
Mutual labels:  websockets, pubsub
Wsify
Just a tiny, simple and real-time self-hosted pub/sub messaging service
Stars: ✭ 452 (+2913.33%)
Mutual labels:  websockets, pubsub
Uwebsockets.js
μWebSockets for Node.js back-ends 🤘
Stars: ✭ 4,552 (+30246.67%)
Mutual labels:  websockets, pubsub
Uwebsockets
Simple, secure & standards compliant web server for the most demanding of applications
Stars: ✭ 13,412 (+89313.33%)
Mutual labels:  websockets, pubsub
js-libp2p-gossipsub
JavaScript implementation of Gossipsub
Stars: ✭ 76 (+406.67%)
Mutual labels:  pubsub
voxeling
Creative mode WebGL voxel game. Runs in Chrome, with multiplayer functionality and very few dependencies
Stars: ✭ 24 (+60%)
Mutual labels:  websockets
real-time-todo
A real time todo list using websockets
Stars: ✭ 22 (+46.67%)
Mutual labels:  websockets
WebSocketPipe
System.IO.Pipelines API adapter for System.Net.WebSockets
Stars: ✭ 17 (+13.33%)
Mutual labels:  websockets
realtime-chat-go-react
An example of a Real-Time Chat Application built using React.js and Go!
Stars: ✭ 61 (+306.67%)
Mutual labels:  websockets
typesocket
🌐 TypeScript WebSockets library.
Stars: ✭ 24 (+60%)
Mutual labels:  websockets
flask-redis-realtime-chat
A simple Flask realtime chat using Redis PubSub
Stars: ✭ 31 (+106.67%)
Mutual labels:  pubsub
WebsocketBundle
Provides websocket services for Symfony2, including an in-built server, multiplexing, and semantic configuration. Uses Wrench.
Stars: ✭ 50 (+233.33%)
Mutual labels:  websockets
amazon-ivs-simple-chat-web-demo
⚠️ IMPORTANT ⚠️ This repository is no longer actively maintained and will be archived at the end of 2022. A basic live chat implementation built with WebSockets, that can be used in conjunction with Amazon IVS to build compelling customer experiences for live video streams with chat use cases.
Stars: ✭ 53 (+253.33%)
Mutual labels:  websockets
node-red-contrib-blynk-websockets
No description or website provided.
Stars: ✭ 35 (+133.33%)
Mutual labels:  websockets
viper
Real-time tracking and analytics using Node.js and Socket.IO
Stars: ✭ 12 (-20%)
Mutual labels:  websockets
gochess
Online real time chess web server using websockets
Stars: ✭ 32 (+113.33%)
Mutual labels:  websockets
libmcu
A toolkit for firmware development
Stars: ✭ 33 (+120%)
Mutual labels:  pubsub
dataviewer-example
📊 Usage examples of dataviewer - https://github.com/jasrodis/dataviewer
Stars: ✭ 15 (+0%)
Mutual labels:  websockets
go-aws-msg
AWS Pub/Sub Primitives for Go
Stars: ✭ 22 (+46.67%)
Mutual labels:  pubsub
subee
✉️ 🐝 It's not only a bee, but a message - Pub/Sub Worker Framework Implementation
Stars: ✭ 40 (+166.67%)
Mutual labels:  pubsub

Logo

Workflow Status

Megaphone distributes events to many web browsers

Description

This project is essentially a Redis-to-WebSocket adapter in the sense that it will publish to WebSocket clients, whatever string you publish to Redis.

If you connect to redis via redis-cli and type publish trades "some json here", this project will send over WebSocket to all connected clients the message "some json here".

This means we could reuse this project for trades, ticker and orderbook without any code change, only a few runtime environment variables changed such as what topic we subscribe to in Redis.

Building

  • git clone --recursive [email protected]:bitwyre/megaphone.git
  • make deps -C megaphone (requires autotools, autoconf, automake for building libuv)
  • make -C megaphone

Now you should have an executable, megaphone, without any non-standard dependencies to worry about (you can move this executable across different Linux systems without breakage).

Usage

Megaphone is a stand-alone executable you launch with a few environment variables:

  • REDIS_HOST is the address/hostname to the main, internal, Redis pub/sub node
  • REDIS_PORT is the port to said Redis node
  • REDIS_TOPIC is the topic we subscribe to, and listen to events on. What you publish to Redis on this topic will be sent to all WebSocket clients connected to this Megaphone instance
  • SERVICE_IP is the hostname of the WebSocket server
  • SERVICE_PORT is the port of the WebSocket server
  • SERVICE_PATH is the path of the WebSocket server

Example:

  • You need a redis-server running, for instance on localhost and port 6379.

  • REDIS_HOST=localhost REDIS_PORT=6379 REDIS_TOPIC=trades ./megaphone launches one instance, you may launch as many you want, distributing the load among megaphone instances.

  • Now you may test by starting redis-cli and typing publish trades "hello world!", which should trigger a distribution of "hello world! over all to megaphone connected WebSocket clients.

Docker Example

docker run --rm \
    -e "REDIS_TOPIC=pubsub_topic" \
    -e "REDIS_PORT=6379" \
    -e "REDIS_HOST=127.0.0.1" \
    -e "SERVICE_IP=127.0.0.1" \
    -e "SERVICE_PORT=4545" \
    -e "SERVICE_PATH=/ws/topic" \
    --net=host \
    bitwyre/megaphone:latest

Author

Contributors

Copyright

  • © 2020 Alex Hultman
  • © 2020 Bitwyre Technologies LLC
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].