int publish(const char *document, size_t doc_size, const char *type); int obtain(char **document, size_t *doc_size, const char *doc_id);