All Projects → Channelstream → Channelstream

Channelstream / Channelstream

Licence: bsd-3-clause
Channelstream is a websocket communication server for web applications

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Channelstream

Django Channels React Multiplayer
turn based strategy game using django channels, redux, and react hooks
Stars: ✭ 52 (+0%)
Mutual labels:  django, chat, websocket, websockets
Bolt Python
A framework to build Slack apps using Python
Stars: ✭ 190 (+265.38%)
Mutual labels:  django, flask, websocket, websockets
Zappa
Serverless Python
Stars: ✭ 11,859 (+22705.77%)
Mutual labels:  django, flask, pyramid
Pyrollbar
Error tracking and logging from Python to Rollbar
Stars: ✭ 169 (+225%)
Mutual labels:  django, flask, pyramid
Async Tungstenite
Async binding for Tungstenite, the Lightweight stream-based WebSocket implementation
Stars: ✭ 207 (+298.08%)
Mutual labels:  async, websocket, websockets
Best Of Web Python
🏆 A ranked list of awesome python libraries for web development. Updated weekly.
Stars: ✭ 1,118 (+2050%)
Mutual labels:  django, flask, pyramid
Webargs
A friendly library for parsing HTTP request arguments, with built-in support for popular web frameworks, including Flask, Django, Bottle, Tornado, Pyramid, webapp2, Falcon, and aiohttp.
Stars: ✭ 1,145 (+2101.92%)
Mutual labels:  django, flask, pyramid
Django Sockpuppet
Build reactive applications with the django tooling you already know and love.
Stars: ✭ 225 (+332.69%)
Mutual labels:  django, websocket, websockets
Zappa
Serverless Python
Stars: ✭ 224 (+330.77%)
Mutual labels:  django, flask, pyramid
Microwebsrv2
The last Micro Web Server for IoTs (MicroPython) or large servers (CPython), that supports WebSockets, routes, template engine and with really optimized architecture (mem allocations, async I/Os). Ready for ESP32, STM32 on Pyboard, Pycom's chipsets (WiPy, LoPy, ...). Robust, efficient and documented!
Stars: ✭ 295 (+467.31%)
Mutual labels:  async, websocket, websockets
Django Private Chat
Django one-to-one Websocket-based Asyncio-handled chat, developed by Bearle team
Stars: ✭ 376 (+623.08%)
Mutual labels:  django, chat, websockets
Briefing
Secure direct video group chat
Stars: ✭ 710 (+1265.38%)
Mutual labels:  chat, websocket, webapp
Aiowebsocket
Async WebSocket Client. Advantage: Flexible Lighter and Faster
Stars: ✭ 263 (+405.77%)
Mutual labels:  async, websocket, websockets
Ratchet
Asynchronous WebSocket server
Stars: ✭ 5,596 (+10661.54%)
Mutual labels:  async, websocket, websockets
Bigq
Messaging platform in C# for TCP and Websockets, with or without SSL
Stars: ✭ 18 (-65.38%)
Mutual labels:  broadcast, websocket, websockets
Angular Chat
(IM App)Chat App built using Angular and Socket.io
Stars: ✭ 12 (-76.92%)
Mutual labels:  chat, websocket
Channelslightscontrol
Demo app with Django Channels to control Lights over websockets. Made for PyStPete meetup(https://www.meetup.com/Saint-Petersburg-Python-Meetup/).
Stars: ✭ 14 (-73.08%)
Mutual labels:  django, websockets
Cancer Donation Portal Python Flask App
Flask App for Cancer Donation Portal using basic Python, SQLite3, HTML, CSS and Javascript
Stars: ✭ 32 (-38.46%)
Mutual labels:  flask, webapp
Keras Flask Deploy Webapp
😺 Pretty & simple image classifier app template. Deploy your own trained model or pre-trained model (VGG, ResNet, Densenet) to a web app using Flask in 10 minutes.
Stars: ✭ 856 (+1546.15%)
Mutual labels:  flask, webapp
Netty Websocket Spring Boot Starter
🚀 lightweight high-performance WebSocket framework ( 轻量级、高性能的WebSocket框架)
Stars: ✭ 885 (+1601.92%)
Mutual labels:  chat, websocket

Channelstream

Build Status

This is a websocket-based real-time communication server, your applications communicate with it via simple JSON REST API.

Visit http://channelstream.org for more information.

Installation and Setup

Use from docker:

docker pull channelstream/channelstream:latest
docker run --rm -p 8000:8000 -e CHANNELSTREAM_ALLOW_POSTING_FROM=0.0.0.0 channelstream/channelstream:latest

Direct usage

Obtain source from github and do:

YOUR_PYTHON_ENV/bin/pip install channelstream

Generate new configuration:

YOUR_PYTHON_ENV/bin/channelstream_utils make_config -o config.ini

Start the server:

YOUR_PYTHON_ENV/bin/channelstream -i config.ini

Demos

Demo applications live in https://github.com/Channelstream/channelstream_demos repository.

They show common patterns used in real-time applications.

Security and communication model

Channelstream provides API explorer that you can use to interact with various endpoints, it is available by default under http://127.0.0.1:8000/api-explorer.

To send information client interacts only with your normal www application. Your app handled authentication and processing messages from client, then passed them as signed message to channelstream server for broadcast.

websocket client -> webapp (security and transformation happens here) -> REST call to socket server -> broadcast to other clients

This model is easy to implement, secure, easy to scale and allows all kind of languages/apps/work queues to interact with socket server.

All messages need to be signed with a HMAC of destination endpoint ::

import requests
from itsdangerous import TimestampSigner
signer = TimestampSigner(SERVER_SECRET)
sig_for_server = signer.sign('/connect')
secret_headers = {'x-channelstream-secret': sig_for_server,
                  'Content-Type': 'application/json'}
response = requests.post(url, data=json.dumps(payload),
                         headers=secret_headers).json()

Data format and endpoints

Please consult API Explorer (http://127.0.0.1:8000/api-explorer) for in depth information about endpoints.

Some examples:

  • /connect POST connects users to the server
  • /subscribe POST Subscribes connection to new channels
  • /unsubscribe POST Removes connection from channels
  • /user_state POST set the state of specific user
  • /message POST Send message to channels and/or users
  • /message DELETE Delete message from history and emit changes
  • /message PATCH Edit existing message in history and emit changes
  • /channel_config POST Set channel configuration
  • /info POST Returns channel information

Client API

  • /ws GET Handles websocket connections
  • /listen GET Handles long polling connections
  • /disconnect GET Permanently remove connection from server
  • /disconnect POST Permanently remove connection from server

Admin API

  • /admin/admin.json GET Return server information in json format for admin panel purposes
  • /admin/admin.json POST Return server information in json format for admin panel purposes

Responses to js client

Responses to client are in form of list containing objects:

examples:

new message ::

{
"date": "2011-09-15T11:36:18.471862",
"message": MSG_PAYLOAD,
"type": "message",
"user": "NAME_OF_POSTER",
"channel": "CHAN_NAME"
}

presence info ::

{
"date": "2011-09-15T11:43:47.434905",
"message": {"action":"joined/parted"},
"type": "presence",
"user": "NAME_OF_POSTER",
"channel": "CHAN_NAME"
}

Currently following message types are emited: message, message:edit, message:delete, presence, user_state_change.

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