On Tuesday, January 10, 2012 4:19:26 PM UTC-8, Wendy Cheng wrote: > It seems the engine operations (hooks) are invoked as part of the > > network request processing logic (e.g. process_bin_set() etc) (is this > right ?). Did the community ever discuss to place the hooks somewhere > around (or inside) the "item" structure ? Intuitively this would allow > each "item" being processed individually depending on where it is > located (RAM or another device). > > I'm trying out a hybrid environment where RAM serves as the primary > hash store but the entries could be offloaded into another device. For > this purpose, the code from the master branch seems to be easier to > hack as it already have item data+key and item meta-data separated. > Yes ? >
Well, you'd write an engine to do that. It's not enough to use hooks on the item structure as you don't want to block in the engine when there's a page in for example. Instead, you'd have your engine return EWOULDBLOCK and perform your IO in a separate thread and then issue a notifyIOComplete against the core API to indicate that the command is ready to be retried.