Results 1 to 8 of 8

Thread: Write-behind example

  1. #1
    Join Date
    Dec 2004
    Location
    St. Gallen, Switzerland
    Posts
    69

    Default Write-behind example

    Hi all,

    We are currently experimenting with spring gemfire and are looking for an example with write-behind functionality. Loader and writer we have successfully tested but not the write-behind (gateway)... is there an example of what to implement and how to configure it within a spring-context?

    thanks,
    Sandro

  2. #2
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    Hi,

    No, not currently. Have you looked at the GemFire docs? Is there anything Spring specific that you're interested in?

    Cheers,
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  3. #3
    Join Date
    Dec 2004
    Location
    St. Gallen, Switzerland
    Posts
    69

    Default

    Hi Costin,

    Well yes... as stated in the first post for me it's not clear how to configure such a component within the spring context. For cache regions there is a spring factory bean where you can configure cacheWriter, cacheLoader, etc. but no component for write-behind... so my question is:

    Is it possible to manage such components within the spring context (how?) or not? I didn't find any factory for setting up a gateway hub for example... If so is there a spring-specific class to extend like WiringDeclarableSupport?

    There is an example of how to do it in gemfire (http://community.gemstone.com/displa...d+read-through).

    Thanks and kind regards,
    Sandro

  4. #4

    Default GemFire_Spring

    How can cache-listener be used for delayed-write or write-behind??
    Sending a message to write and not waiting for an acknowledgement.

    GemFire supports three types of replication: no ack, ack and ack with locks.
    combining some features in the configuration??

  5. #5
    Join Date
    Mar 2011
    Posts
    5

    Default Great

    I really like to think about your question.


    Tavin

  6. #6
    Join Date
    Apr 2011
    Posts
    5

    Default Thinking In Deep

    Loader and writer has successfully tested but not the write-behind. It is not easy to solve. I hope to get a solution.





    Any

  7. #7
    Join Date
    Apr 2011
    Posts
    1

    Default fine

    I also want more specific to know about "Write-behind example" in deep.


    kir

  8. #8

    Default Write-behind Example

    To implement a write-behind cache listener. First step is configure gateway hub with no incoming port specification and gateway with no endpoint. Inside gateway you define gateway listener which will be used for write-behind functionality. Events for this listener are queued and delivered in batched List to this listener processEvent method. Second step is to enable gateway queueing for the regions whose events you want to handle:

    Your XML configuration should looks like this:
    Code:
    <cache>
      <gateway-hub id="DB">
        <gateway id="DB">
          <gateway-listener>
            <class-name>MyGatewayListener</class-name>
          </gateway-listener>
          <gateway-queue ... />
        </gateway>
      </gateway-hub>
      ...
      <region name="data">
        <region-attributes enable-gateway="true"/>
      </region>
      ...
    </cache>
    I hope it's help you.

    --
    Kiril Menshikov
    Data Grid Architect at Mirantis
    Last edited by kiril; May 27th, 2011 at 04:02 AM.
    Kiril Menshikov
    Data Grid Architect at Mirantis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •