How to handle large volumes of data with non-persistent entities?

0
The whole application is fetching data using REST API calls and when the number of objects in the memory goes above 100, Mendix gives a warning and later the app starts having unexpected behaviour. Is there a way to handle large volumes of data in the application?
asked
3 answers
0

HI Ridhwik Kalgaonkar,

 

Try if you can make use of the Paging mechanism in the Rest Api ( offset and limit) , so that you will only retrieve a set of objects process it  and then take  another batch.

answered
0

You can change the threshold limit for the warning as described in Mendix docs: https://docs.mendix.com/refguide/transient-objects-garbage-collecting/#:~:text=of%20a%20request.-,4.2%20Detecting%20Requests%20with%20Large%20State,-By%20default%20the

What kind of unexpected behavior are you seeing? In some cases I have used thousands of objects from rest calls without issues (I just turned up the threshold limit to not display the warning from 100).

answered
0

Hi Radhwik,

 

You could try the following

  • Split the process: first receive the json and store this as string or filedocument. Do the mapping of the string/filedocument to the entities on the server by using the Queue module from the Appstore
  • If the number of objects is still to much, you could try to split up the JSON in chucks with string-operations.

Hope that helps,

Thijs

answered