Spacebrew / spacebrew

A dynamic re-routable software toolkit for choreographing interactive spaces.
MIT License
222 stars 50 forks source link

Issue with broadcasted messages #48

Closed mattfelsen closed 10 years ago

mattfelsen commented 10 years ago

In more recent versions of the server, it seems that something is wrong with outbound messages sent from the server. I say recent because the public server works fine, my local version worked as of commit ...69ea90 (~Oct 2013), but new installs on an rPi and AWS, as well as my local server after a pull, don't respond to subscribed messages.

I took a look at the websocket traffic being received by the browser with the Chrome inspector and it looks like message.clientName is now being broadcast when it wasn't before. Perhaps that's the cause? Take a look at these screenshots…the first is from the sandbox and the second is a newer version of the server from git.

(If you're not familiar with the Chrome websocket inspector, green lines are messages sent by the browser and white lines are received from the server).

Hope that helps!

Matt

screen shot 2014-03-19 at 6 44 40 pm Working, from the sandbox

screen shot 2014-03-18 at 10 14 22 pm Non-working version from git/master

robotconscience commented 10 years ago

Hey Matt, can you be more specific on what's not working? Is it a specific library, all libraries, etc? Definitely want to get to the bottom of this!

mattfelsen commented 10 years ago

Yes, sorry for the vague-ness. It seems that client apps are not responding to messages. For example, using the js slider demo I wired slider1 -> slider2, and slider2 -> slider3 as shown in the screenshot below. After dragging slider1, neither slider2 nor slider3 moved. I was seeing similar behavior in a different app where the handler for receiving boolean messages was never called.

screen shot 2014-03-18 at 10 14 15 pm

robotconscience commented 10 years ago

Hey matt. Can you double check your network and config? I have the latest version of sb installed on my EC2 and I'm not having issues in js or openframeworks. Can you double-check the logs on your JS and see what messages they are getting? There also may be an issue just in spacebrew.js; check the line mentioned in this PR here and let me know if that fixes it?

robotconscience commented 10 years ago

Please checkout the new version of the JS library and see if that fixes your issue (it should). All of the examples hosted on github pages are updated as well, so you can test from there!

mattfelsen commented 10 years ago

Just tried the updated slider example pointed at my AWS instance – it works! Thanks!