private void btnStart_Click(object sender, EventArgs e) { m_Server = new GraphSystemService(null); var cfg = @" service { name=GraphNodeSvc type='Agni.Social.Graph.Server.GraphSystemService, Agni.Social' graph-host { type='WinFormsTest.Social.TestGraphHost, WinFormsTest' } graph-comment-fetch-strategy { type=' Agni.Social.Graph.Server.GraphCommentFetchDefaultStrategy, Agni.Social' } } ".AsLaconicConfig(handling: ConvertErrorHandling.Throw); m_ServerTodo = new TodoQueueService(); var cfg1 = @" service { name=socialgraphtodoqueue startup-delay-sec = 1 queue { name='esub-manage' mode=ParallelByKey} queue { name='esub-deliver' mode=ParallelByKey} queue { name='esub-remove' mode=ParallelByKey} queue { name='esub-manage' mode=ParallelByKey} queue-store { type='Agni.Workers.Server.Queue.MongoTodoQueueStore, Agni.MongoDB' mongo='mongo{server=\'localhost:27017\' db=\'social-tezt\'}' fetch-by=4000 } } ".AsLaconicConfig(handling: ConvertErrorHandling.Throw); m_ServerTodo.Configure(cfg1); m_ServerTodo.Start(); m_Server.Configure(cfg); m_Server.Start(); m_NodeClient = new GraphNodeSystemClient("async://localhost:{0}".Args(App.ConfigRoot.Navigate("/gv/services/$async-graphnode").Value)); m_EventClient = new GraphEventSystemClient("async://localhost:{0}".Args(App.ConfigRoot.Navigate("/gv/services/$async-graphevent").Value)); m_CommentClient = new GraphCommentSystemClient("async://localhost:{0}".Args(App.ConfigRoot.Navigate("/gv/services/$async-graphcomment").Value)); }
private void btnServerStart_Click(object sender, EventArgs e) { m_Server = new TodoQueueService(); var cfg = @" srv { startup-delay-sec = 1 queue { name='tezt' batch-size=1024 mode=Parallel} queue { name='email' batch-size=1024 mode=Parallel} queue-store { type='Agni.Workers.Server.Queue.MongoTodoQueueStore, Agni.MongoDB' mongo='mongo{server=\'localhost:27017\' db=\'queue-tezt\'}' fetch-by=4000 } }".AsLaconicConfig(handling: ConvertErrorHandling.Throw); m_Server.Configure(cfg); m_Server.Start(); }