noSQL implementation: threaded messaging system -
i'm trying build threaded messaging system website. system provides following features :
- allow users send messages between each other
- arbitrary levels of replies (threads)
i tried using mysql+php , has built skeleton. in whole thread retrieving part kinda recursive, believe not best thing relational schema can do. i'm researching non-sql implementation. avoid such problem making data retrieval more natural.
anybody has such experience give me hint please.
update: client app written in php , remain so.
a document database, or object database, accomplish you're looking quite well. there ways can rdbms work well. example schema is:
create table messages ( message_id int, original_message_id int, parent_message_id int, message varchar(4000) ); you can perform selects table like
select * messages message_id = ? or original_message_id = ? order parent_message_id; this solve problem. advantage doing oodb or document database you'll able pull of data 'conversation' using 1 query, since it's stored together. on downside, sacrifice ad hoc querying flexibility convenience of reading of data @ once.
Comments
Post a Comment