About
The GRAPES software toolkit is implemented as a C library that can be directly used by C (or C++) applications, and can be used by applications written in other languages if proper bindings are provided.
Currently, GRAPES provides the following functionalities:
- A network helper, allowing applications developers to build P2P applications without caring about the used trasport protocol. An implementation of the net helper based on the UDP protocol (and running on POSIX systems) is currently available, but other implementations are under development. Once multiple network helpers are available, it will be possible to switch between them (switching, for example, between an unreliable transport protocol and a reliable one) by simply linking a different net helper implementation
- A peer sampling mechanism (called "TopologyManager" for historical reasons). This is currently based on a generic gossipping protocol (similar to NewsCast), but implementing new protocols based on the framework provided by GRAPES is quite simple (as an example, the CYCLON protocol has already be implemented, but has not been merged in the main source repository yet). In the future, it will be possible to configure the peer sampling protocol and mechanism at initialisation time
- A Peer Set abstraction, which allows to build more complex and structured topologies. Filling the various sets is currently application's responsibility, but in the future this functionality will be implemented using some topology management algorithm (such as, for example, T-Man - prototypal implementations are available, but they still have to be tested and integrated in the library)
- A Chunk Buffer data type, implementing a timed buffer where a streaming application can insert the received chunks. The current implementation is suitable for live streaming applications, automatically removing the chunks from the buffer as soon as they become too old (an alternative implementation, more suitable for VoD systems, would leave the chunks in the buffer for more time)
- A Chunk ID Set data type, allowing the peers to exchange information about the chunks owned or needed by each one of them. This abstract data type is the basis for various signalling mechanisms, and provides some functionalities for encoding the contents of a chunk id set in a message, to be distributed on the network (so, the application is not forced to care about endianess issues, 64bit vs 32bit issues, etc...)
- A Chunk trading mechanism, allowing to encapsulate chunks into messages, and to distribute them on the network (again, the application is not forced to care about endianess, ets...)
The library has no special requirements (excepts a working C compiler :), and is suitable for embedded systems.