I am writing a simple forum-like application in the Google App Engine and trying to avoid scalability issues. I am new to this non-RBDMS approach, I would like to avoid errors from the very beginning.
The design of the forum is quite simple, messages and answers will be the only concepts. What would be the best approach to the problem if the forum has millions of posts?
While the model (devoid of useless properties):
class Message(db.Model):
user = db.StringProperty()
text = db.TextProperty()
reply_to = db.SelfReferenceProperty()
Splitting the model, I think, is faster, because it will request fewer elements when receiving "all messages":
class Post(db.Model):
user = db.StringProperty()
text = db.TextProperty()
class Reply(db.Model):
user = db.StringProperty()
text = db.TextProperty()
reply_to = db.ReferenceProperty(Post)
This has a lot to do with one in the RDBMS world, should ListProperty be used instead? If so, how?
Edit:
Jaiku uses something like this
class StreamEntry(DeletedMarkerModel):
...
entry = models.StringProperty()
...