10 Replies Latest reply on Dec 11, 2012 9:44 AM by Ashutosh Singh

    Issue while polling in clustered environment.

    958367
      Hi All,

      I am using a polling adapter which polls records from two database tables. I have set Database rows per transaction as 10 and polling interval as 30 secs. Our servers are running in clustered mode.
      The issue is that, when the rows are picked by node 1 , without waiting for the polling interval node 2 picks up the next set of rows from database.
      As per our requirement, rows should be polled according to the value of Database rows per transaction size. Then adapter should wait for the polling interval and then pick up the next set of rows (in the clustered environment only). Can it be achieved using custom SQL or some java code. If anyone has tried it please help me.

      Thanks in advance.
        • 1. Re: Issue while polling in clustered environment.
          Albin
          The issue may be related to the details specified in the below blog.

          http://www.albinsblog.com/2012/10/db-adapter-message-throttling-in-oracle.html#.UMCFM6ycaS0


          Regards
          Albin I
          http://www.albinsblog.com
          • 2. Re: Issue while polling in clustered environment.
            958367
            Hi Albin,

            Thanks for your reply.

            I am able to throttle the number of records. But when server is running in clustered mode, both the nodes independent of each other, are polling the records. Due to which if node 1 takes limited records then within no time other node picks up the next set of rows. My requirement is that while node 1 is processing the records, node 2 should wait for the polling interval to finish.
            • 3. Re: Issue while polling in clustered environment.
              Albin
              The number of records processed in a clustered environment is


              The maximum rows processed per second are:

              Number of active nodes in SOA cluster x NumberOfThreads x RowsPerPollingInterval / PollingInterval

              You have to adjust RowsPerPollingInterval value accordingly to limit the records in clustered environment(considering all the nodes in a cluster).



              Regards
              Albin I
              http://www.albinsblog.com
              • 4. Re: Issue while polling in clustered environment.
                Ashutosh Singh
                Try to use singleton property of the database adapter.

                <binding.jca config="DbAdapterJCAFileName.jca">
                <property name="singleton" type="xs:boolean" many="false" override="may">true</property>
                </binding.jca>

                Hopefully it should resolve your problem.

                Thanks,
                Ashu
                • 5. Re: Issue while polling in clustered environment.
                  958367
                  Hi Ashu,

                  Thanks for ur reply.

                  I tried this property. I have set a polling interval of 20 secs in my process. In the console instances are something like:
                  node1 picked rows then
                  after 5 secs node2 picked next set of rows,
                  after 16 secs node1 picked next set of rows,
                  after 5 secs node2 picked next set of rows,
                  after 16 secs node1 picked next set of rows,
                  after 5 secs gain node 2 picking next set of rows....likewise

                  after node 1 picks data it should wait for 20 secs and then node 2 should pick up next set.
                  • 6. Re: Issue while polling in clustered environment.
                    veejai24
                    Have you checked with the check box "Distributed Polling", while you configured your adapter ?

                    Note: For load balancing purposes, it is dangerous to set the MaxTransactionSize too low in a distributed environment (where it becomes a speed limit). It is best to set the MaxTransactionSize close to the per CPU throughput of the entire business process. This way, load balancing occurs only when you need it.

                    Thanks,
                    Vijay
                    • 7. Re: Issue while polling in clustered environment.
                      958367
                      Yes Vijay, I have selected Distributed polling.
                      • 8. Re: Issue while polling in clustered environment.
                        Ashutosh Singh
                        See this is misconception that both nodes picks the data in turn one by one.
                        It totally depends on the availability of the nodes. This is how a typical active active cluster should behave.

                        Both nodes will show similar set of instances as they are pointing to same soa_infra schema.
                        We can not differentiate by checking EM that which node actually processed a particular instances.

                        I would like to know how are you sure that both nodes are picking file one by one without waiting other one to complete its job.
                        I have experience with Active active cluster with uses of DB Adapter in many scenarios. But I never observed this behavior.

                        Probably by understanding your applications architecture, answer to your problem can be found.

                        Thanks,
                        Ashu
                        • 9. Re: Issue while polling in clustered environment.
                          958367
                          Hi Ashu,

                          I am working on SOA 10g. And we find out the nodes by using hostname function through Java Embedding. We are setting this hostname in the title of the BPEL Instance. So by observing the hostname we came to know this behaviour that database rows are alternately picked by each server node.
                          • 10. Re: Issue while polling in clustered environment.
                            Ashutosh Singh
                            Please tell me what polling strategy you are using ?