2 research outputs found

    Data Structure for Supporting In-Memory Storage with Multiple Keys

    Get PDF
    The Object data structure in JavaScript is simply a set of key-value pairs in which the values for each key must be one of the primitive data types. Developers can add multiple value fields for a given key within a JavaScript Object by using an array as the value. Developers can also use an array as a key and retrieve any value via the array. However, developers must query Objects with whole matching key values which prevents execution of queries with partial or multi-key matching. Overcoming these limitations by storing data in a client-side database on the local disk of a user device is an asynchronous, high latency, and potentially risky operation. This disclosure describes a higher-level data structure called InMemoryStorage that can be used to store data with multiple keys in memory. The values for the keys within the InMemoryStorage data structure can be JavaScript objects, each of which can store its own key-value pairs as usual. Developers can retrieve data from the InMemoryStorage data structure by formulating queries based on keys within the objects stored within it. The techniques can be used for any application that requires synchronous, in-memory, client-side storage and access of data with more than one key, such as batching logs in memory prior to transmitting them to remote persistent storage. The techniques extend JavaScript by adding support for partial and multi-key matching

    Network Status Management and Networkless Logging

    Get PDF
    This disclosure describes techniques of networkless logging of client application events when the client device does not have an internet connection. Networkless logging as described herein is request-agnostic, stores requests locally (e.g., on device memory or disk), and, if a network connection is presently unavailable, sends out the requests at a later time when the network connection becomes available. This disclosure also describes a network status manager that can accurately and reliably obtain the state of the network (connected or disconnected) by sending fast, lightweight requests to a remote endpoint that is geographically close to the user
    corecore