This is the problem description We have thousands of devices(approx 4k -5k) through which we have to read data continuously, every 2 min or 30 seconds. Each device has its unique IP. This data would be collected and then stored in database. These devices are at 100's of location around the country. The data would not be read 24X7 but for at least 12 hrs.
There is a web application which would request at some point to show data which is being collected data through these devices. We would know that data from which device is being requested.
This is how we think we can implement in Java
Solution A : In each location , designate one machine which will act as server and would read data from x number of devices. This data will be pushed to central server every 1 hour . On this designated machine , data is pulled and stored locally (flat file or in memory database)
In this case we will have as many servers as number of locations . for eg we might end up having 1500 servers/machine managing which becomes a nightmare.
Solution B:
We have 8-10 central servers and each server reads data from a bunch of machines. The data gets queued up and is picked up in order which it has arrived.
The servers push the data to database.
How does client get the data ?
In solution B, the client gets it form database, assuming the data has been pushed into db and is still not queued up.
What do you think should work better ?
Any alternate design/solution ?
Should we think about programming at server with Unix/Perl. We do not want to use C++ for some other reasons.