February 21st 2022
Networking Protocols:
- Low Level: UDP, TCP, WebSocket
- High Level: OSC, MQTT, ZMQ
- OSC:
- VL.IO.OSC pack is shipping with vvvv
- Send data:
https://youtu.be/CSt_39fNonQ - Receive data:
https://youtu.be/i5Yy6DS3Imo - Useful tools:
https://thegraybook.vvvv.org/reference/libraries/networking.html#osc
- MQTT:
- VL.IO.M2MQTT prerelease pack needs to be installed
- Publish/Subscribe pattern
- Can use local or cloud broker, eg:
http://shiftr.io - See help in the helpbrowser
- ZMQ:
- Can be used similar to MQTT
- There are no public brokers to simply use like with MQTT
- Best for local usage
- Best option performancewise
- TCP:
- Needs framing for messages so they can be tokenized on the receiving end
- Same applies to communication over a serial port
- In the helpbrowser, see:
“HowTo Send a stream of data”
“HowTo Receive a stream of data”
- OSC:
Assignment:
- Build a “chat app”, where avatars can walk around on a 2d canvas and share a message each
- Build a record datatype “AvatarData” with the following properties:
- Position
- Rotation
- Radius
- Color
- Text
- Create a process node “Avatar” that can move one avatar around using the keyboard (rotate, move fwd, ie. similar to the player in Osmosis) and takes a message
- Publish the avatar via MQTT topic: avatar/1
- Create a process node “DrawAvatar” that can visualize one avatar and its message
- Receive a range of published avatars and visualize them
