Network System
A networking system such as raknet to allow clients to connect to each other.
Some libraries we could use:
For serialization:
- rapidjson https://code.google.com/p/rapidjson/
- std::stringstream class http://en.cppreference.com/w/cpp/io/basic_stringstream
- Google Protocol Buffers https://code.google.com/p/protobuf/
- Apache Thrift http://thrift.apache.org/
- boost::serialization http://www.boost.org/doc/libs/1_55_0/libs/serialization/doc/index.html
- other
For network base:
- plain TCP sockets
- boost::asio http://www.boost.org/doc/libs/1_55_0/doc/html/boost_asio.html
- Enet http://enet.bespin.org/
- RakNet http://www.jenkinssoftware.com/ closed source
- ZeroMQ http://zeromq.org/
- SDLNet http://www.libsdl.org/projects/SDL_net/
- ClanLib http://www.clanlib.org/ much more than a network library
- other
Added Rapidjson library.
A few words about the network library:
My preference go to Enet for simplicity and the ability to define "channels" in UDP flow. The weak point is that it is maybe too simple and that we may need to update and maintain it since there is not a good support.
ZeroMQ looks a good choice too but may be too heavy for our immediate needs. The good point is that it is used in software industry so we can use it safely. Also, having ZeroMQ skills may be useful for personal development (if some coders work in software industry). The bad point is that we must maintain a knowledge of the library, which is difficult in an ephemeral team.
SDLnet is low level, as is raw UDP/TCP sockets. We would need to code a decent network framework before using them.
I would eliminate:
- boost because I don't like boost
- Raknet because it is not open source.
- Clanlib because we don't want a game library
My personal choice would be Enet or ZeroMQ. What would be yours ?
I'm with catageek, that we should avoid :
- boost because it's requires using nearly all boost lib. I think that this option should be consider only if we will use more stuff in boost libs
- Raknet because is closed source.
- sdl_net because we are not using SDL
I have read half of the long documentation of zeroMQ and I feel it will make interprocess and internode communication easy. Multithread is easy with interprocess messaging.
For networks, there are a lot of patterns available that we can use to make clusters, brokers and interserver communication. We can build easily our own protocol or plug known protocols to give an alternate access to servers (such as a Web browser version), allow players to upload assets on a web interface and so on.
Also the software download protocol is easy to implement using a broker and a list of mirrors.
I see there are all the tools to make a decentralized game, with no central repository or authentication server so that no one can own the game.
So my choice would be zeroMQ. The only problem is that I don't know if it was ever used in a game.
http://nanomsg.org/ is the successor of zeroMQ, from the same developer.
We need to take a decision about thread, process and peers communication through messages since this is what is in nanomsg and zeroMQ. It is more than network.