All Projects → ostcar → geiss

ostcar / geiss

Licence: MIT license
An protocol server for django channels 1 written in go

Programming Languages

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

Projects that are alternatives of or similar to geiss

channels-asgi-mqtt
Interface between MQTT and ASGI and Channels 2.0 compatible
Stars: ✭ 36 (+33.33%)
Mutual labels:  django-channels, asgi
asgi-lifespan
Programmatic startup/shutdown of ASGI apps.
Stars: ✭ 110 (+307.41%)
Mutual labels:  asgi
asgi-caches
Server-side HTTP caching for ASGI applications, inspired by Django's cache framework
Stars: ✭ 18 (-33.33%)
Mutual labels:  asgi
asgi-csrf
ASGI middleware for protecting against CSRF attacks
Stars: ✭ 43 (+59.26%)
Mutual labels:  asgi
async-asgi-testclient
A framework-agnostic library for testing ASGI web applications
Stars: ✭ 123 (+355.56%)
Mutual labels:  asgi
a2wsgi
Convert WSGI app to ASGI app or ASGI app to WSGI app.
Stars: ✭ 78 (+188.89%)
Mutual labels:  asgi
mongox
Familiar async Python MongoDB ODM
Stars: ✭ 113 (+318.52%)
Mutual labels:  asgi
arel
Lightweight browser hot reload for Python ASGI web apps
Stars: ✭ 69 (+155.56%)
Mutual labels:  asgi
asgi-ratelimit
A ASGI Middleware to rate limit
Stars: ✭ 170 (+529.63%)
Mutual labels:  asgi
starlite
Light, Flexible and Extensible ASGI API framework
Stars: ✭ 1,525 (+5548.15%)
Mutual labels:  asgi
asgi-babel
Adds internationalization (i18n) support to ASGI applications (Asyncio/Trio)
Stars: ✭ 21 (-22.22%)
Mutual labels:  asgi
dashboard
An admin interface for ASGI Web frameworks.
Stars: ✭ 120 (+344.44%)
Mutual labels:  asgi
livelog
A Django Channels example project to demonstrate the ASGI use case.
Stars: ✭ 20 (-25.93%)
Mutual labels:  asgi
fastapi-project
FastAPI application without global variables(almost) =)
Stars: ✭ 26 (-3.7%)
Mutual labels:  asgi
inboard
🚢 Docker images and utilities to power your Python APIs and help you ship faster. With support for Uvicorn, Gunicorn, Starlette, and FastAPI.
Stars: ✭ 106 (+292.59%)
Mutual labels:  asgi
django-webssh
django + django_channles 实现的 webssh
Stars: ✭ 71 (+162.96%)
Mutual labels:  django-channels
django-concurrency-talk
🎭 Database Integrity in Django: Safely Handling Critical Data in Distributed Systems
Stars: ✭ 49 (+81.48%)
Mutual labels:  django-channels
TikTokDownloader PyWebIO
🚀「Douyin_TikTok_Download_API」是一个开箱即用的高性能异步抖音|TikTok数据爬取工具,支持API调用,在线批量解析及下载。
Stars: ✭ 919 (+3303.7%)
Mutual labels:  asgi
spectree
API spec validator and OpenAPI document generator for Python web frameworks.
Stars: ✭ 190 (+603.7%)
Mutual labels:  asgi
fastapi-azure-auth
Easy and secure implementation of Azure AD for your FastAPI APIs 🔒 B2C, single- and multi-tenant support.
Stars: ✭ 174 (+544.44%)
Mutual labels:  asgi

Geiss

Geiss is a protocol server defined by the asgi specs. It can be used for a Django Channels project as replacement for daphne.

See https://channels.readthedocs.io/en/latest/asgi.html for more information.

Actually it is written “Geiß” which means goat in some German dialects. A Geiß is a cute little fellow, please do not eat it.

Install

First you have to set your GOPATH. See https://github.com/golang/go/wiki/GOPATH.

Then download and compile the server by calling

$ go get github.com/ostcar/geiss

Configuration and start

The server can be started by running

$ $GOPATH/bin/geiss

or

$ export PATH=$PATH:$GOPATH/bin
$ geiss

Call

$ geiss --help

for a list of all options.

Geiss needs a channel backend to run. The only channel backend that is supported right now is Redis. So you have to install and start Redis to run Geiss.

Serving static files

Geiss can serve static files. You should not do this in production but use a webserver like nginx or Apache HTTP Server as proxy to Geiss and let them serve the static files. But if you can't use a webserver before Geiss, then you should use this feature. If you don't, your static files are still served through the channel layer, but this is probably slower.

To configure Geiss to serve static files, collected with

$ python manage.py collectstatic

start Geiss with the option --static that can be used multiple times:

$ geiss --static /static/collected-static --static /media/path/to/media/

Full channels example

Currently this software runs for all examples in https://github.com/andrewgodwin/channels-examples

You can test it with the follwing commands:

$ git clone https://github.com/andrewgodwin/channels-examples
$ cd channels-examples/multichat
$ python3 -m venv .virtualenv
$ source .virtualenv/bin/activate
$ pip install --requirement requirements.txt
$ python manage.py migrate
$ python manage.py runworker &
$ geiss

Then start a webserver and connect to localhost:8000.

Difference between daphne and Geiss

The main difference between daphne and Geiss is that daphne is written in Python using Twisted and Geiss is written in Go. As far as I know, Twisted is single threaded and therefore daphne runs only one one CPU. Geiss on the other hand starts an many threads, as there are CPU cores. Of cause, you can start more then one daphne, but you have to use an individual tcp port for each daphne, which makes the setup harder to configure.

License

MIT

How to kill a geiß

You should not kill a geiß. But if you realy have to, run

$ killall geiss

But please don't!

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