new design



So, lets discuss how to implement the new design.
We have decided to make this a web app, to make it easy for people to
use it.

Some of the objects in the mockup don't really work well as a database
object, since they change way to much. The live-editing objects need to
be stored in memory in the yarrr server, and we only save them in the
database when a comment is closed.

So, we need the following objects in the database:

Person:
* nick
* public key

Topic:
* unique id
* name

Statement:
* Text
* List of people

Comment
* topic
* text of comment
* log of discussion
* list of authors
* list of accepted authors
* timestamp

Then we have these in-memory objects in the server:

LiveComment:
* timestamp when comment was opened
* text
* authors
* version of the text

Discussion:
* List of people talking
* Ordered list of tuples: (author, text, timestamp)

The client displays a webpage for each topic displayed, which is
dynamically updated using javascript. Public and Private keys are stored
in cookies (and autogenerated on first use, although we probably want to
support registering the private key with the server to allow you to use
other machines). 

I think we can use xml-rpc to update all the live items on the page. For
instance, we can avoid massive polling by doing an async xmlrpc call
from javascript that won't return until something changed. Then we can
look at the result and refresh that part of the page. (Hopefully the
outstanding connections won't be a bad problem for the server.)

For these async "poll" calls we need to keep in-memory waitqueues for
various db objects that we need to trigger each time such an object
changes.

I'm not sure how much of the current codebase we will be able to keep.
The Person class might be useful, and so does some parts of the
Hibernate Setup. Maybe it makes more sense to start with a new cvs
module, and lift over the things we want to keep using.

I'm gonna start experimenting a bit with getting some form live editing
working in a web browser. Maybe this its a good way to start this whole
redesign: pick one feature and try to get that working in a standalone
web page. This way we can learn what works and what doesn't work, and
what is needed before designing the more complicated server that does
all these things at the same time.

Some questions:

Some people have a gnome foot icon in the mockup. I assume that will be
on people with cvs accounts. Is this type of markings different in each
topic?

The mockup has a "Start a Discussion" button. Does this mean there can
be several chats per page?


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an old-fashioned Jewish stage actor on his last day in the job. She's a 
radical antique-collecting detective on her way to prison for a murder she 
didn't commit. They fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]