API Modules
Build Application-Defined Data Structures with API Modules
Today’s data structure stores boost cache performance by accessing cached objects as data structures, like hashed or sorted sets, instead of as uninterpreted data (BLOBs). However, it’s a huge challenge to create and deploy new types of data structures in the cache.
Enter API modules, application-defined code that you can develop in Java and C# and then dynamically deploy to ScaleOut StateServer. With API modules, you create a strongly typed data structure for accessing a namespace of cached objects and then define APIs that clients can call to manage these objects. API modules let you quickly and easily implement application functions and reduce data motion to and from the cache.
Here’s an example of a shopping cart data structure that could be created by an e-commerce company to provide custom functionality for its shopping site:

Because API modules can be developed and deployed as the need arises, it’s practical to create specialized APIs for each application. For example, the e-commerce company might create APIs that total cart items by brand or product type. These APIs run efficiently within the cache and minimize data motion. They also take advantage of parallel speedup since API modules are deployed to all cache servers.


