[Nottingham] Wave

Martin martin at ml1.co.uk
Mon Jun 14 22:05:12 UTC 2010


On 08/06/10 21:43, David Aldred wrote:
> On Tuesday 08 Jun 2010, Martin wrote:
[---]
>> Previously, we've kept off forums for usage reasons. I guess the
>> maillist format suits most people very well.
> 
> I think the ideal would be something which combined the two - a forum which 
> automatically mailed posts to those who'd opted in to mail, and which could do 
> mail-to-forum postings too.  Anyone know of anything quite like that?

Looking around at existing examples in use on the web, there's nothing
that fits all the features I'd like to see...

With all the expertise on the list, can we not /simply/ "roll-our-own"?

It could also be a good test of the Open Source ideal and a test of
rapid development!


So... Anyone on for partaking in an "NLUG Wave"?

The hardest part is what to call it!?

First thoughts are to start simple, keep clean and minimalist, and just
implement something text-only to try out a few ideas. Then add (and keep
in mind for adding) html (or rtf?), images, and other content/media.


Important requirements in my features list include:

That whatever is put together must be equally compatible for interaction
by email and web browsers;

For both email and web browsers, a number of different views must be
easily selectable of whatever the forum/thread/wave is;

Include the option for static hosting of snapshots of the site;

Offer the normal maillist and digests functionality;

Other stuff and ideas but that makes a good start!


And all to be implemented in very small steps that can be
demonstrated/tested at each step.


Thinking aloud:

When thinking about threaded maillists, the first design thought is to
use a linked list to store the mail messages with the links following
the thread hierarchy tree.

However, when retrieving the mail messages from such a linked list to
display them, you can easily only offer the 'view' as dictated by the
links structure. Other views that don't follow the linked structure
become a slow multiply repeated run through the links to extract one
message at a time out of order to the links structure. A 'fix' is to
maintain multiple links through the linked list, but that still assumes
you anticipate beforehand all the ways the data might ever want to be
accessed...

Hence, instead, put the maillist/wave into a random access database...

First proposal is to store message text with one sentence or html
reference per record. This sets the granularity of where new content can
be inserted/manipulated.

Index the records using an arbitrary precision numeric field so that new
posts are added by incrementing for a new index for whatever the thread
depth is at that point. Divide the thread index increment by 10000 (or
whatever is commonly most efficient for hardware) for each level of
thread hierarchy. So for example, level one of a thread is incremented
by 1.0 for each new post, level two is incremented by 0.0001 from the
previous post, level three is incremented by 0.00000001, and so on. This
allows for unique indexing of 9999 records at the next thread level down
inserted between any two records.

(That fits nicely with the postgresql arbitrary precision numbers that
store 4 decimal digits per two bytes.)

Also add a timestamp for each record.


That allows for viewing by simple sorting for:

Forward and reverse flat view ("unthreaded") by timestamp;

Forward and reverse threaded view depth first by sorting by index (the
type of threaded view shown by most mail readers);

You can also sort (forward and reverse) by modulo whatever fraction to
sort for a breadth-first hierarchical view (typical view on forums).


That should get everyone happy in that you can in effect select for top
or bottom posting and see mid-posting by how new lines of text are
inserted into the web view.

The maillist can get updated after detecting no new lines have been
added after some time limit, or at some interval if changes continue to
be made.


On the web view, to mark where new items can be inserted, place a
clickable point at every "." and at the end of each paragraph?

Emailed inserts are inserted according to the mail headers reference.
The one difficulty for that will be for how to untangle the quoting so
that the wave doesn't get clogged with repeated quotes...



OK, enough rambling.

Comments, thoughts?

Cheers,
Martin

-- 
----------------
Martin Lomas
martin at ml1.co.uk
----------------



More information about the Nottingham mailing list