Announcement Announcement Module
Collapse
No announcement yet.
Write-behind example Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Hi,

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

    Cheers,

    Comment


    • #3
      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

      Comment


      • #4
        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??

        Comment


        • #5
          Great

          I really like to think about your question.


          Tavin

          Comment


          • #6
            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

            Comment


            • #7
              fine

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


              kir

              Comment


              • #8
                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, 04:02 AM.

                Comment

                Working...
                X