DHT tricks and patterns
Wednesday, March 16, 2011
3:52 PM
Tricks
DHTs are polymorphic: anything can be stored under a key.
(but you have to remember what the type is)
Never embed a persistent object inside another;
embed a reference. 
Ex: a shopping cart's contents are not necessarily contained in the DHT for the shopping cart; they're filed in the DHT themselves. 
Never use lists when you play tricks with keys!