AutobahnPython on Jython

#1

Hi,

get AutobahnPython running on Jython .. pls see

http://twistedmatrix.com/trac/ticket/3413#comment:21

and the AutobahnPython project's README.

I tested a server using AutobahnTestsuite .. it passes everything (though a few non-strict cases that are timing/reactor related).

Don't hold your breath .. it's a little slower than CPython.

But running AutobahnPython under Jython might come handy for some situations ..

- Tobias

0 Likes

#2

Great!, actually this could help me a lot, since I’m trying to avoid the CPython GIL in order to leverage on multiple cores with a heavily threaded environment, and I’m using twisted not only for autobahn but the whole server.

Thanks!.

···

On Friday, March 8, 2013 4:02:10 PM UTC-4:30, Tobias Oberstein wrote:

Hi,

get AutobahnPython running on Jython … pls see

http://twistedmatrix.com/trac/ticket/3413#comment:21

and the AutobahnPython project’s README.

I tested a server using AutobahnTestsuite … it passes everything
(though a few non-strict cases that are timing/reactor related).

Don’t hold your breath … it’s a little slower than CPython.

But running AutobahnPython under Jython might come handy for some
situations …

  • Tobias
0 Likes

#3

I’m trying to reproduce your installation, using Jython 2.7b1, and I already did the patches you suggested. But I’m having trouble with other things, I’m getting a module not found:

import twisted
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python2.7/dist-packages/twisted/init.py”, line 53, in
_checkRequirements()
File “/usr/local/lib/python2.7/dist-packages/twisted/init.py”, line 37, in _checkRequirements
raise ImportError(required + “: no module named zope.interface.”)
ImportError: Twisted requires zope.interface 3.6.0 or later: no module named zope.interface.

But module is there, zope is installed (right next to twisted in the directory) and its version is 4.0.5.
And I’m able to
Did you had this problem? any Idea on how to fix it?.

Regards,

···

On Thursday, May 2, 2013 12:15:54 PM UTC-4:30, Alejandro Hernandez wrote:

Great!, actually this could help me a lot, since I’m trying to avoid the CPython GIL in order to leverage on multiple cores with a heavily threaded environment, and I’m using twisted not only for autobahn but the whole server.

Thanks!.

On Friday, March 8, 2013 4:02:10 PM UTC-4:30, Tobias Oberstein wrote:

Hi,

get AutobahnPython running on Jython … pls see

http://twistedmatrix.com/trac/ticket/3413#comment:21

and the AutobahnPython project’s README.

I tested a server using AutobahnTestsuite … it passes everything
(though a few non-strict cases that are timing/reactor related).

Don’t hold your breath … it’s a little slower than CPython.

But running AutobahnPython under Jython might come handy for some
situations …

  • Tobias
0 Likes

#4

I’m trying to reproduce your installation, using Jython 2.7b1, and I already did the patches you suggested. But I’m having trouble with other things, I’m getting a module not found:

import twisted
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python2.7/dist-packages/twisted/init.py”, line 53, in
_checkRequirements()
File “/usr/local/lib/python2.7/dist-packages/twisted/init.py”, line 37, in _checkRequirements
raise ImportError(required + “: no module named zope.interface.”)
ImportError: Twisted requires zope.interface 3.6.0 or later: no module named zope.interface.

But module is there, zope is installed (right next to twisted in the directory) and its version is 4.0.5.
And I’m able to
And I’m able to import the module zope “isolated”.

···

On Thursday, May 2, 2013 12:44:03 PM UTC-4:30, Alejandro Hernandez wrote:

Did you had this problem? any Idea on how to fix it?.

Regards,

On Thursday, May 2, 2013 12:15:54 PM UTC-4:30, Alejandro Hernandez wrote:

Great!, actually this could help me a lot, since I’m trying to avoid the CPython GIL in order to leverage on multiple cores with a heavily threaded environment, and I’m using twisted not only for autobahn but the whole server.

Thanks!.

On Friday, March 8, 2013 4:02:10 PM UTC-4:30, Tobias Oberstein wrote:

Hi,

get AutobahnPython running on Jython … pls see

http://twistedmatrix.com/trac/ticket/3413#comment:21

and the AutobahnPython project’s README.

I tested a server using AutobahnTestsuite … it passes everything
(though a few non-strict cases that are timing/reactor related).

Don’t hold your breath … it’s a little slower than CPython.

But running AutobahnPython under Jython might come handy for some
situations …

  • Tobias
0 Likes

#5

Great!, actually this could help me a lot, since I'm trying to avoid the
CPython GIL in order to leverage on multiple cores with a heavily
threaded environment, and I'm using twisted not only for autobahn but
the whole server.

Just saying, for Autobahn (WAMP or WebSocket) _itself_:

Don't expect any performance gains from Jython (to the contrary). For example, Jython only exposes Posix select, not epoll or kqueue or IOCP.
If you want performance, try PyPy ..

···

Am 02.05.2013 18:45, schrieb Alejandro Hernandez:

Thanks!.

On Friday, March 8, 2013 4:02:10 PM UTC-4:30, Tobias Oberstein wrote:

    Hi,

    get AutobahnPython running on Jython .. pls see

    http://twistedmatrix.com/trac/ticket/3413#comment:21
    <http://twistedmatrix.com/trac/ticket/3413#comment:21>

    and the AutobahnPython project's README.

    I tested a server using AutobahnTestsuite .. it passes everything
    (though a few non-strict cases that are timing/reactor related).

    Don't hold your breath .. it's a little slower than CPython.

    But running AutobahnPython under Jython might come handy for some
    situations ..

    - Tobias

--
You received this message because you are subscribed to the Google
Groups "Autobahn" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to autobahnws+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Likes

#6

I'm trying to reproduce your installation, using Jython 2.7b1, and I
already did the patches you suggested. But I'm having trouble with other
things, I'm getting a module not found:
>>> import twisted
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/usr/local/lib/python2.7/dist-packages/twisted/__init__.py",
line 53, in <module>
     _checkRequirements()
   File "/usr/local/lib/python2.7/dist-packages/twisted/__init__.py",
line 37, in _checkRequirements
     raise ImportError(required + ": no module named zope.interface.")
ImportError: Twisted requires zope.interface 3.6.0 or later: no module
named zope.interface.

But module is there, zope is installed (right next to twisted in the
directory) and its version is 4.0.5.
And I'm able to
Did you had this problem? any Idea on how to fix it?.

No, I did not have issues with that. Are you sure you installed Twisted and zope.interface into the Jython site-packages?

Since above traceback refers to

/usr/local/lib/python2.7/dist-packages/

..

···

Am 02.05.2013 19:14, schrieb Alejandro Hernandez:

Regards,

On Thursday, May 2, 2013 12:15:54 PM UTC-4:30, Alejandro Hernandez wrote:

    Great!, actually this could help me a lot, since I'm trying to avoid
    the CPython GIL in order to leverage on multiple cores with a
    heavily threaded environment, and I'm using twisted not only for
    autobahn but the whole server.

    Thanks!.

    On Friday, March 8, 2013 4:02:10 PM UTC-4:30, Tobias Oberstein wrote:

        Hi,

        get AutobahnPython running on Jython .. pls see

        http://twistedmatrix.com/trac/ticket/3413#comment:21
        <http://twistedmatrix.com/trac/ticket/3413#comment:21>

        and the AutobahnPython project's README.

        I tested a server using AutobahnTestsuite .. it passes everything
        (though a few non-strict cases that are timing/reactor related).

        Don't hold your breath .. it's a little slower than CPython.

        But running AutobahnPython under Jython might come handy for some
        situations ..

        - Tobias

--
You received this message because you are subscribed to the Google
Groups "Autobahn" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to autobahnws+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Likes

#7

I’m trying to reproduce your installation, using Jython 2.7b1, and I

already did the patches you suggested. But I’m having trouble with other

things, I’m getting a module not found:

import twisted

Traceback (most recent call last):

File “”, line 1, in

File “/usr/local/lib/python2.7/dist-packages/twisted/init.py”,

line 53, in

 _checkRequirements()

File “/usr/local/lib/python2.7/dist-packages/twisted/init.py”,

line 37, in _checkRequirements

 raise ImportError(required + ": no module named zope.interface.")

ImportError: Twisted requires zope.interface 3.6.0 or later: no module

named zope.interface.

But module is there, zope is installed (right next to twisted in the

directory) and its version is 4.0.5.

And I’m able to

Did you had this problem? any Idea on how to fix it?.

No, I did not have issues with that. Are you sure you installed Twisted
and zope.interface into the Jython site-packages?

Since above traceback refers to

/usr/local/lib/python2.7/dist-packages/

Yup, you’re right, I haven’t, I just added the dist-packages of my current python installation to the sys.path in Jython.
I will install it inside Jython instead and try.

···

On Thursday, May 2, 2013 1:53:07 PM UTC-4:30, Tobias Oberstein wrote:

Am 02.05.2013 19:14, schrieb Alejandro Hernandez:

Regards,

On Thursday, May 2, 2013 12:15:54 PM UTC-4:30, Alejandro Hernandez wrote:

Great!, actually this could help me a lot, since I'm trying to avoid
the CPython GIL in order to leverage on multiple cores with a
heavily threaded environment, and I'm using twisted not only for
autobahn but the whole server.
Thanks!.
On Friday, March 8, 2013 4:02:10 PM UTC-4:30, Tobias Oberstein wrote:
    Hi,
    get AutobahnPython running on Jython .. pls see
    [http://twistedmatrix.com/trac/ticket/3413#comment:21](http://twistedmatrix.com/trac/ticket/3413#comment:21)
    <[http://twistedmatrix.com/trac/ticket/3413#comment:21](http://twistedmatrix.com/trac/ticket/3413#comment:21)>
    and the AutobahnPython project's README.
    I tested a server using AutobahnTestsuite .. it passes everything
    (though a few non-strict cases that are timing/reactor related).
    Don't hold your breath .. it's a little slower than CPython.
    But running AutobahnPython under Jython might come handy for some
    situations ..
    - Tobias

You received this message because you are subscribed to the Google

Groups “Autobahn” group.

To unsubscribe from this group and stop receiving emails from it, send

an email to autobahnws+...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

0 Likes