Hi James and group,I have a simple setup with the faye server on node, and am using the faye js client. My problem is that the client doesn't seem to connect properly most of the time. I need about 3-4 browser refreshes before I successfully connect to the node server.The connect code is dirt-simple:var fayeClient;$(document).ready(function () {fayeClient = new FayeClient("/faye", rctMap);});...client = new Faye.Client(address);var initSubscription = client.subscribe("/init", onInit);initSubscription.callback(function() {client.publish("/hello", "hello");});On the other end I have a subscriber to /hello which sends some initial info on the "/init" channel from which the client unsubscribes. However, this message usually does not arrive.
Relevant log parts are attached, but they don't make much sense to me. Can you see if something's causing problems, or help me debug this issue further?
On 30 August 2012 16:38, Frank Razenberg <zzat...@gmail.com> wrote:The connect code is dirt-simple:var fayeClient;$(document).ready(function () {fayeClient = new FayeClient("/faye", rctMap);});...client = new Faye.Client(address);var initSubscription = client.subscribe("/init", onInit);initSubscription.callback(function() {client.publish("/hello", "hello");});
* Handshakes* Subscribes to /init* Upgrades transport to WebSocket* Publishes to /init<-- Second one stops here* Receives published message* Unsubscribes from /init* Subscribes to /update
* Subscribes to /delete
* Subscribes to /refresh* Cycles /meta/connect every 2 seconds
The connect code is dirt-simple:var fayeClient;$(document).ready(function () {fayeClient = new FayeClient("/faye", rctMap);});...client = new Faye.Client(address);var initSubscription = client.subscribe("/init", onInit);initSubscription.callback(function() {client.publish("/hello", "hello");});
I have annotated the logs by splitting them into chunks and labelling each chunk with what's going on, at a high level:
The observed behavior seems very random, about 1/3 times everything goes as expected. The C# client not connecting properly (about 1 of 5 times) is more rare than the JS client not connecting properly (about 2 out of 3 times). I hope you can make anything out of this :)
On 1 September 2012 10:32, Frank Razenberg <fr...@zzattack.org> wrote:The observed behavior seems very random, about 1/3 times everything goes as expected. The C# client not connecting properly (about 1 of 5 times) is more rare than the JS client not connecting properly (about 2 out of 3 times). I hope you can make anything out of this :)I think the C# client is overloading the server by misbehaving -- it's very weird that the JS client does not get a reply when it publishes to /hello. These logs are suspicious: