ztellman/aleph — Issue #49: Broken synchronous routes?
Author: andrewvc
Created: 2012-01-25 07:11:05+00:00
State: open

Glad to hear about the new hybi support! However...

An initial test of on my web-refactor branch of parbench https://github.com/andrewvc/parbench/tree/web-refactor completely barfed on the new aleph.

(just check out the web refactor branch and lein run, then visit localhost:3000 in a browser)

This gives me errors when handling non-async routes via noir, specifically the home URL here, which is a standard noir route, and worked before this upgrade: https://github.com/andrewvc/parbench/blob/web-refactor/src/parbench/views/index.clj#L7

I'm setting noir up with: https://github.com/andrewvc/parbench/blob/web-refactor/src/parbench/core.clj

This is based on my noir-async library, but that shouldn't come into play at this point, as we're still dealing with synchronous noir-defpage routes, not my async variant. That page should be a good demo, as when it loads it uses a websocket.

I'm preparing, by the way, a new web-ui version of Parbench (which is extremely alpha at this point) that lets you invoke a multitude of aleph / lamina based clients for http load testing in the web-refactor branch above (screenshot: https://skitch.com/andrewvc/g5n92/parbench-http-benchmarker ). You may find it useful Zach, as I know you're doing some work on lamina, and it hits it pretty hard, and gives nice realtime stats.

At any rate, the exception I'm seeing with the defpage stuff is listed below:

org.jboss.netty.handler.codec.http.websocketx.WebSocketHandshakeException: not a WebSocket handshake request: missing upgrade
at org.jboss.netty.handler.codec.http.websocketx.WebSocketServerHandshaker00.handshake(WebSocketServerHandshaker00.java:121)
at aleph.http.websocket$websocket_handshake_handler$reify__3771.handleUpstream(websocket.clj:91)
at org.jboss.netty.handler.codec.http.HttpContentEncoder.messageReceived(HttpContentEncoder.java:79)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.unfoldAndFireMessageReceived(ReplayingDecoder.java:522)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:501)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:438)
at aleph.netty$upstream_stage$reify__3027.handleUpstream(netty.clj:121)
at aleph.netty$upstream_stage$reify__3027.handleUpstream(netty.clj:121)
at aleph.netty$upstream_stage$reify__3027.handleUpstream(netty.clj:121)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:343)
at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:274)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:194)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)