Message10693

Author zyasoft
Recipients darjus, zyasoft
Date 2016-02-02.15:22:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1454426567.52.0.14851673609.issue2458@psf.upfronthosting.co.za>
In-reply-to
Content
One more change is required to run Tornado's hello, world application (http://www.tornadoweb.org/en/stable/#hello-world), due to #2406:

$ git diff tornado/netutil.py
diff --git a/tornado/netutil.py b/tornado/netutil.py
index b249945..5dbd94e 100644
--- a/tornado/netutil.py
+++ b/tornado/netutil.py
@@ -181,7 +181,7 @@ def bind_sockets(port, address=None, family=socket.AF_UNSPEC,
             # ipv6 sockets and use a separate ipv4 socket when needed.
             #
             # Python 2.x on windows doesn't have IPPROTO_IPV6.
-            if hasattr(socket, "IPPROTO_IPV6"):
+            if hasattr(socket, "IPPROTO_IPV6") and os.name != "java":
                 sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 1)

         # automatic port allocation with port=None

With Apache Benchmark using ab -k -c 20 -n 50000 localhost:8888/

Percentage of the requests served within a certain time (ms)
  50%     16
  66%     17
  75%     21
  80%     22
  90%     28
  95%     42
  98%     48
  99%     54
 100%    247 (longest request)

Not the fastest event loop (see Fireside running on Jetty with https://github.com/jimbaker/hellowsgi), but quite likely it can be made much faster if the event loop was based on Netty instead of the emulation with socket/ssl/select.
History
Date User Action Args
2016-02-02 15:22:47zyasoftsetmessageid: <1454426567.52.0.14851673609.issue2458@psf.upfronthosting.co.za>
2016-02-02 15:22:47zyasoftsetrecipients: + zyasoft, darjus
2016-02-02 15:22:47zyasoftlinkissue2458 messages
2016-02-02 15:22:46zyasoftcreate