OnniBase BTree question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

OnniBase BTree question

Dmitry Dorofeev
Hi all,

I am using BTree to store session qookies with OmniBase.
The code is like this:

        t := self transaction. "returns current OmniBase transaction"
        tree := t root at: 'sessions'.
        b := BMShopBasket new.
        t makePersistent: b.
        t lock: tree.
        tree at: v put: b.
        t markDirty: tree.
        t checkpoint.
        t unlock: tree.

I feel it is not very efficient and may be even incorrect way to use BTree.
Should I use OmniBase standard BTree implementations ? How can I avoid locking the entire tree ?

Thanks,
-Dmitry.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: OnniBase BTree question

Lukas Renggli
> I am using BTree to store session qookies with OmniBase.
> The code is like this:

Have a look at the package OmniSupport in SqueakSource. There are
subclasses for all the data-structures in the BTree package
(ODBSBTree, ODBSTSTree, ODBSTreeSet), that nicely work together with
OmnIBase.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: OnniBase BTree question

BrunoBB
In reply to this post by Dmitry Dorofeev
Dmitry Dorofeev escribió

You can also do:

   t := self transaction. "returns current OmniBase transaction"
   tree := t root at: 'sessions'.
   b := BMShopBasket new.
   tree at: v put: b.
   t checkpoint.

If you use anODBBTreeDictionary there's NO need to lock the entire tree
and you do not have to send #markDirty.
And #at:put: it will do the makePersistent for you.

Regards Bruno
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: OnniBase BTree question

Günther Schmidt
In reply to this post by Lukas Renggli
Hi Lukas,

I'm just trying to file in the package, or parts of it, into Dolphin.
I *think* I'll manage that part, put I wonder if you've documented
somewhere how to use the package?

Günther

Lukas Renggli schrieb:

>> I am using BTree to store session qookies with OmniBase.
>> The code is like this:
>
> Have a look at the package OmniSupport in SqueakSource. There are
> subclasses for all the data-structures in the BTree package
> (ODBSBTree, ODBSTSTree, ODBSTreeSet), that nicely work together with
> OmnIBase.
>
> Cheers,
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside