Threaded Messages Algorithm

Results 1 to 3 of 3

Thread: Threaded Messages Algorithm

  1. #1
    Erik Kastner Guest

    Default Threaded Messages Algorithm

    I&#039m making a messaging system (not totally a message board - but similar). I want to have the concept of threads.<BR>the way EZSiteForum (in use on this site) does it is to have have a "ThreadID" that ties all of the threaded messages together. My way (I&#039ve done it before, but am questioning my DBCalls) was to only have a ParentID column, and I used a recursive function (Provide the Parent to search for and select all messages that had that as a ParentID - then pass THAT Message ID as the Parent ID paramater). The problem with this method is the repeated db calls.<BR><BR>any idea how the big boys (Forte Agent, etc.) do it? where can I find algorithms on strange things like this (don&#039t need to be in asp).....

  2. #2
    Join Date
    Dec 1969

    Default RE: Threaded Messages Algorithm (Update on NNTP)

    I investigated the method used in NNTP/USNET (i.e. Forte Agent) - the way it works is this: EVERY message posted has a unique message id (&#060; unique @ host &#062;), this in turn is used when REPLYING to that message - a header called "References:" is made with the Message ID it is replying too. here is where it gets weird. If someone replys to the REPLY, then the "References:" header will have the FIRST messages MessageID, AND the SECOND one. What happens is, in long threads, the References header can get VERY VERY large...

  3. #3
    JHodges Guest

    Default RE: Threaded Messages Algorithm

    I am going through the same bout with threadid&#039s. and here is what i came up with. I use sql identity seed values to create the unique msgid then i built a counter to assign unique thread id&#039s to that same table. It sounds strange and i still am puzzled that it actually worked. The only thing now is may db paging is messed up and i am in the process of rewiting it. I am curious if anyone knows if the TakeAnumber package in the MTS server will do this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts