Elliptics network in a meantime got update notifications subsystem.
It allows object with given ID to be monitored by different users, which will receive notifications after successful object update, similar to how inotify is implemented for the local filesystem. Each notification contains transaction added to the object (ID, size, offset and flags) and client address who made IO update.
Notification requests can be added/removed in a real-time, which allows users to implement, for example, distributed monitor, which will receive the latest transaction, fetch its data and add it to the local object each time it is updated in the network. I plan to use this for the POSIX coherency, when readers will be notified each time writer updates the file, so they could invalidate pages matched to the modified range, and reread them when accessed next time.
That's what example application dumps when received a notification (wrapped manually):
reader $ ./example/notify -a localhost:1111:2 -r localhost:1025:2 -l /dev/stderr -m 8 -i 22 -I 1234 writer $ ./example/example -a localhost:2222:2 -r localhost:1025:2 -l /dev/stderr -m 10 -i ff -I 1234 \ -T sha1 -W /tmp/test.c 02:18:15.911630 2: 253694cf55d5fdcb742c63bf74ad3a48d24e7b20: object write completed: trans: 0, status: 0. 02:18:15.911671 2: 1234000000000000000000000000000000000000: object write completed: trans: 1, status: 0. 02:18:15.911693 2: Successfully wrote file: '/tmp/test.c' into the storage, size: 185. On reader: 02:18:15.911533 : 253694cf55d5fdcb742c63bf74ad3a48d24e7b20: client: 127.0.0.1:59732, size: 185, offset: 0, flags: 6
Also extended API and added a helper for the simple transaction allocation and sending. Helper function gets control structure, which contains different (the most widely used) fields filled in the transaction, allocates needed object, fill it, add into the transaction tree, searches for the output network route and sends resulted packet. Helper is very similar to what was done for the IO transaction, which main purpose is to allocate read/write request. Now there is a convenient control transaction helper, which should be used instead of manual transction management (which is not forbidden though).
3 AM in Moscow, I love this time!
Чем хуетой страдать, лучше бы на скалодром приехал :)
А уж тем более без сауны!
Да ладно, помыться можно и дома :) Просто ты lazy bum :)
Нужно начать - уже пару недель не занимался, лениться надоедает.