[ORM]: faulting

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Oct 12 08:38:11 CDT 2007


On 11/10/07 11:27 AM, "Thorsten Hohage" <thohage at objectmanufactur.com>
wrote:

>>> So is this true that all million objects are prepared?
>> 
>> Yes.
> 
> Sorry IMHO: NO or better it should be NO
> 
> I think ORM and all technics around are related to the requirements.
> If you think about a solution with only a few tables and the main
> table has some million objects and you need to "scan" all the data
> again and again or add perhaps another set of 10000 rows each day,
> then ORM and faulting and many other patterns are not the best
> choice. Of course you could do it, but IMHO it would be a good advice
> to not use them.
> 
> But if your style is more finding a some kind of root-object, and in
> this case even do a select over the million records and receiving 20
> or 200 rows, picking one of these "objects" and travers the tree
> down, so e.g. look at the full contact data with all releated items,
> "opening" the invoices, one year of the invoices, request the perhaps
> 300 invoices, open one invoice with maybe 20 positions and 2
> reminders and 10 related aritcles, changing to one article, ... THEN
> you should use a ORM tool. It's fast and easy.

At last of end we have come to this point.
    Exists conditions and trad-offs. See my prev letter.
 
> In this case and after doing this operation you've got
> 
> 200 (i.e. contact) + 2000 (faults of related contact informations,
> some are loaded) + 10 (years) + 300 faults of invoices informations,
> some are loaded) + 20 positions + 2 reminders + 10 articles + 100
> (faults of related article informations, some are loaded) ...
> 
> = 2642 faults / object in the application cache not a million.

Good.

But in Valentina we work not with faults, but just return ArraySet of linked
2000 records. This is 2000 * 4 bytes = 8K.  Plus Valentina Server/Client
compress packets >1Kb, so by network with go may be 2K only.

So my point for you Thorsten

    Try to start use in your ORM framework the Valentina API instead of SQL.
    I underline, not Class way, but API way of Valentina.

It now looks that you will get huge benefits comparing to SQL of Valentina,
and then more to any other RDBMS.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


> AFTER doing this "operation" (business operation here)  you've got
> two options
> 
> a) i.e. using a "database context" for each "operation" and
> nullifying it after, so with the next "operation" you restart with 0
> faults
> 
> b) keep the faults, because statistical the next operation will need
> some of the already loaded data. And firing a fault is easier then
> select data again. So of course after a day or week of continous
> execution you'll probably end up with 300000 faults in you app.
> 
> 
> Style "b" is often used for application server concepts and THIS is
> often the reason, why apps during test run fine, but after a month of
> real world operation they break down completely and new hardware was
> bought, or the was redesigned ;-)

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list