I am working on a web application which receives data sent from trackers via TCP Packets containing location information. Up until this point we have been working with dummy data within the mysql database but we are now ready to start building the server which will receive data from the remote devices.

As we are just exploring our options at the moment, I thought I would see does anyone have any suggestions on the best route to take when setting up a server to receive TCP packets of data and then store them in a remote database?

Our general requirements are as follows:

  • Hosted on Amazon EC2
  • Allow multiple concurrent connections to receive data (potentially in the thousands)
  • Store data in remote MySQL database

2 Answers 2


You might be interested in Traccar which does exactly what you are looking for. Plus it is open source. Plus it is already a web-server. Plus you can install it on Amazon Ec2 and link the database with Amazon RDS service.

In order to link Traccar with a database like PostGIS, MySQL) see the Traccar page on MySQL Database


Before you get down and dirty with implementing a TCP server from scratch, you may want to explore some other options.

Depending on you business requirements and considering that it's a web app then something like a webservice might be sufficient (see what fits better SOAP or REST) and you change the server config to handle whatever load you expect.

You also have to think how the trackers should work to minimze the traffic/load on the servers but again depends on what you need to do. Maybe instead of sending every location imediately once available, you could group together several location updates into one packet and send it every 10 minutes or so.

These are just some ideas, I think that your question is a bit vague, if you can, it would help if you could provide more details.

Not the answer you're looking for? Browse other questions tagged or ask your own question.