I am calling a web service which can return very high volume of data (>100K records = 200 MB). I have to insert this data in to SQL Server too. I have the following questions.
- I know it depends on the server resources, but is there a ball park advice on limit of how much data should I store in any java structure (Collection - with item having 4,5 string members each of length < 255) at run-time? I am already using 50,000 records in each call (I am not sure how much memory does it take)...
I then upload this data using batch sizes of 1000 to database using JDBC. Is this correct approach? Would there be any benefit if I use JPA for this instead of JDBC?
Also any standard design to handle this? I can think of breaking down the web service calls into pages of limited size and then using Java Threads to handle them. Is this the right direction?
Thanks