GithubHelp home page GithubHelp logo

Improve socket handling about isso HOT 7 CLOSED

isso-comments avatar isso-comments commented on May 11, 2024
Improve socket handling

from isso.

Comments (7)

posativ avatar posativ commented on May 11, 2024

A much better way: use a "real" WSGI server that supports the things you mentioned out-of-the-box such as gunicorn or uWSGI (well, I know the latter is fairly old in Wheezy and does not work with Isso as I use a different caching API).

I am afraid of implementing chmod and privilege drop in Isso which is something I never did before (and thus unlikely to implement it right on first try) and other WSGI servers have already implemented. The initial socket support for unix domain sockets for the development server shipped with Python/${webframework i use} is, after all, maybe a bad choice as it encourages to use the internal development server instead of a real, fast, secure and lightweight WSGI server.

If you still want to use the internal server, you can use sockets in the /tmp directory (which I do with uWSGI (although it supports chmod etc.)) or bind on localhost:1234.

from isso.

posativ avatar posativ commented on May 11, 2024

An example call for Gunicorn:

$ export ISSO_SETTINGS="/path/to/isso.cfg"
$ gunicorn -b unix:foo.sock -m 0666 -u user -g group --preload isso.run

from isso.

jgraichen avatar jgraichen commented on May 11, 2024

Ok, thanks. I'll try to update my debian package to depend on gunicorn and update the init scripts to use gunicorn.

Are there any version constraints for gunicorn you are aware of?

from isso.

posativ avatar posativ commented on May 11, 2024

Are there any version constraints for gunicorn you are aware of?

I tested with the version available in Wheezy (0.14.5).

from isso.

jgraichen avatar jgraichen commented on May 11, 2024

Ok, thanks.

from isso.

jgraichen avatar jgraichen commented on May 11, 2024

Just out of curiosity: Why not using gunicorn as an optional dependency for the "internal" server?

from isso.

posativ avatar posativ commented on May 11, 2024

In case of debian packaging, I wouldn't mind if it is a required dependency because of a more flexible setup.

from isso.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.