Scopes of a Space Browser

A space browser can have either time scope or distribution scope, which are defined by setting the values of fields in the browser’s BrowserDef object:

Time Scope
 The time scope can be used to narrow the period of time of interest.
  • snapshot means that the browser starts with all the tuples in the space at the time the browser is created (or initial values), but is not updated with new tuples that are put into the space after that moment.
    Note: The browser's timeout value is ignored when the time scope is snapshot, because in this case the browser will only iterate through a finite set of tuples (only those that are present in the space at the time of the browser's creation).
  • current means that the client applications can create queries that return large result sets using less resources. Note the following points regarding the current setting:
    • When the query returns a very large result set, the amount of memory required by the seeders and the querying application to provide true snapshot functionality may become a problem source; in that case, you can use the current time scope instead.
    • The current time scope is a lightweight, best effort, version of the snapshot time scope that requires almost no extra memory, and very little initial processing, but where changes in the space done after a browser was created with a current time scope may or may not be visible.
    • It is advisable to use the current time scope with key indexes of type TREE. However, the current time scope setting also works with HASH indexes.
    • The HASH index might return duplicate values if there is a need to grow the hash index used with a seeder. If duplicate values are an issue, it is advisable to switch to the TREE index type.
    • If there is a seeder join/leave/drop on the space while the browser is being created or is in use, then the current time scope throws an exception, because the iterated data would not be correct. Losing a seeder or having a new seeder causes redistribution of entries, and this violates the time scope requirements of the current setting.
  • new means that the browser starts empty, and is updated only with tuples (or associated events) put into the space after the moment of the browser’s creation.
  • all means that the browser starts with all the tuples in the space, and is continuously updated with new tuples.
  • new_events is applicable only to event browsers, and means that the browser starts empty and is updated with all the events generated by the space after the moment of the browser's creation (unlike new, which would only deliver events associated with entries put in the space after the browser's creation time.)
Distribution Scope
 The distribution scope can be used to narrow down the set of tuples or events being browsed.
  • all is used to browse over all the tuples (or associated events) in the space
  • seeded is used to browse only over the tuples (or associated events) actually distributed to the member creating the browser