All Projects → alash3al → Wsify

alash3al / Wsify

Licence: mit
Just a tiny, simple and real-time self-hosted pub/sub messaging service

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Wsify

streamr-client-javascript
JS library for interacting with Streamr APIs: publishing and subscribing to data, creating streams, etc.
Stars: ✭ 35 (-92.26%)
Mutual labels:  realtime, pubsub, realtime-messaging
Engine And Editor
Streamr Core backend
Stars: ✭ 44 (-90.27%)
Mutual labels:  pubsub, realtime-messaging, realtime
Beaver
💨 A real time messaging system to build a scalable in-app notifications, multiplayer games, chat apps in web and mobile apps.
Stars: ✭ 1,056 (+133.63%)
Mutual labels:  pubsub, pusher, realtime
fastapi websocket pubsub
A fast and durable Pub/Sub channel over Websockets. FastAPI + WebSockets + PubSub == ⚡ 💪 ❤️
Stars: ✭ 255 (-43.58%)
Mutual labels:  realtime, pubsub, realtime-messaging
docs
The official soketi documentation. 📡
Stars: ✭ 55 (-87.83%)
Mutual labels:  pusher, websockets, realtime
live-cryptocurrency-streaming-flutter
A Flutter app with live cryptocurrency updates, powered by Ably
Stars: ✭ 26 (-94.25%)
Mutual labels:  websockets, realtime, realtime-messaging
soketi
Just another simple, fast, and resilient open-source WebSockets server. 📣
Stars: ✭ 2,202 (+387.17%)
Mutual labels:  pusher, websockets, realtime
core-api
Streamr Core backend
Stars: ✭ 52 (-88.5%)
Mutual labels:  realtime, pubsub, realtime-messaging
Design-Prototype-Feedback-Application
Invision-like Design Prototype Feedback Application built using Laravel Vue and Pusher
Stars: ✭ 13 (-97.12%)
Mutual labels:  pusher, realtime
pushest
Bidirectional Pusher client in Elixir
Stars: ✭ 33 (-92.7%)
Mutual labels:  pusher, websockets
opal
Policy and data administration, distribution, and real-time updates on top of Open Policy Agent
Stars: ✭ 459 (+1.55%)
Mutual labels:  realtime, pubsub
megaphone
Hear ye, hear ye 📣
Stars: ✭ 15 (-96.68%)
Mutual labels:  websockets, pubsub
flask-redis-realtime-chat
A simple Flask realtime chat using Redis PubSub
Stars: ✭ 31 (-93.14%)
Mutual labels:  realtime, pubsub
bong-bong
Open public chat service built for the web.
Stars: ✭ 17 (-96.24%)
Mutual labels:  websockets, realtime
django-rest-live
Subscribe to updates from Django REST Framework over Websockets.
Stars: ✭ 48 (-89.38%)
Mutual labels:  websockets, realtime
laravel-realtime-chat-pusher
Contoh aplikasi realtime chat dengan pusher
Stars: ✭ 36 (-92.04%)
Mutual labels:  pusher, realtime
echo-server
Echo Server is a container-ready, multi-scalable Node.js application used to host your own Socket.IO server for Laravel Broadcasting.
Stars: ✭ 36 (-92.04%)
Mutual labels:  pusher, websockets
mojo.js
🦄 The Mojolicious real-time web framework for Node.js
Stars: ✭ 145 (-67.92%)
Mutual labels:  backend, websockets
vue-input-streaming
A Vue2 Input Streaming RealTime And Two Way Data Binding Broadcasting with Pusher
Stars: ✭ 24 (-94.69%)
Mutual labels:  pusher, realtime
Emitter
High performance, distributed and low latency publish-subscribe platform.
Stars: ✭ 3,130 (+592.48%)
Mutual labels:  pubsub, realtime

Websocketify (wsify) v2.0 StackShare

Just a tiny, simple and realtime pub/sub messaging service

Quick Demo

Why

I wanted to create a tiny solution that can replace pusher and similar services and learning more about the realtime world, so I dispatched this project.

Features

  • No dependencies, just a single binary !
  • Light and Tiny.
  • Event-Driven Design webhooks.
  • A client can listen on any resource.
  • You control whether a client is allowed to connect, subscribe, unsubscribe using any programming language !.
  • A client defines itself using key via the url query param i.e ?key=123.
  • Send messages to only certain users.

Installation

  • Docker ? > docker run --network host alash3al/wsify -listen :8080 -webhook "http://localhost/wsify.php"
  • Binary ? > goto the releases page and download yours.
  • From Source ? > go get -u github.com/alash3al/wsify

Questions

(1)- How can a client/device connect to the websocket service?

by simply connecting to the following endpoint ws://your.wsify.service:port/subscribe

(2)- How can a client subscribe to a certain channel(s)/topic(s)?

after connecting to the main websocket service /subscribe, you can send a simple json payload commands to ask wsify to subscribe/unsubscribe you to/from any channel/topic you want!

(3)- What is the commands format?

{
	"action": "subscribe",
	"value": "testchan"
}

(4)- Can I control the client command so I can allow/disallow certain users?

Yes, each client can define itself using a query param ?key=client1, this key will be passed to the webhook endpoint as well as the event being executed, and here is the event format:

{
	// one of the following: connect|subscribe|unsubscribe|disconnect
	"action": "subscribe",

	// the channel if provided
	"value": "testchan",

	// the key provided by the client
	"key": "client1"
}

(5)- How can I publish message to i.e testchan?

Just a post request to /publish with the following format:

{
	// the channel you want to publish to
	"channel": "testchan",

	// the data to be send (any format)
	"payload": "testchan",

	// array of clients "keys" (if you want certain clients only to receive the message)
	"to": []
}

i.e

curl -X POST \
	-H "Content-Type: application/json" \
	-d '{"payload": "hi from the terminal", "channel": "testchan"}' \
	http://localhost:4040/publish

(6)- Can I skip the webhook events for testing?

Yes, wsify --events="" empty events means "NO WEBHOOK, WSIFY!"

(7)- How can I secure the publish endpoint, so no one except me can publish ?!!

Easy :), Just change the endpoint to something more secure and hard to guess it is an alternative to access tokens .. etc, wsify --publish="/broadcasteiru6chefoh1Yee0MohJ2um5eepaephies3zonai0Cae7quaeb"

(8)- What about other options?

wsify --help will help you !

(9)- What is the websocket client used in demos?

Simple Websocket Client

(10)- How I can use it over SSl/TLS with Nginx?

You can use proxy, add this lines on your Nginx configration

    location /websocket/subscribe {
        proxy_pass http://localhost:4040/subscribe;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
    }

Now you can call websocket by wss://yourdomain.com/websocket/subscribe

Quick Demo2

Author

This project has been created by Mohamed Al Ashaal a Crazy Gopher ^^!

Contribution

  • Fork the Repo
  • Create a feature branch
  • Push your changes to the created branch
  • Create a pull request.

License

Wsify is open-sourced software licensed under the MIT License.

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