Well, this is not specific to any programming languages. I came across this situation in Android, iOS, PHP and .NET.
The problem is many times I come across a situation while building IoT apps, where I need to call a webservice (each in a separate thread) which does the insert into DB (probably more than 20 - 50 insert in a sec) to log the sensor data continuously.
So I face 2 problems here...
- In the app end, it stops responding for creating so many threads.
- In the server end, it also hangs due to so many inserts.
Sometimes, in Android and iOS programming I need to do the same in SQLite DB. In that case too it hangs in such cases.
The only option that I'm aware of is using Message Queue (which is specific to .NET I guess)
Are there any other way to solve these type of cases?