vector write/read
Tigran Mkrtchyan
tigran.mkrtchyan at desy.de
Thu Jun 19 03:06:34 PDT 2008
Hi,
just want to ask why vector operations are not a part to nio?
we are working on distributed storage and our users often know where
data is (files are like small databases - header and records). We have
our own protocol for it and extensions to posix IO api:
typedef struct {
off64_t offset;
int len;
char *buf;
} iovec2;
extern int dc_readv2(int, iovec2 *, int);
Basically what it does is you give an array of buffers and for each
buffer you provide an offset. It's very helpful when there is a lot of
randomly distributed small records. If file system do not support it you
can always fall back to 'classic' reads internally, but provide only
classic API force other people to find some custom solutions.
Regards,
Tigran.
________________________________________________________________________
Tigran Mkrtchyan DESY, IT,
tigran.mkrtchyan at desy.de Notkestrasse 85,
Tel: + 49 40 89983946 Hamburg 22607,
Fax: + 49 40 89984429 Germany.
More information about the nio-dev
mailing list