If my understanding is correct, let me try to explain how I have done for
my use case.

Let's say you have position1 and position2 regions on server.

- Client is accessing data from position1.
- On end of day you receive a trigger and data will be loaded in position2
region.
- Meanwhile data load is running, client is still accessing data from
position1.

Now as soon as data load on position2 is completed you publish a
'DataLoadCompleted' event into new /event region with attribute as
current=position2.

Let your client register cqlistsner and on this match event you switch to
position2 region in cqlistsner handler.

I am assuming that in your client you already have reference to both client
proxy region or gemfire template.

Example:

GemfireTemplate position1Template
GemfireTemplate position2Template

GemfireTemplate currentTemplate

On cqlistsner event you switch current template to position1 or position2
depending on "current" property explained above.

Thanks,
Dharam

On Wed, Sep 26, 2018, 23:17 Michael Stolz <[email protected]> wrote:

> Then you would have to check that the pointer record is pointing to the
> region you fetched it from. If not, redo the operation on the region it IS
> pointing to.
>
> --
> Mike Stolz
> Principal Engineer, GemFire Product Lead
> Mobile: +1-631-835-4771
>
>
>
> On Wed, Sep 26, 2018 at 1:47 PM Michael Stolz <[email protected]> wrote:
>
>> You could store the pointer record in both regions and make sure to
>> replace the stale region first then the live region. Then you could use
>> getAll( ) including the key of the pointer record as well as the record you
>> want.
>>
>> --
>> Mike Stolz
>> Principal Engineer, GemFire Product Lead
>> Mobile: +1-631-835-4771
>>
>>
>>
>> On Wed, Sep 26, 2018 at 1:43 PM Anilkumar Gingade <[email protected]>
>> wrote:
>>
>>> Currently, there is no option to specify multiple region in a single
>>> API. Application has to handle this.
>>> E.g.: One way by doing get() on position2 first, if not found then on
>>> position1 (it can use functions).
>>> There could be a window where the position2 is getting updated but its
>>> not yet reflected in the region. Depending on use-case requirement (if its
>>> fine to get old data when its getting updated), application has to handle
>>> it.
>>>
>>> -Anil.
>>>
>>>
>>> On Tue, Sep 25, 2018 at 10:40 PM aashish choudhary <
>>> [email protected]> wrote:
>>>
>>>> Use case description:-
>>>>
>>>> We have requirement where in we will have two geode regions let's say
>>>> position1 and position2 now position1 will have positions as of 25
>>>> september after end of the day a data load operation will run which will
>>>> put data to position2 region. At this point while data load is running any
>>>> get request will be served from position1 region because there is a
>>>> possibility of getting stale data. Now the client will have to make a
>>>> switch to position2 region to serve get request with latest data after the
>>>> load gets completed. So is there any way by which a client application
>>>> could make a switch to different region once the data load gets completed .
>>>>
>>>>
>>>> With best regards,
>>>> Ashish
>>>>
>>>

Reply via email to