> On 21 Dec 2017, at 8:29 pm, Noel Grandin <noelgran...@gmail.com> wrote:
> 
> On 2017/12/21 11:42 AM, Matthew Phillips wrote:
>> The serializer would need therefore to potentially access the H2 MVStore 
>> while reading an object, calling back 'up' the stack as it were to read 
>> parent object(s). This strikes me as an unexpected thing to do, and I wonder 
>> if H2 would have a problem with that?
> I think that is quite likely to lead to infinite loops.
> 
> You're probably better off building some kind of serialisation layer on top 
> of MVStore.
> That layer can load an object, check if it needs to load a parent logic, and 
> do so.

Yes, that’s what I originally planned, but then I realised I’d also have to add 
my own caching layer, so I’m looking for a way to be lazy and use H2’s.

> Strikes me as a very slow way to store data, your latency is likely to be 
> terrible.
> 
> Personally, I would just waste the space - disk is cheap until you get past 
> the terabyte mark.

You’re right, but it’s not so much about the disk space, as the memory. It’s 
also far faster to diff Clojure maps when they’re derived this way (rather than 
being entirely separate copies) because you can skip diffing any values that 
are identical reference-wise. The reduced memory usage and fast diffs are why I 
think storing the data this way should be a net win for the application I have.

Thanks very much for your feedback. Will keeping thinking.

Cheers,

Matt.

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to