All Projects → zarplata → keker

zarplata / keker

Licence: MIT license
Easy to use pub-sub message broker via websocket

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to keker

mesa
🌱 Scalable, robust & modern WebSocket wrapper
Stars: ✭ 21 (+75%)
Mutual labels:  websocket-server, pub-sub
Ixwebsocket
websocket and http client and server library, coming with ws, a command line swiss army knife utility
Stars: ✭ 204 (+1600%)
Mutual labels:  websocket-server
Devify Server
A set of lightweight IoT cloud server boilerplates. The simplest way to build isomorphic JavaScript IoT servers.
Stars: ✭ 78 (+550%)
Mutual labels:  websocket-server
Websocket
WSServer is a fast, configurable, and extendable WebSocket Server for UNIX systems written in C (C11).
Stars: ✭ 144 (+1100%)
Mutual labels:  websocket-server
Sketchpad
Sketchpad is fully customisable collaborative whiteboard plugin written in pure JavaScript.
Stars: ✭ 85 (+608.33%)
Mutual labels:  websocket-server
Libhv
🔥 比libevent、libuv更易用的国产网络库。A c/c++ network library for developing TCP/UDP/SSL/HTTP/WebSocket client/server.
Stars: ✭ 3,355 (+27858.33%)
Mutual labels:  websocket-server
Cebsocket
Lightweight WebSocket library for C.
Stars: ✭ 73 (+508.33%)
Mutual labels:  websocket-server
Mongols
C++ high performance networking with TCP/UDP/RESP/HTTP/WebSocket protocols
Stars: ✭ 250 (+1983.33%)
Mutual labels:  websocket-server
Fiery
A flexible and lightweight web server
Stars: ✭ 203 (+1591.67%)
Mutual labels:  websocket-server
Nano
Lightweight, facility, high performance golang based game server framework
Stars: ✭ 1,888 (+15633.33%)
Mutual labels:  websocket-server
Php Wss
Web-socket server/client with multi-process and parse templates support on server and send/receive options on client
Stars: ✭ 117 (+875%)
Mutual labels:  websocket-server
Arduinowebsockets
arduinoWebSockets
Stars: ✭ 1,265 (+10441.67%)
Mutual labels:  websocket-server
Ws Tcp Relay
A simple relay between WebSocket clients and TCP servers
Stars: ✭ 186 (+1450%)
Mutual labels:  websocket-server
Esp32 Websocket
ESP-IDF WebSocket Component
Stars: ✭ 83 (+591.67%)
Mutual labels:  websocket-server
Cwebsocket
cWebsocket is lightweight websocket server library
Stars: ✭ 241 (+1908.33%)
Mutual labels:  websocket-server
Deno Websocket
🦕 A simple WebSocket library like ws of node.js library for deno
Stars: ✭ 74 (+516.67%)
Mutual labels:  websocket-server
Facil.io
Your high performance web application C framework
Stars: ✭ 1,393 (+11508.33%)
Mutual labels:  websocket-server
Embedded Jetty Websocket Examples
Embedded Jetty WebSocket Examples
Stars: ✭ 159 (+1225%)
Mutual labels:  websocket-server
Websocketd
Turn any program that uses STDIN/STDOUT into a WebSocket server. Like inetd, but for WebSockets.
Stars: ✭ 15,828 (+131800%)
Mutual labels:  websocket-server
Websocat
Command-line client for WebSockets, like netcat (or curl) for ws:// with advanced socat-like functions
Stars: ✭ 3,477 (+28875%)
Mutual labels:  websocket-server

Keker

Easy to use pub-sub message broker via websocket.

About:

In recent time become very popular - SPA(single page applications), when all 'view' it`s - 'javascript bundle', which loads on client side and communicates with 'backend' API.

Sometimes SPA wants to provide some interactive events for it's clients, like - friendship request, new message request or something else. So, there are many ways to provide it, Let's look at most popular:

  • polling (Bad way, because this generates unnecessary load on the server(API) without the guarantee of getting the desired(new) data)
  • websocket (Right way, SPA makes only one TCP (full-duplex) connection and waits from backend for new data)

Keker provides websocket's for SPA, for subscriptions, and event listener URL, where the backend sends all events.

How to use:

Build keker

git clone https://github.com/tears-of-noobs/keker.git
cd keker
make

Run keker

./out/kekerd

After start kekerd listen on all interfaces, port - 3498. You may change some default values, see --help for additional information.

Connecting SPA to kekerd

WARNING: You must send HELLO message when your connection is open. Format is simple - HELLO <AUTH_INFO>, where <AUTH_INFO> it's information about client (name, auth token, etc...). If you don't send HELLO message, connection will be fail after one minute.

var socket = new WebSocket("ws://YOU_KEKER_IP:3498/v1/subscribe");

socket.onopen = () => {
    socket.send(`HELLO ${authToken}`);
};

socket.onmessage = function(event) {
  console.log(event.data);
};

Publish events from backend

For publishing events you can send HTTP request with data in arbitrary format(JSON, plain text, etc...) to URL - http://YOU_KEKER_IP:3498/v1/publish, with Header - Token: <AUTH_INFO>, where <AUTH_INFO> - client identificator which used by SPA for subscribing to events.

Thats all :)

License


MIT

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].