Gerard van de Looi wrote:
> if we are redesigning the database access layer of mmbase, i
> think we should add all database access to this layer and not only the
> search queries.

I don't think we are changing the access layer - we are changing the way 
we define queries (obtain ranges of nodes).
All other database access  (update, delete), is only per node (never on 
ranges or selections), so we need no additonal 'layer' to handle such 
requests, as they are simple enough (i.e.: delete(node), insert(node) etc.)
We should get rid of SQl-queries in code other than the database layers, 
but that is one of the tasks of the Cleaning project.

> Further I think we need the following features in this layer:
> - Prepared statements

These are already used for updates/inserts, but I do not think that 
using them for queries will have much impact performance-wise, as you 
need to use teh smae inatance of a statement again to gain performance, 
and statements are immediately discarded after running.

> - Concurrency control (If i'm editing the document at the same time as
> someone else, the first to save hist content wins and the other one receives
> a message that the content has been changed since he started editing it)

This should be the task of MMBase, either the TemporaryNodeManager or 
the application that uses it. The database can't handle this as you need 
to maintain a connection to use database locking.
It can be sued when you sue transactions to put a batch of data in, but 
otherwis eit is very hard to do on a multi-user system wiotha  limited 
numbe rof connections.
Not that the Dove, the xml-communication tool used by the editwizards, 
does have a certain 'concurrency' checking, but this is AFTER you are 
done editing (it generates an error if you attempt to commit a node that 
was changed after you retrieved it for editing).

> - Multiple database support (optimized queries per database)

This is rather complex due to the use of a single object table.
But IIRC, there have been people using multiple clouds.

> - Scrollable resultsets in case of large query results

Also a bit hard to create due to the limited number of connections.

-- 
Pierre van Rooden
Mediapark, C 107 tel. +31 (0)35 6772815
"All your MMBase are belong to us"


Reply via email to