2 Replies Latest reply on Mar 7, 2014 9:50 PM by Junshik Jeon

    I want to implement  in-memory-data-queue using infinispan

    verystrongjoe Newbie

      thank you very much for replying my question.

      it's very urgent problem for me. if you help me, i will appreciate very much

      so can I ask additional question? I'm not good at english. but i will do my best explaing my situation and goals. it is very long story.


      As far as I know, infinispan is in memory data base.

      but, in my case, I have to implement a queue (first in first out) and guarantee that any data must not lose. If one data lose, the system is very critical.

      I have to know incoming key as soon as one entry come in and call business procss with the key.

      So I had to use two kinds of listener and three jobs for recoevery and trigger business process for keys in FIFO way.

      I couldn't use numOwner as 2. because infinispan can't distinguish original and replicated entry and the listener of nodes where data enter invoke 2 times with same key.

      ( so business process called twice and it's duplicated),.


      Anyway, the listener has two kinds.

      one is attached to the data cache for saving real businiss data(key,value).

      the data cache is set invalidation mode and no replica and then, passivation is false. shared is true. and share one jdbc cache store.

      the other is attached to recovery info cache for saving (key, nodename).

      ( when one node is failed, I have to rebalancing datas of dead node with this info cache to new-member nodes in view change event )



      and each listener has a job like below.

      Fisrt, I attached listener of data cache for catching incoming keys,

      Second, I have to know which node received data and (DataKey, NodeName) data have save to replicated cache.

      and I have to trigger business process,  call get() to imdg( in memeory data grid ) and then call remove().   it's original process.

      Third, I have to implement viewChanged Event for invoking the job that reblance datas of failed node to other new-member node.



      I will give more explanation with pictures. please help me 

      but it's very difficult to guarantee tranaction using listener. please give good ideas thanks.