You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
=============
A couple questions related to the data request from the NC R package:
When users create a DataRequest object, are you caching the Java instance in memory in between paging requests?
If this is a paging request, but the object no longer exists in your cache (e.g. following a server restart), do you then only reload the object from the database?
Do you need to write anything to that object after it is initially created (i.e. during paging requests)?
If we don’t need to write to the database during paging requests, I’d like to consider removing the class LockedObject on those objects stored in the cache (e.g. making them read-only, so other processes could open them for editing such as from the web site). If you are calling the update() method at every page, this is probably not worth doing (or we may want to revisit whether that is necessary to do).
The process would be something like this:
User creates the query parameters calls the API
The API creates a new DataRequest object, saves it to the database, and then calls datarequest.removeLock();
On paging requests, you check the cache first, and if you need to reload it again, you call the readonly = true constructor.
The text was updated successfully, but these errors were encountered:
The one issue I see is that when a DataRequest instance is finalized a call to DataRequest#upsert happens. This is where the data download statistics are written to the DataCollections records (I believe). If I remove the lock earlier, will this operation fail?
Hi @pmorrill, this slipped past me, sorry it's taken so long to respond!
Just to confirm, this is something API side only, right? Not something I need to implement in R?
From Denis' email:
=============
A couple questions related to the data request from the NC R package:
If we don’t need to write to the database during paging requests, I’d like to consider removing the class LockedObject on those objects stored in the cache (e.g. making them read-only, so other processes could open them for editing such as from the web site). If you are calling the update() method at every page, this is probably not worth doing (or we may want to revisit whether that is necessary to do).
The process would be something like this:
The text was updated successfully, but these errors were encountered: