Confused: clustering in GS Prog manual

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

Confused: clustering in GS Prog manual

Johan Brichau-2
Hi,

I am confused about two, seemingly contradicting, paragraphs in the Gemstone programming manual concerning clustering buckets.

On p. 291, I read:

> Once an object has been clustered into a particular bucket and committed, that bucket remains associated with the object until you specify otherwise. When the object is modified, it continues to cluster with the other objects in the same bucket, although it might move to another page within the same bucket.

But, on p. 299, I read:

> Once you have clustered certain objects, they do not necessarily stay that way forever. You may therefore wish to check an object’s location, especially if you suspect that such declustering is causing your application to run more slowly than it used to.

I understand from the first paragraph that the object remains 'tied' to its cluster bucket and will remain clustered in that bucket. But the second paragraph says that objects do not necessarily stay that way.

What am I reading wrong? ;-)

Johan
Reply | Threaded
Open this post in threaded view
|

Re: Confused: clustering in GS Prog manual

James Foster-8
Johan,

Good question. The key is that a bucket will span multiple pages and you get performance from having objects on the same page. If I cluster a customer into bucket A then it is likely that all the referenced objects will be moved to the same page (say A1). If I edit the customer's address Then the customer object will get put on a new page in the same bucket (say A2) but the phone will not move.  So it is good to go back later (off hours) and re-cluster so everything is together (say A3).

James

On Feb 26, 2012, at 10:00 AM, Johan Brichau <[hidden email]> wrote:

> Hi,
>
> I am confused about two, seemingly contradicting, paragraphs in the Gemstone programming manual concerning clustering buckets.
>
> On p. 291, I read:
>
>> Once an object has been clustered into a particular bucket and committed, that bucket remains associated with the object until you specify otherwise. When the object is modified, it continues to cluster with the other objects in the same bucket, although it might move to another page within the same bucket.
>
> But, on p. 299, I read:
>
>> Once you have clustered certain objects, they do not necessarily stay that way forever. You may therefore wish to check an object’s location, especially if you suspect that such declustering is causing your application to run more slowly than it used to.
>
> I understand from the first paragraph that the object remains 'tied' to its cluster bucket and will remain clustered in that bucket. But the second paragraph says that objects do not necessarily stay that way.
>
> What am I reading wrong? ;-)
>
> Johan
Reply | Threaded
Open this post in threaded view
|

Re: Confused: clustering in GS Prog manual

Johan Brichau-2
Hi James,

Thanks for the clarification.
Just to make sure I understand this correctly:

"going back and re-cluster" can use the same bucket with which the objects were clustered originally? The reason I ask is that I'm keeping a set of ClusterBucket instances to group objects together. So re-clustering can send #clusterInBucket to the same objects with the same ClusterBucket instance?

thanks
Johan

On 26 Feb 2012, at 19:48, James Foster wrote:

> Johan,
>
> Good question. The key is that a bucket will span multiple pages and you get performance from having objects on the same page. If I cluster a customer into bucket A then it is likely that all the referenced objects will be moved to the same page (say A1). If I edit the customer's address Then the customer object will get put on a new page in the same bucket (say A2) but the phone will not move.  So it is good to go back later (off hours) and re-cluster so everything is together (say A3).
>
> James
>
> On Feb 26, 2012, at 10:00 AM, Johan Brichau <[hidden email]> wrote:
>
>> Hi,
>>
>> I am confused about two, seemingly contradicting, paragraphs in the Gemstone programming manual concerning clustering buckets.
>>
>> On p. 291, I read:
>>
>>> Once an object has been clustered into a particular bucket and committed, that bucket remains associated with the object until you specify otherwise. When the object is modified, it continues to cluster with the other objects in the same bucket, although it might move to another page within the same bucket.
>>
>> But, on p. 299, I read:
>>
>>> Once you have clustered certain objects, they do not necessarily stay that way forever. You may therefore wish to check an object’s location, especially if you suspect that such declustering is causing your application to run more slowly than it used to.
>>
>> I understand from the first paragraph that the object remains 'tied' to its cluster bucket and will remain clustered in that bucket. But the second paragraph says that objects do not necessarily stay that way.
>>
>> What am I reading wrong? ;-)
>>
>> Johan

Reply | Threaded
Open this post in threaded view
|

Re: Confused: clustering in GS Prog manual

James Foster-8
Yes, the same "bucket" can be used repeatedly. It is simply a way to designate objects that are related.

On Feb 27, 2012, at 1:00 PM, Johan Brichau wrote:

> Hi James,
>
> Thanks for the clarification.
> Just to make sure I understand this correctly:
>
> "going back and re-cluster" can use the same bucket with which the objects were clustered originally? The reason I ask is that I'm keeping a set of ClusterBucket instances to group objects together. So re-clustering can send #clusterInBucket to the same objects with the same ClusterBucket instance?
>
> thanks
> Johan
>
> On 26 Feb 2012, at 19:48, James Foster wrote:
>
>> Johan,
>>
>> Good question. The key is that a bucket will span multiple pages and you get performance from having objects on the same page. If I cluster a customer into bucket A then it is likely that all the referenced objects will be moved to the same page (say A1). If I edit the customer's address Then the customer object will get put on a new page in the same bucket (say A2) but the phone will not move.  So it is good to go back later (off hours) and re-cluster so everything is together (say A3).
>>
>> James
>>
>> On Feb 26, 2012, at 10:00 AM, Johan Brichau <[hidden email]> wrote:
>>
>>> Hi,
>>>
>>> I am confused about two, seemingly contradicting, paragraphs in the Gemstone programming manual concerning clustering buckets.
>>>
>>> On p. 291, I read:
>>>
>>>> Once an object has been clustered into a particular bucket and committed, that bucket remains associated with the object until you specify otherwise. When the object is modified, it continues to cluster with the other objects in the same bucket, although it might move to another page within the same bucket.
>>>
>>> But, on p. 299, I read:
>>>
>>>> Once you have clustered certain objects, they do not necessarily stay that way forever. You may therefore wish to check an object’s location, especially if you suspect that such declustering is causing your application to run more slowly than it used to.
>>>
>>> I understand from the first paragraph that the object remains 'tied' to its cluster bucket and will remain clustered in that bucket. But the second paragraph says that objects do not necessarily stay that way.
>>>
>>> What am I reading wrong? ;-)
>>>
>>> Johan
>