demo
Credits: sanch, joreg, tmp
Here is a demo showing interaction between nodejs and vvvv.
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
This demo show how you can interact with an html browser to get data and set data in realtime with multiple user/device using javascript.
Node act as a single lightweight server and communicate with vvvv with the udp protocol.
In order to have this demo working you first need to install node.js
download herehttp://nodejs.org/ once installed start the nodejs.v4p clic on start nodejs then open your browserhttp://localhost:8000/
Feedback are welcome for bug device suported...
tested on firefox win7 /chrome win7 /safari osx/safari ios6/
This is a demo and it is here as a starter for further devellopement, the message protocol should be replace with json in the future for better communication and cleaner code.
If you use this work for your project be nice and credit me.
Latest update to version 0.5
I have rewritten venode nearly from scratch and made several improvements:
Next steps could be to implement OSC messages to have a more efficient client-server communication. Also new UI elements can be added: carousels, datepickers, modals, progressbars,..
Feedback welcome!
If you use this for your projects be nice and credit [www.intolight.de
Older Revisions
anonymous user login
~3d ago
~9d ago
~9d ago
~10d ago
~23d ago
~1mth ago
~1mth ago
~1mth ago
~1mth ago
~2mth ago
Super cool!
Pfew, Sanch!
sweet, thanks!
Very cool, will check out properly over Christmas
wow! I was fiddling a bit with node & socket & vvvv (Hello world, how are you?), but this looks really great! Was there a specific project you made it for?
nice ¡¡
Working nicely on chrome win7. Tx a lot!
Remote host address on UDP client has to be changed to the client IP though to be able to update it ;)
I did update a new version with a memory leak fix related to event listening on udp message
Also now slider/ui element value is not send back to vvvv via udp when updated to save bandwith for portable device.
thx and happy christmas !
merry sanchmas
thank you
Outstanding! Works perfect on XP32/b29/Firefox17. I was trying to figure out how someone could provide input from their mobile into projected visuals, and this should do the trick - I'll try putting up a QRCode that sends them to a page with controls based on this. Thanks a bunch!
http://www.webdigi.co.uk/fun/space/
There is a techdemo about that idee , i did a basic joystick for phone , performance are still a bit to slow depending on what you want to do , i found it a bit slow even on local network from phone (iphone for my case)
If you want to do something reactive like stearing a car/ship i think it's still to slow . Problem seams to come from the phone not able to send/receive a lot of data as a laptop , the phone browser might even crash if you send to much data. But well there is still many other idee/interaction to do where you don't need huge amount of data.
Hey sanch! I just tried it out with an Archos 43 Android tablet on mobile Firefox, and while the Firefox slider update is VERY slow and clunky, the receipt of the data into the patch has no perceptual delay; even when I rapidly move the sliders back and forth there is a very high update rate. And if I had to pick one over the other, it's input responsiveness.
This test and the application I'm thinking about is on a LAN, which helps of course. I want to display a QR code over on the side of a large projection installation so people can create and control visual entities, and this looks like it will work great particularly because of the session ID. I had been looking at socket.io directly, this saves a MASSIVE amount of work!
I did get tripped up a bit when I tried the patch on my Win7x64 workstation, the first IP address was for the Bluetooth (0.0.0.0), and so it would send to client browsers but get no input from them. Might want to add to your instructions above to check that CAR output or change the patch to discard 0.0.0.0 slices from the IP node. Can't attach a file here or I would post the change but here's a pic. Thanks again!
i think i depends on the device and browser... , but since many people are on iphone i thought it was not very good to use that kind of stuff for public if you need fast interaction .
for Ip i should update the patch and simply put 127.0.0.1, it was working fine before.. the car stuff was a bad idea , even using your select doesn't solve all issue...
this looks really great and tremendously useful.
i tested it on localhost (and chrome), and everything works just fine. but when using a smartphone or an ipod, it starts to get messy. the page loads slowly and user inputs are not transmitted at all.
the only interactions i see are NewClient and ClientDisconnect.
i disabled any firewall and even changed all ports in server.js to rule out any interference from other programs, but with no luck. do you have any idea what could cause this behaviour?
There could be different problem , but that's difficult to say , you could check if you have a javascript debugger to enable it and see if there is any error. I tested it only on the last ios on iphone/ipad it was working , so can't really tell for other device. It migh come from javascript who sometime miss some feature on some browser. I think enabling javascript debugger is a good start to see what's going on.
mmh, must be something like that. the newer the hardware, the more complete the browser software.
i only have smartphones of colleagues to test, don't want to stretch their patience too much, so cannot do extensive testing. would love to know what breaks it though :/
one find: with mobile opera it works like a charm.
Lovely collaboration! It works fine in local. But, I want to get hosting in Node.js hosting Service. so, If vvvv computer and Node.js server computer are different, how can I fix?
Any idea how to get a URL parameter like:
http://localhost:8000/?id=1234
passed as the "Interaction Data" on the NewClient message?
I tried looking at request.url in the httpServer in server.js, but all it gives is some ajax .gif file. This is all new stuff to me, but I hacked away anyway. Here's what I tried:
Which gives "NewCLient|/css/images/ajax-loader.gif|JaVjO2hO-Var71mqcUDb"
How grossly am I off base here? Thanks!
I am totally guessing here (I haven't tried it), but take the right half of the demo patch, that starts the server, and instead of sending it the IP address of the local machine (from the IP node), give it the IP address of the other (client) vvvv machine (should be able to give the system name).
Run the left half of the demo code on the client machine, except give the IP address of the server to the UDB send node instead of localhost.
Also, at the top of the .\server\server.js file is the following:
so you can change the port numbers and document root if you want. Good luck!
venode does not work anymore with newer node.js versions (0.10.xx)
(works with 0.8.23 though).
any plans to update?
same problem here...
doesn't works with with node.js version 0.10
joreg nice update!
I will try that venode 0.3.
I tried venode 0.3 now.
I found something wrong in nodejs.v4p. some node lines was disconnected.
ShellExecute node was red, and nodejs server doesn't execute.
and I had run nodejs server manually in cmd.exe window.
In browser localhost:8000, it shows same webpage with old venode version.
then I found vvvv send to browser signal successfully, but vvvv doesn't receive signal from browser.
and I edited code in "server.js",
and in console, message was emitted like this.
slider:slider1:44|KzXTkvpZny86Fbzhv3W9 port 5003 [ host undefined
I found host variable is something wrong.
and edited like this,
//var V4Ip = process.argv[2];
var V4Ip = "192.168.0.9"; //my localhost IP
then, finally, it works, vvvv receives data well from browser.
you sure you tried this combination with v0.3:
if ShellExecute (Windows Advanced) is red that sounds like you're missing the addonpack.
hardcoding your ip into the sourcecode should not be necessary. see the section in the patch where IP (Network) returns your local IP. there may be a missmatch there...
hey!
i have some trouble sending data from vvvv to the client via broadcast or directly.
for that i open up several tabs and connect to the app. the vvvv data is received without problems and sliders are updated in all tabs.
but when i close one session the remaining tabs dont update the sliders anymore. this happens when i use broadcast or the session ids.
after opening a new tab everything works fine again.
do you know that bug?
i tried it with nodejs v0.10.18 and v0.8.25 in combination with vvvv_45beta30.2_x86
ok i found it..
in the function socket.on('disconnect', function (){.. });
you remove all listeners: serverUdp.removeAllListeners("message");
after uncommenting this everything works fine. probably the listener for the disconnected client should be removed.. but i cannot find a solution to do that.
Hi! very good job. How many people connected can interact at the same time? and that can be done to support as many people as possible?
tested and found ok:
Thank you!
that depends on how many data is shared between all connected clients. so you have to test it for yourself in your particular application ;)
vvvv_45beta33.7 64bit seems to break the plugin. Can anyone confirm this?
@guest: tmp forgot to mention that with his venode0.5 you also need message v1.33
otherwise just try venode 0.3
Yes indeed. Sorry, I forgot to mention that. Since velcrome is rebuilding his message pack, I will release a new venode version as soon as he is ready with it.
Hi tmp,
have you any update regarding velcrome's message integration? We haven't managed to get V0.5 working at all (although V0.3 is very good)
thanks!
+1 öooö excited for the update matching Marko's message v2.0 (x64) :)
Hello!
Any chance to make it work nowadays?
The Message part seems totally broken... NILs everywhere etc...
Could someone post the lastest working combo version?
(vvvv, node, message)
I'm doing it by trial and error, but..
Tnx in advance
robe
@robe can you try and see if Venode0.3 (the last version i uploaded) maybe still works? it doesn't use "Message"..
The Message part seems totally broken... NILs everywhere etc
sometimes digging deep in the past can be rewarding, but forging something new is usually much more pleasant
vvvv-Message has undergone drastic change in the meantime, and interfacing to other apps was a priority. The whole session handling in the old upload is still cumbersome and long revamped. Json talk has been changed in a way that can be described as breaking: it is no longer quick and dirty, but readable.
When prototyping against venode, a lot of Message nodes were WIP and afterwards didn't make the cut and morphed into something more powerful.
Venode would have greatly benefited from a sync, but as it goes, it didn't happen yet.
That said, with vvvv-Message it is easier than ever to interface to any javascript object. Iirc @tmp used vanilla jquery. Accessing gui elements with a current vvvv-Message pack should be a blaze for someone with a little time on their hands and some familiarity with js.
Ok, No familiarity at all, I'm sorry...
I would just take advantage of the new features:
bugfix: call removeListener() only for disconnected client instead of removing all listeners
Anyway..
Is it actually possible to use the 0.5 version?
What version of Message should I use?
Cheers
i'll do a workshop with microdee next tuesday, can provide a new version and some insight at that day
Ok velcrome! I appreciate.
I'll wait, so... Thanks in advance
@velcrome
good news
Thank you for any update on this. Looking forward to the workshop guys. is it today?
no, microdee asked to postpone it. there will be the lambdacube workshop at 6 CET though!
the message workshop will most likely commence on 9th of april, official announcements will follow.
I have just recently started using venode5 without Messages - since it is all JSON, I just use JSON Parser (here in contribs) and do everything directly in JSON. So yes it is possible to use it without Messages.
That being said, I rather prefer the look of the version of jquery.mobile that venode3 uses (1.2, easily upgraded to 1.2.1)
Here's the patch that decodes the JSON; unfortunately the rest of the nodes I did are somewhat tied into my other patches and config system, so I would have to clean them up to post them here in a sensible form. But I can make a pass if there's interest.
EDIT: Ooops, can't attach a patch here, so here's a pic to give you an idea:
Okie doke, I put up a zip of my simple nodes. They need the JSON Parse mentioned above, and you'll need to specify the path to the server.js file (lives in the venode0.5\server folder).
There is a help patch showing how to use them, but basically you just put in one setup node, then as many variable nodes as you need to interface with venode. One node takes care of sending and receiving changes.
I have only used these nodes in a simple single client setting, and I imagine that due to the UDP nodes used within, that more than one variable send at a time may get lost. But it's something to start with.
The setup node takes care of banging the server start on load, and more importantly the server kill when you quit the patch. If node.js does not start, it is likely because node.exe is still running and needs to be killed.
Note: Be sure the ports used in these nodes match the port (and port+1) set in the server.js file you are using.