VisionFactory::Network

New stuff for the tool Vision Factory I currently develop. The big major improvement was adding network capabilities, by integrating the great oscpack library by Ross Bencina. On top of it, I have designed an interface allowing multiple protocols to be implemented, so that it is possible to configure at runtime how computers are intended to be used over the network. The simplest configuration is master->slaves, where a server computer accepts connections from clients (”slaves”) and sends to all of them identical messages.
Besides, I’ve implemented a complete event model (broadcasters / listeners), which makes life muuuch easier for making objects communicate. No more dirty calls :-)
Finally, I discovered concepts behind mutex objects, which were an essential coding in this framework. Basically, two concurrent threads (network message handling & rendering) were accessing the same chunks of data and making operations on them (for example, add/remove elements in a list) without mutex protection was the cause of all my random crashes (and headaches too).
Here is a little video showing two connected computers in a “master/slave” configuration.
Video link
3 Comments