Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Bjoern backend #26

Closed
gawry opened this issue Jul 2, 2013 · 17 comments
Closed

Add a Bjoern backend #26

gawry opened this issue Jul 2, 2013 · 17 comments

Comments

@gawry
Copy link

gawry commented Jul 2, 2013

It would be great to integrate with bjoern. In my tests it was by far the fastest server around.

@tarekziade
Copy link
Member

👍

@tarekziade
Copy link
Member

@gawry Are you interested in providing the backend ?

@Natim
Copy link
Contributor

Natim commented Sep 13, 2013

It looks that simple:

https://gist.github.com/jonashaag/6548722

import bjoern


class Server(object):
    def __init__(self, listener, application=None, backlog=None,
                 socket_type=None, address_family=None):
        assert backlog is None, "bjoern backend does not support the 'backlog' option"
        assert socket_type is None, "bjoern backend does not support the 'socket_type' option"
        assert address_family in (AF_INET, AF_UNIX)

        host, port = listener
        if host.startswith('fd://'):
            raise ValueError("bjoern backend does not support 'fd://' sockets")
        else:
            bjoern.listen(host, port, application)

    def serve_forever(self):
        bjoern.run()

@tarekziade
Copy link
Member

@Natim would you like to add it in a PR ?

@Natim
Copy link
Contributor

Natim commented Sep 18, 2013

I will as soon as bjoern implements the --fd parameter.

@tarekziade
Copy link
Member

refs jonashaag/bjoern#73

@Natim
Copy link
Contributor

Natim commented Nov 28, 2013

It looks like it will be implemented in the next release.

@jonashaag
Copy link

bump -- fd support is now implemented in the master branch

@gawry
Copy link
Author

gawry commented Jan 1, 2014

Great news!

On Wednesday, January 1, 2014, Jonas Haag wrote:

bump -- fd support is now implemented in the master branch


Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-31423948
.

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

@tarekziade
Copy link
Member

@jonashaag @gawry awesome!

We should add it then for 1.2

@tarekziade tarekziade changed the title Integrate with Bjoern Add a Bjoern backend May 1, 2014
@gawry
Copy link
Author

gawry commented May 1, 2014

I did a first version but I was unable to properly test it because the bjoern version compatible with fd was not actually ready.

As I have no experience with c and c python modules I can't help @jonashaag finishing things like the proper setup.py, but I will send a pull request when this is ready.

@jonashaag
Copy link

It can be tested by cloning the git repository and using make, then adding the build/ directory to your PYTHONPATH.

@tarekziade
Copy link
Member

I added this PR in the bjoern repo: jonashaag/bjoern#80

@tarekziade
Copy link
Member

Started a PR for chaussette with the Bjoern backend https://github.com/mozilla-services/chaussette/tree/bjoern

@tarekziade
Copy link
Member

Added!

@Natim Natim reopened this Aug 12, 2014
@Natim
Copy link
Contributor

Natim commented Aug 12, 2014

Test are broken since because on the bjoern install ev.h fails to be found by travis. Not sure if it is a libev-dev missing package or an ev.h missing file on bjoern source code.

@Natim
Copy link
Contributor

Natim commented Aug 12, 2014

Thanks a lot :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants