Uploaded image for project: 'Smack'
  1. Smack
  2. SMACK-860

Add caches with short lived entries for disco#info and disco#items results

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.3.2
    • Fix Version/s: 4.4.0
    • Component/s: Extensions
    • Labels:
    • Expected Effort:
      Minimal

      Description

      Sometimes the same entity and node pair is queried multiple times in a brief period. Assuming that entities typically do not change their disco#info and disco#items related capabilities, we could avoid a network I/O if Smack would cache the results for a short period (30 seconds, 1 minute, 5 minutes),

      Note that until DiscoverInfo and DiscoverItems is mutable, the need to return cloned instances of the classes.

      Methods where the caches should be plugged in

      • ServiceDiscoveryManager.discoverInfo(Jid, String)
      • ServiceDiscoveryManager.discoverItems(Jid, String

       

      Links:

      https://github.com/Flowdalic/Smack/pull/21#issuecomment-471281503

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            flow Florian Schmaus
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: