Comments (20)
I understand that Chaussette is a WSGI server which bjoern is. So what is the benefit to integrate them together?
from bjoern.
Chaussette is not a WSGI server, it is a WSGI Server wrapper that let give the socket fd as a parameter and use the WSGI server you want to serve the wsgi app.
The aim of adding the bjoern backend is to be able to run a wsgi app using bjoern server.
This is really useful to let circusd server your app using bjoern backend for example.
from bjoern.
Here is a circusd configuration example that I would like to be able to use.
[watcher:webworker]
cmd = chaussette --fd $(circus.sockets.webapp) --backend bjoern project.wsgi.application
use_sockets = True
copy_env = True
warmup_delay = 0
numprocesses = 3
[socket:webapp]
host = 127.0.0.1
port = 8888
from bjoern.
So as you explained, Chaussette will sit in front of bjoern. circus will open server socket to accept client connections and pass those connections to Chaussette. Then Chaussette passes them to bjoern
Is that correct?
So many indirections to me. Whap happens if I can pass the file descriptor directly to bjoern without using Chaussette as an intermediate layer?
from bjoern.
Yes it would works but then you will rewrite most of the chaussette layer for your bjoern-chaussette like command.
chaussette is a cli command not a python library.
The aim is to be able to run a bjoern WSGI server from the CLI using chaussette
from bjoern.
https://gist.github.com/jonashaag/6548722
bjoern currently doesn't support integer socket fds as argument to listen/run
but this could be added easily.
from bjoern.
Ok thank you that could be really nice to add the fd
argument :)
from bjoern.
👍
from bjoern.
In case of a file descriptor being passed, does Chausette expect the web server to bind()
or is this handled by Chausette?
from bjoern.
this is handled by Chaussette. The goal is to set up a pref-fork model where we bind a socket, then fork bjoern workers that accept connection on it - so the system takes care of the load balancing
from bjoern.
@jonashaag Are you planning to implement the fd?
from bjoern.
I've begun work on the implementation weeks ago but never really come to finishing it. I'll try to fit it in somewhen in the next few days... no promises...
from bjoern.
Thank you for this.
from bjoern.
Just a quick heads-up: I finished implementation (mostly refactoring) and I'm going to test it thoroughly the next few days. It'll be part of the next release
from bjoern.
Awesome! Python web apps will be much faster now... :)
On Thursday, November 28, 2013, Jonas Haag wrote:
Just a quick heads-up: I finished implementation (mostly refactoring) and
I'm going to test it thoroughly the next few days. It'll be part of the
next release—
Reply to this email directly or view it on GitHubhttps://github.com//issues/73#issuecomment-29457031
.
- Gustavo Gawryszewski [email protected] [email protected] +55
21 4106-0075 | +55 21 9498-7923 www.tactio.com.br
http://www.tactio.com.br/ *
As informações existentes nessa mensagem e nos arquivos anexados são para
uso restrito, sendo seu sigilo protegido por lei. Caso não seja
destinatário, saiba que leitura, divulgação ou cópia são proibidas. Favor
apagar as informações e notificar o remetente. O uso impróprio será tratado
conforme as normas da empresa e a legislação em vigor.
Antes de imprimir este e-mail/documento, pense em seu compromisso com o
Meio Ambiente
from bjoern.
👍
from bjoern.
Was this published in pypi? I was trying to write the chaussette part but I couldn't compile from source on my machine neighter get it from pypi
from bjoern.
It's not on PyPI yet. Could you post the compilation errors you get?
from bjoern.
Ok, I managed to compile but I couldnt load bjoern.
When I've tried to install with pip I couldn't load bjoern.
pip install -e [email protected]:jonashaag/bjoern.git#egg=bjoern
then I get this error
import bjoern
Traceback (most recent call last):
File "", line 1, in
ImportError: dynamic module does not define init function (initbjoern)
and when I cloned the repository and then python setup.py install thats what I got when trying to import bjoern.
import bjoern
Traceback (most recent call last):
File "", line 1, in
File "bjoern.py", line 3, in
import _bjoern
ImportError: No module named _bjoern
from bjoern.
I haven't updated the setup script yet.
What you need to do is make
. That will create a build/_bjoern.so
file. You need to add build
to your Python path when you import the module, e.g.
make
PYTHONPATH=build python2
from bjoern.
Related Issues (20)
- Bjoern 200-300 rps vs gunicorn 500/600 rps HOT 1
- site don't work
- pip install fails - missing http_parser.h HOT 2
- How to trigger server restart on source file changes? HOT 1
- Build fails on M1 Mac using Homebrew HOT 9
- calling from command line like gunicorn in Profcfile HOT 2
- Build bjoern error in mac m1 with command `pip3 install --global-option=build_ext --global-option="-I/opt/homebrew/include" bjoern` HOT 6
- Production use HOT 1
- Remove flask example HOT 5
- pip install not working on ubuntu 20.04 HOT 5
- Compilation terminated - fatal error: http_parser.h: No such file or directory HOT 1
- Extending to asgi HOT 7
- pip install error HOT 1
- Autostart after changes HOT 1
- broken pipe after running for a while HOT 3
- symbol not found in flat namespace '_ev_cleanup_start'
- pip installation fails (bjoern/request.h:4:10: fatal error: 'ev.h' file not found) HOT 2
- Apple Silicon build not supported. HOT 7
- ev.h not found; command /usr/bin/gcc exit failed with exit code 1 HOT 3
- Processed request response stuck when workers are not available HOT 20
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bjoern.