Introduction to REDnet

Welcome to REDnet! REDnet is embedded in REDsdk and enables network features for cloud and distributed rendering.

This book details all the aspects of REDnet as well as how to use it efficiently.

REDnet: concepts and features

REDnet is built on top of REDsdk and provides network features to any REDsdk-based application. Using REDnet, you can distribute your image rendering computations among several machines or send your real-time graphics to the cloud.

A peer-to-peer vision

REDnet is built around the concept of peer-to-peer. Each REDnet-based application acts as a peer, i.e an application which is both a network client and a server. REDnet-based applications can communicate together in order to collaborate on various rendering processes. A peer is an object created by the RED::Factory::CreatePeer method and that implements the RED::IPeer interface.

In a network of REDnet peers, there is neither server nor client.

This assumption makes the understanding and use of REDnet quite easy as it involves only very few concepts: simply create a REDnet peer and let it run. Network communications and exchanges are automatically handled by the low-level layer of REDnet which calls back the user application upon registered events.

A REDnet peer is much more than just a socket-based process performing low-level network operations. It's also a fully-featured web server which can be used to answer HTTP requests from any web browser. It's easier than ever to setup a cloud server delivering instant rendering to HTTP-based clients, on any device.

A REDnet peer is also a web server which can communicate with all HTML 5 compatible browsers

Due to the use of advanced web technologies, REDnet requires that the HTTP clients are HTML 5 compatible. Hopefully, at the time of writing, this is the case of every major web browser including: Firefox, Chrome, Safari, Opera and Internet Explorer. Thanks to its large support, REDnet can provide peers accessible from any OS and any device making cloud rendering true.

Communicate with peers

Communication with peers is available through TCP connections. A TCP connection can be initiated between two REDnet peers or between a HTML 5 web page and a peer.

Browser to peer communication

Peers are accessible from within a HTML 5 web page using web sockets ( Web sockets let you send and receive data to and from REDnet peers very easily (see the HTML 5 client tutorial).

REDnet peers and HTML 5 web pages can communicate through web sockets.

Creating HTML 5 web pages with web socket support is easy but requires some knowledge about HTML and JavaScript. Here are some web links where you can find valuable information:

Once you opened the web socket, you can use it to send and/or receive data to/from REDnet peers. Then, thanks to the advanced rendering capabilities of HTML 5, it's easy to draw the peer feedback onto the screen.

Peers administration

Peers can be registered to the REDnet administration service. This service lets you administrate easily the registered peers through a single provided tools: REDnet dispatcher. In such a case, client applications don't have to know where the peers are located, they just connect to the dispatcher and get the address of a peer back. This centralized view of the network is the preferred way for wide customizable networks.

You still have the choice to not administrate the peers using the dispatcher. Then, you can either build your own peers administration tool or access peers directly from your client application.

General overview

The REDnet API is quite simple: