Thanks Matty If we use the WCF, i guess it would not be able to communicate with the RAW tcp client, we will need to write some code for WCF layer to make it communicating with the RAW tcp connections. Thanks for suggesting the ZeroMQ, i will explore these libraries and will let you know.
Vipin15
Posts
-
Socket Server -
Socket ServerThanks Bernhard The display will be the browser and typically one user for every 30 devices. Which most of the time will display the last stats of the device. I think we can store the last positions and other states in a separate table. Or some mechanism can be developed that can provide the data of current stats to the browser without hitting the database. The devices will be 2000 and will be transmitting the data every 20 seconds. On a maximum there can be 60000,000,00 records in the transaction table. Which SQL Sever can manager easily without loosing the performance.
-
Socket ServerThanks Matt, I also thought of using WCF tcp binding but the WCF may be much slower as compare to raw sockets however dealing with raw sockets may be more tricky and challenging but still possible to implement. Thanks Vipin
-
Socket ServerHi, I need to write a High Performance TCP/IP server for receiving the data from the GPS devices and logging it to the database for display on Google Maps. There will be thousands of GPS devices connected to the GPS server and will be transmitting the data every 30 seconds and the display will be set to refresh typically every minute. I am looking for the help in specific areas, I will write the code myself and believe me I will post the complete developed and tested code on this same forum. I understand the following challenges 1.Concurrent TCP/IP connections 2.Database table bottlenecks I would like to go for one table per device groups and different ports for devices with different protocols. I am assuming that I will need to write the following components. 1.Data Receiver 2.Parser as per the protocol and the commands 3.Data Cache 4.Database writer Receive the bytes, log the received commands to the cache, implement the lazy writer to flush the data every minute to the database using different thread. Please comments on the following. 1.Does the GPS device disconnects after sending one command or it keep the connection to send the data further like long polling? 2.Is it better idea to maintain the thread pool and keep one thread per device? How many devices can be connected simultaneously to one port? 3.If I assume that device does not disconnect the client after transmitting the bytes to the server, should I keep the channel alive on the server to keep on reading the data every 20 seconds or whenever available? 4.Is it fair enough to have the separate threads for updating the data to the database server? Say data retrieval every 20 seconds and making it persistent to the database every one minute? 5.Is there any other better protocol rather that raw TCP/IP? I guess the other protocols like http etc should be slower as the header size itself is very big. 6.What is better choice Synchronous or Asynchronous sockets? Is it feasible to use UDP? 7.What is better choice? C# and SQL Server or JAVA and mySQL on Linux? Many Thanks Vipin