797268 wrote:Then follow my initial suggestion: The thread that reads the data off the wire just immediately sticks it in a queue and no more. Then have a thread pool that reads the data from that queue, processes it, and stores it.
My current situation is simple the data received via the java listener is gps data e.g latitude,logittude, date time, alerts etc. So in order not to burden the java listener we immediately store the data after receiving. So if I start to process the point of interest location, geo fence etc I will need to do a lot of select query from the db and calculation etc. So what is the best suggestion to handle this heavy burden. I am worried I might loose some of the transaction because the queue of data waiting to come in may build up. I might be wrong thinking multi thread could help.