none
Need a check that a event occured in the past

    Question

  • Hello,

    Say I have a class MyChildEvent

    {

    string ParentName;

    string childName;

    int state; // state =1 means active, state =2 means not active

    }

    MyParentEvent

    {

    string ParentName;

    int state; // state =1 means active, state =2 means not active

    }

    A function GetChildCount(string) gives me total number of child for a given parent

    Requirement is

    a) If with in say 2 minutes, I get MyChildEvent e (with state =1) for all the children of a given parent , I need to raise a ParentEvent with state =1 (no event is raised if I dont recv MyChildEvent for all the child). I can use GetChildCount(parentName) to compare the number of childevent recvd.

    b) If I have raised a ParentEvent for a given parent, and then I recv a MyChildEvent with state=2 for one of its child, I need to wait for 30 seconds before I change the state of my orignal Parent Event, if during the 30 second period, I recv the corresponding MyChildEvent with state = 1, I dont need to change the state of ParentEvent ( as again I have MyChildEvent for all the children = active)

    All the events I recv are coming from a persistent storage and I can query it , also all the events I raise are stored in the same persistent storage. Lets say I have a method CheckParentEvent(string ParentName) which can tell if the ParentEvent with state=1 is existing or not. But I am afraid, using this data query will slow down things. Can someone suggest a way to handle within reactive extensions itself

    Saturday, September 07, 2013 10:22 PM