Hi Leszek,
I had a short conversation with Paweł, Sebastian, Nick and Chongsun about this. The way you are doing it is fine. I know it means that your Java code in the Requisition service has to do a lot of queries to the Reference Data service and then do its own filtering and sorting. We want to do it that way for now. In the future, if it ever becomes a performance problem, then we can revisit how to handle it.
I also understand that Josh, Darius and Paweł Gesek were part of some previous conversations about this. Paweł has some ideas about storing some of the Reference Data database fields inside the Requisition database as a way of “caching” that data so you could use filtering and sorting at the database level. However, I have a concern that doing that would introduce problems about data inconsistency; it would also break down the separation between the services each being responsible for their own data.
There are also some other possible improvements, such as creating specific new API endpoints that would provide filtered and sorted lists of facilities, products, or requisitions. But for now we don’t want to create new API endpoints for this. We want to wait for a larger discussion about how to design our APIs so that they provide filtering, sorting and pagination in a consistent way.
So for now the way you are doing this is fine. If anyone else has a question or concern, they should reply and explain.
-Brandon
--
You received this message because you are subscribed to the Google Groups "OpenLMIS Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
openlmis-dev...@googlegroups.com.
To post to this group, send email to
openlm...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/openlmis-dev/0bae9319-28b7-47f9-b71d-093020bdcb0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.