Hello everyone,
we are still investigating performance issues with requisition endpoints and are currently especially interested in requisition search endpoint. We have already looked into reducing the response size, but other than that, the requisition search endpoint makes a lot of calls to the reference data service, mainly to check user rights. The current workflow is: for each found requisition (before pagination) verify user rights, by sending 3 calls to the referencedata service - retrieve user, retrieve right, call 'hasRight' endpoint.
In order to reduce the number of calls made to the reference data service, we are proposing the following:
1. Be smarter about right checking. If we have multiple requisitions coming from the search, let's send an actual request to reference data only for program-facility combo that we didn't ask for already. This could be achieved by having a simple list that holds already checked combinations and checking with the list first, before we ask reference data service.
2. Improve 'hasRight' endpoint contract. For some reason hasRight requires providing user UUID and right UUID in order to verify the user has necessary rights. Other services do not have access to user or right UUIDs, so they need to retrieve them from the reference data service first. Instead of doing all of that, the hasRight could just accept username and rightname what would make the usage of that endpoint simpler for clients.
Do you have any comments or concerns about making those changes? The Malawi team would be up for implementing at least the first one. The second one may take some more time as there are many clients of that endpoint already, but if time allows we could get to that as well.
Best regards,
Sebastian.
Sebastian
Brudziński
Software Developer / Team Leader
sbrud...@soldevelo.com
--
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+unsubscribe@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/751ceb7a-3e46-8221-0494-eec381f41470%40soldevelo.com.
For more options, visit https://groups.google.com/d/optout.
Paweł Gesek
Technical Project Manager
pge...@soldevelo.com / +48 690 020 875
To unsubscribe from this group and stop receiving emails from it, send an email to openlmis-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openlmis-dev/CADt-Nu2axUrE%3DqwQM93F0d6ewnehQvTwDktOOS5iW-D3oGuHhg%40mail.gmail.com.
Regarding caching: Yes, caching reference data is part of the discussions and analysis happening now. In the very short term (ie, last 2 sprints), we are finding that we can make easy changes that take less programming time and have larger performance boosts. The most recent example is that we had 1000+ inter-service API calls happening that were reduced to one single call simply because we were making the calls individually in a loop rather than requesting a batch of records in a single API call. (Good work team on finding that using profiling tools and proposing an easy fix!)
Caching is discussed at many of the meetings/conversations we have about performance, so the time is coming when caching moves from discussion to action.
-Brandon
--
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/751ceb7a-3e46-8221-0494-eec381f41470%40soldevelo.com.
For more options, visit https://groups.google.com/d/optout.
--Paweł Gesek
Technical Project Manager
pge...@soldevelo.com / +48 690 020 875
SolDevelo Sp. z o.o. [LLC] / www.soldevelo.com
Al. Zwycięstwa 96/98, 81-451, Gdynia, Poland
Phone: +48 58 782 45 40 / Fax: +48 58 782 45 41--
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/CADt-Nu2axUrE%3DqwQM93F0d6ewnehQvTwDktOOS5iW-D3oGuHhg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
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/D566EF9E.F08F%25jake.watson%40villagereach.org.
program-facility-right
ARV-W.CLINIC-viewRequisition
SELECT * FROM requisitions WHERE permissionString IN ("ARV-W.CLINIC-viewRequisition", "ARV-W.CLINIC-approveRequisition", etc...)
--
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/37eacf5b-c447-4785-9280-93c9c97e8100%40googlegroups.com.
On Jun 14, 2017, at 3:58 PM, Josh Zamor <josh....@villagereach.org> wrote:
--
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/37eacf5b-c447-4785-9280-93c9c97e8100%40googlegroups.com.