Open Source Content Management Framework

MidgardQuery and read only results

  1. MidgardQuery and read only results

    Tue March 16 2010 14:15:09 UTC
    Hi!

    MidgardQuery basic classes are more or less useful, but I found some
    issue. Basically, what I want to implement is to keep GDA's data model
    as underlying storage for queried objects' properties. It means, every
    property of every object will be duplicated only on demand.
    (Currently we set up full object whether we need it or not).

    Problem is that underlying data model is not "writable".
    What do you think about optional read only mode for selected objects?
    This approach will give us two possibilities:

    * Normal mode
    We select all data for all objects, and set all properties.
    Later on, one is able to update/delete/whatever object.

    * Read only mode
    We select all data for all objects and initialize only objects.
    Property (it there's read property attempt) is taken directly from
    underlying resultset.

    Latter solution will improve performance *a lot*.
    One will be able to update object, but without any single modification,
    which means objects will be updated with exactly the same values which
    has been selected from storage.

    Piotras
    _______________________________________________
    dev mailing list
    dev@lists.midgard-project.org
    http://lists.midgard-project.org/mailman/listinfo/dev
    •  Reply
  2. Re: [midgard-dev] MidgardQuery and read only results

    Tue March 16 2010 14:30:06 UTC
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: RIPEMD160

    Piotr Pokora wrote:
    >
    > * Normal mode
    >
    > * Read only mode
    >
    > Latter solution will improve performance *a lot*.
    > One will be able to update object, but without any single modification,
    > which means objects will be updated with exactly the same values which
    > has been selected from storage.
    >

    +1 for settable mode, It might even default to read-only mode (since the
    wast majority of QB use cases are essentially read-only and for
    exceptions one can always instantiate a new full copy of the object as
    needed).

    /Rambo

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.7 (Darwin)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iD8DBQFLn5Nuk2FlZlXdE74RAzSbAJ9uDRgUFbleOQH5/ybYKIN8zlS12QCfQae6
    6rJsVQ53ok4TUJGv+m786k0=
    =gzXl
    -----END PGP SIGNATURE-----
    _______________________________________________
    dev mailing list
    dev@lists.midgard-project.org
    http://lists.midgard-project.org/mailman/listinfo/dev
    •  Reply
  3. Re: [midgard-dev] MidgardQuery and read only results

    Wed March 17 2010 12:20:08 UTC
    Eero af Heurlin pisze:

    Hi!

    >> * Read only mode
    >
    >> Latter solution will improve performance *a lot*.
    >> One will be able to update object, but without any single modification,
    >> which means objects will be updated with exactly the same values which
    >> has been selected from storage.
    >
    >
    > +1 for settable mode, It might even default to read-only mode (since the
    > wast majority of QB use cases are essentially read-only and for
    > exceptions one can always instantiate a new full copy of the object as
    > needed).

    I made 5 simple tests. 3000 objects has been selected per each test.

    * MidgardQuerySelect in read only mode:

    0,1477 avg

    * MidgardQueryBuilder

    0,3390 avg

    Piotras
    _______________________________________________
    dev mailing list
    dev@lists.midgard-project.org
    http://lists.midgard-project.org/mailman/listinfo/dev
    •  Reply
Designed by Nemein, hosted by Kafit