protected virtual void DoUnsubscribe(GDID gRecipientNode, GDID gEmitterNode)
        {
            var todo = Todo.MakeNew <EventUnsubscribeTodo>();

            todo.G_Owner      = gEmitterNode;
            todo.G_Subscriber = gRecipientNode;
            SocialGraphTodos.EnqueueSubscribtion(todo);
        }
        protected virtual void DoSubscribe(GDID gRecipientNode, GDID gEmitterNode, byte[] parameters)
        {
            var emitter = DoGetNode(gEmitterNode);
            var gh      = DoGetNode(gRecipientNode);

            if (!GraphHost.CanBeSubscribed(gh.NodeType, emitter.NodeType))
            {
                throw new GraphException(StringConsts.GS_CAN_NOT_BE_SUSBCRIBED_ERROR.Args(gh.NodeType, emitter.NodeType));
            }
            var todo = Todo.MakeNew <EventSubscribeTodo>();

            todo.G_Owner      = gEmitterNode;
            todo.G_Subscriber = gRecipientNode;
            todo.Subs_Type    = gh.NodeType;
            todo.Parameters   = parameters;
            SocialGraphTodos.EnqueueSubscribtion(todo);
        }
        protected virtual void DoEmitEvent(Event evt)
        {
            DoGetNode(evt.G_EmitterNode); // Don't run todo if Emitter does not exist
            var qryVol   = Queries.CountSubscriberVolumes <DynamicRow>(evt.G_EmitterNode);
            var countVol = ForNode(evt.G_EmitterNode).LoadRow(qryVol)["CNT"].AsInt();
            var count    = countVol < EventDeliveryCohortSize ? countVol : EventDeliveryCohortSize;
            var todos    = new List <EventDeliverTodo>();

            for (int i = 0; i < count; i++)
            {
                var todo = Todo.MakeNew <EventDeliverTodo>();
                todo.Event = evt;
                todo.VolumeWorkerOffset = count;
                todo.VolumeIndex        = i;
                todo.ChunkIndex         = 0;
                todo.G_Volume           = GDID.Zero;
                todos.Add(todo);
            }
            SocialGraphTodos.EnqueueSubscribtion(todos);
        }