Hi,
for my new project, i am thinking of using the datastore as kind of a
triple store (or tuple store). the idea is based on graphd, the tuple
store behind freebase (please see
http://blog.freebase.com/2008/04/09/a-brief-tour-of-graphd/
for more info).
my simplified model would be something like this:
class Item(db.Model):
name = db.StringProperty()
class Triple(db.Model):
from_item = db.ReferenceProperty(Item,
collection_name='from_triples')
type = db.ReferenceProperty(TripleType)
to_item = db.ReferenceProperty(Item, collection_name='to_triples')
value = db.StringProperty()
prev_triple =
db.SelfReferenceProperty(collection_name='next_triple')
- a triple can either have a to_item or a value
- once written, triples are read-only (log-structured, append-only)
- to modify or delete a triple, a new triple is written with
prev_triple pointing to the previous triple
- the number of items at the beginning is small, but could grow up to
multiple millions
- most items have between 10 and 50 related (active) triples, but an
item should be able to scale up to 100'000 triples
i am thinking of putting an item with all related triples into the
same entity group, but are there any side effects or limitations when
using a large number of different entity groups?
the most frequent queries would be:
- show a single item with all related (active) triples
- show all items that have a active triple to another specific item or
with a specific value
do you have any experience or ideas/suggestions for implementing this
kind of triple store in GAE? how would you improve my model by
applying common optimization techniques like relation index entities?
thank you in advance for your feedback and please keep up the good
work!
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.