DBRef should handle $db for reads and writes, as soon as the server itself will be able to handle it.