[dev] proposal: HUOS

Chuck Hagenbuch chuck@horde.org
Tue, 24 Oct 2000 23:47:27 -0400 (EDT)


Quoting Anil Madhavapeddy <anil@recoil.org>:

> > What would be stored:
> > - a serialized representation of the object
> 
> Using whatever backend (wddx/native/other) I assume?

Correct.

> It would take the unique id as the first argument?  In that
> case optional validity checks for all the other fields in addition
> to just owner would probably be needed.
> 
> For example, if you want to retrieve this object, but only if its 
> not more than a month old (for some calendar related purpose perhaps,
> which has expired).  Ok, far fetched example, but it's 3:00am :)

No, that makes good sense.

> Would something like Kronolith store its day (say, appointments) using
> this, or does it just use ICAP?  In the former case, more flexible 
> searches would also be needed on more than just the user field
> right?  Alternatively, just retrieve a load of objects, and filter
> one them using code, to avoid a bigger API, but this may involve
> retrieving more objects than needed.

No no no - this isn't meant to store data that you'd need to search through in
large amounts. Kronolith uses mcal - which wraps icap and local storage - for
that functionality. This is meant for things like identies, credentials, etc,
where each user is only going to have a few, and you don't need to do
complicated sorts...

> Gulp, our company did something similar in the early days of PHP3 called
> Omnisite - hugely flexible, but it was pretty hairy from a design
> and maintainence POV, especially as the database classes start piling
> up, and you forget what _this_ particular one does, etc...

I think with php4's get_class, class_exists, get_declared_classes, etc this gets
a bit easier - I'm flexible on this part of the idea, although it does seem like
something like this will be needed if we're going to be pulling objects out of
here on demand...

Btw, if you had problems remembering what each database class did, maybe there
were other problems?

> It sounds great to me, and the problem of this kind of storage would 
> be just be solved once and for all, and pretty flexibly too.

Cool. If I have some time tomorrow, maybe I'll take a shot at a basic
implementation...

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
Many states consider gambling so immoral that they not only prohibit private
gambling organizations, they thoughtfully provide their own.