status page "db_ls" of /equipment should be folded into the main batch request

Issue #119 resolved
dd1 created an issue

the status page polls every 1 sec (it looks like) for "ls /equipment". This request should be folded into the main batch request made by the status page. K.O.

Comments (3)

  1. Thomas Lindner

    When we first discussed this we decided that we didn't want the status page to make a request like

    mjsonrpc_db_get_values(["/Equipment"])

    since some experiments store a lot of variables in /Equipment/Frontend/Variables A call like that might be copying MBs of data every second.

    Instead, we wanted to get the list of equipment first ('ls /equipment') and then get the specific directories we need

    mjsonrpc_db_get_values(["/Equipment/FE1/Statistics","/Equipment/FE1/Common","/Equipment/FE2/Statistics","/Equipment/FE2/Common"]);

    Hence we need to have the list of equipment to be able to produce that request.

    So I guess what you want is

    1) We get the equipment list as part of the initialization and use the list in the first periodic request.

    2) In every periodic request we also request the list of equipment. That equivalent list would be cached and then used in the subsequent request.

    The only downside is that there would be a small additional delay the first time a new equipment was added before it appeared. I guess that's probably fine.

    If that's what you want I can take a try at implementing that.

  2. Thomas Lindner

    I made a branch that includes the proposed fix for this problem:

    https://bitbucket.org/tmidas/midas/branch/issue119_extracall_fix

    As I said, the change I made caches the list of equipment and uses it in the next update request. I tested the change by adding and deleting a particular equipment; there is a small additional delay compared to the original implementation. But it is not very noticeable and people aren't often adding equipment; so I think it is ok.

    If either Konstantin or Stefan have a chance to test it out, then I can merge the change.

  3. Log in to comment