| Lalaland1125 |
20-01-2012 09:43 |
Re: Is TCP communication allowed in-game?
Quote:
Originally Posted by shuhao
(Post 1109404)
What do you guys think about a restful server so it will be easier to develop and test for?
I feel like a constant connection is not necessary. Also, how are you guys structuring rthe network? Server on laptop or server on crio. The formal seems simpler
|
Our team is sticking the server on the laptop.
We are not sticking the server on the crio for two reasons:
1. Having a server on the robot increases complexity. I trust neither myself nor the crio to do threads correctly and well, and those threads would be needed to create a "good" server. Having a server on the robot would also complicate code which should be kept as simple as possible(because if the crio crashes, all your other electronics do nothing).
2. If the crio is a client, it can immediately tell when the server is offline(it will fail at the initialization of the robot when it tries to connect). This allows us to simply set a "serverFail" boolean to true, and skip over the network code so that the robot can continue to function even when the server is offline.
For easier development our team is simply using a text protocol JSON, which should make many things simpler(and is a heck of alot easier to debug as well).
|