THUKEG / saedb

the SAE platform
http://thukeg.github.com/saedb/
11 stars 19 forks source link

Memory Mapped File with zero-size file #54

Open wweic opened 11 years ago

wweic commented 11 years ago

Current implementation crash when save zero-sized file.

thinxer commented 11 years ago

I suggest a new interface for graph writers. We don't specify the types in the writer constructor. When users want to store some kind of data, he calls writer.NewDataFile(type_size, count), which returns some GraphDataStorage type. Then he writes to that stroage, and sets vertex data or edge data to that storage. This is also a step towards heterogeneous graph.

thinxer commented 11 years ago

We can also record the type info as a header in this storage.