Hi Ian,<br><br>Thank you for your prompt response. Some comments below<br><br><div class="gmail_quote">On Tue, Jan 27, 2009 at 1:32 PM, Ian Eslick <span dir="ltr"><<a href="mailto:eslick@media.mit.edu">eslick@media.mit.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>Such a thing would be possible, but you would need to have a local<br>
copy of the value in memory and this could create more problems than<br>
it solves. It's also unclear to me how common this case. I don't<br>
write the same value to the same slot very often!</blockquote><div><br>My question came from thinking of web applications. A user chooses to edit a record. After s/he submits the form, I wouldn't want to incur the DB write "costs" unless the data was actually changed by the user. <br>
</div><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The weak hash is simply used to speed up the 'recreation' of a<br>
persistent reference when it is deserialized from the underlying<br>
storage medium (BDB in this case) so fits into this model. I've<br>
looked several times at building-in the support to enable a full<br>
replication model for BDB, but it's a fair bit of work to deal with<br>
the single-master requirement for replication and distributed<br>
transactions for global coherence. The write performance and<br>
contention performance may decline noticeably, but conflict-free read<br>
performance should be the same as in the non-replicated case. I don't<br>
fully understand all these issues yet and am prioritizing a lisp-only<br>
Prevalence style backend in my development roadmap.</blockquote><div><br>I'm not too familiar with BDB replication myself and was just googling around. After reading that document in more detail and your explanation, makes me realize that replication or the distributed BDB model is not such a simple task. Since I don't think that my application(s) would really out-scale the single machine Elephant/BDB deployment, I would certainly not want to encourage investing time in this and rather concentrate on a lisp-only prevalence backend. Maybe one that covers these issues in the future.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Psets today are a convenience API around the BTree that can be<br>
overridden by data stores later for more efficient implementation<br>
(e.g. hash vs. tree) as appropriate for that store. BTrees are cheap<br>
for BDB to create and use so use of them at any size is fine. You<br>
might want to wrap an abstraction around the BTree directly since the<br>
pset API is an un-ordered set. If you want to do range extraction or<br>
set intersection you'll want the btree's support for ordered objects.<br>
<br>
The query system currently doesn't support psets, although it should<br>
eventually.<br>
<br>
Slot-associations currently don't deal with reflexive references<br>
(associations among instances of a single class), but that would also<br>
address the 'friends-of' problem.</blockquote><div><br>I haven't looked too much into the code, but your response seems positive overall. I haven't read anything about slot-associations in the manual, so I guess I'll have to learn about them in the code and the tests themselves.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I hope you enjoy elephant! If you want to add/implement or spec out<br>
some of these changes you are thinking about, I'd be happy to support<br>
you.</blockquote><div><br>I'll see if there is anything I can contribute. I first need to familiarize myself more with it and start getting my feet wet.<br><br>Thank you again and best regards,<br>JD</div></div><br>