Skip to content
  • Helmut Grohne's avatar
    f1fa755e
    precompute /data/json and store it in side security.db · f1fa755e
    Helmut Grohne authored
    The computation of the json export can take significant amount of time,
    which is why the web service caches it. Unfortunately, generation can
    take more than a minute and since the request handler holds a global
    mutex, no other requests can be served concurrently.
    
    Note that the debsecan data suffers from similar problems in principle,
    but it is precomputed as part of bin/update-db. This change does the
    same to the json data. The debsecan_data SQL table is generalized to an
    export_data SQL table that holds both debsecan and json. Another
    semantic change is skipping the base64 encoding. SQlite and apsw are
    capable of handling BLOBs and we already use BLOBs, so save a bit of
    space and computation and avoid the round trip through base64. As a
    result, the json data is never computed inside the web server and always
    up to date.
    f1fa755e
    precompute /data/json and store it in side security.db
    Helmut Grohne authored
    The computation of the json export can take significant amount of time,
    which is why the web service caches it. Unfortunately, generation can
    take more than a minute and since the request handler holds a global
    mutex, no other requests can be served concurrently.
    
    Note that the debsecan data suffers from similar problems in principle,
    but it is precomputed as part of bin/update-db. This change does the
    same to the json data. The debsecan_data SQL table is generalized to an
    export_data SQL table that holds both debsecan and json. Another
    semantic change is skipping the base64 encoding. SQlite and apsw are
    capable of handling BLOBs and we already use BLOBs, so save a bit of
    space and computation and avoid the round trip through base64. As a
    result, the json data is never computed inside the web server and always
    up to date.
Loading