Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The experiments below are centered around the question about where to execute the operation. Three different scenarios are implemented:

  • Client-side aggregation: The client-side aggregation is implemented in a way that client request a number of objects one by one where each object contains one integer value. Consequently, a "Read-RPC" gets invoked for every object and the client locally computes the sum.
  • Server-side aggregation via hashtable lookup: A range of keys is passed to the server and the server performs a lookup in its own hash table for every object. Again, each object contains a single integer which gets added up (as shown in Listing 1). Once the aggregation is done, the resulting sum is sent back to the server via RPC.
  • Server-side aggregation via hashTable forEach: The hash table in the MasterServer offers a forEach method that iterates over all object contained in the hash table. A callback can be registered to that method which is shown in Listing 2.
Code Block
titleListing 1: Aggregation via looking up a certain range of keys in MasterServer.cc
for(uint64_t i = 0; i < range; ++i)
   {
        LogEntryHandle handle = objectMap.lookup(tableId, i);
        const Object* obj = handle->userData<Object>();
        int *p;
        p = (int*) obj->data;
        sum += (uint64_t)*p;
   }

...