Archived
This forum has been archived. Please start a new discussion on GitHub.
How can I dynamicly add the nodes with the demo \IceStorm\replicated?

in Help Center
Hi !
How can I dynamicly add the nodes with the demo Ice-3.4.1-demos\demo\IceStorm\replicated?
Because I always don’t know how many node I should start so I want to add the many node dynamicly!
When I try to add three nodes to the application.xml like this :
<icegrid>
<application name="DemoIceStorm">
<server-template id="IceStorm">
<parameter name="index"/>
<parameter name="topic-manager-endpoints" default="default"/>
<parameter name="publish-endpoints" default="default"/>
<parameter name="node-endpoints" default="default"/>
<parameter name="instance-name"/>
<icebox id="${instance-name}-${index}" exe="icebox" activation="on-demand">
<service name="IceStorm" entry="IceStormService,34:createIceStorm">
<dbenv name="${service}"/>
<adapter name="${service}.TopicManager"
endpoints="${topic-manager-endpoints}"
replica-group="${instance-name}-TopicManagerReplicaGroup"/>
<adapter name="${service}.Publish"
endpoints="${publish-endpoints}"
replica-group="${instance-name}-PublishReplicaGroup"/>
<adapter name="${service}.Node"
endpoints="${node-endpoints}"/>
<properties>
<property name="${service}.InstanceName" value="${instance-name}"/>
<property name="${service}.Trace.TopicManager" value="2"/>
<property name="${service}.Trace.Topic" value="1"/>
<property name="${service}.Trace.Subscriber" value="1"/>
<property name="${service}.Trace.Election" value="1"/>
<property name="${service}.NodeId" value="${index}"/>
<property name="${service}.SQL.DatabaseType" value="QSQLITE"/>
<property name="${service}.SQL.DatabaseName" value="db/${instance-name}-${index}.db"/>
</properties>
</service>
</icebox>
</server-template>
<replica-group id="DemoIceStorm-PublishReplicaGroup">
</replica-group>
<replica-group id="DemoIceStorm-TopicManagerReplicaGroup">
<object identity="DemoIceStorm/TopicManager" type="::IceStorm::TopicManager"/>
</replica-group>
<node name="node1">
<server-instance template="IceStorm" index="1" instance-name="DemoIceStorm"/>
<server-instance template="IceStorm" index="2" instance-name="DemoIceStorm"/>
<server-instance template="IceStorm" index="3" instance-name="DemoIceStorm"/>
</node>
<node name="node2">
<server-instance template="IceStorm" index="4" instance-name="DemoIceStorm"/>
<server-instance template="IceStorm" index="5" instance-name="DemoIceStorm"/>
<server-instance template="IceStorm" index="6" instance-name="DemoIceStorm"/>
</node>
<node name="node3">
<server-instance template="IceStorm" index="7" instance-name="DemoIceStorm"/>
<server-instance template="IceStorm" index="8" instance-name="DemoIceStorm"/>
<server-instance template="IceStorm" index="9" instance-name="DemoIceStorm"/>
</node>
</application>
</icegrid>
Howerver,I find that only when all nodes (node1 node2 node3)work at the same time subscriber.exe receive the data from the publisher.exe and then subscriber.exe also work even if I stop one of nodes. How can I Breaks this kind of limit?
Thank you very much !
Ateng
2011-12-07
How can I dynamicly add the nodes with the demo Ice-3.4.1-demos\demo\IceStorm\replicated?
Because I always don’t know how many node I should start so I want to add the many node dynamicly!
When I try to add three nodes to the application.xml like this :
<icegrid>
<application name="DemoIceStorm">
<server-template id="IceStorm">
<parameter name="index"/>
<parameter name="topic-manager-endpoints" default="default"/>
<parameter name="publish-endpoints" default="default"/>
<parameter name="node-endpoints" default="default"/>
<parameter name="instance-name"/>
<icebox id="${instance-name}-${index}" exe="icebox" activation="on-demand">
<service name="IceStorm" entry="IceStormService,34:createIceStorm">
<dbenv name="${service}"/>
<adapter name="${service}.TopicManager"
endpoints="${topic-manager-endpoints}"
replica-group="${instance-name}-TopicManagerReplicaGroup"/>
<adapter name="${service}.Publish"
endpoints="${publish-endpoints}"
replica-group="${instance-name}-PublishReplicaGroup"/>
<adapter name="${service}.Node"
endpoints="${node-endpoints}"/>
<properties>
<property name="${service}.InstanceName" value="${instance-name}"/>
<property name="${service}.Trace.TopicManager" value="2"/>
<property name="${service}.Trace.Topic" value="1"/>
<property name="${service}.Trace.Subscriber" value="1"/>
<property name="${service}.Trace.Election" value="1"/>
<property name="${service}.NodeId" value="${index}"/>
<property name="${service}.SQL.DatabaseType" value="QSQLITE"/>
<property name="${service}.SQL.DatabaseName" value="db/${instance-name}-${index}.db"/>
</properties>
</service>
</icebox>
</server-template>
<replica-group id="DemoIceStorm-PublishReplicaGroup">
</replica-group>
<replica-group id="DemoIceStorm-TopicManagerReplicaGroup">
<object identity="DemoIceStorm/TopicManager" type="::IceStorm::TopicManager"/>
</replica-group>
<node name="node1">
<server-instance template="IceStorm" index="1" instance-name="DemoIceStorm"/>
<server-instance template="IceStorm" index="2" instance-name="DemoIceStorm"/>
<server-instance template="IceStorm" index="3" instance-name="DemoIceStorm"/>
</node>
<node name="node2">
<server-instance template="IceStorm" index="4" instance-name="DemoIceStorm"/>
<server-instance template="IceStorm" index="5" instance-name="DemoIceStorm"/>
<server-instance template="IceStorm" index="6" instance-name="DemoIceStorm"/>
</node>
<node name="node3">
<server-instance template="IceStorm" index="7" instance-name="DemoIceStorm"/>
<server-instance template="IceStorm" index="8" instance-name="DemoIceStorm"/>
<server-instance template="IceStorm" index="9" instance-name="DemoIceStorm"/>
</node>
</application>
</icegrid>
Howerver,I find that only when all nodes (node1 node2 node3)work at the same time subscriber.exe receive the data from the publisher.exe and then subscriber.exe also work even if I stop one of nodes. How can I Breaks this kind of limit?
Thank you very much !
Ateng
2011-12-07
0
Comments
-
who can give me some help?thank you very much .
who can give me some help?
I am waiting.
thank you very much .
ateng
2011.12.80 -
好像IceStorm不能进行动态节点部署吧,官方文档里说的挺明白的。
曾经问过一个同样的问题 http://www.zeroc.com/forums/help-center/5547-some-questions-about-icestorm-replicas.html#post241650 -
谢谢北京大哥的回复!好像IceStorm不能进行动态节点部署吧,官方文档里说的挺明白的。
曾经问过一个同样的问题 http://www.zeroc.com/forums/help-center/5547-some-questions-about-icestorm-replicas.html#post24165
我尝试把icegrid的replication研究了一下,分析主从的关系,并和icestorm的replicated进行了对比,我试图将二者结合起来!
用icegrid的replication的主从关系,使用icestorm的application.xml,但是很奇怪!icegrid的replication启动管理用的是config.client,而icestorm用的config.grid!
只能死马活马,我霸王硬上弓!启动了icegrid的replication的主节点和从节点之后,运用config.client进行管理: icegridadmin --Ice.Config=config.client
出现:Ice 3.4.1 Copyright 2003-2010 ZeroC, Inc.
我继续:application add 'application.xml'(具体内容见上文)
一切没有什么异常!我窃喜!
将icestorm的订阅和发布程序的配置文件config.sub 和config.pub修改指向所有的节点。
本以为ok了!
执行:subscriber.exe
publisher.exe
等了几分钟都没有任何反应!你说气人不!
我用icegridgui打开一看,发现只有一个节点启动了icestorm,其他的都没有!真的很郁闷!这个问题折腾我一个月了!一直没有得到解决!该怎么办呢?请大哥务必指导小弟一下!你来南京我一定请客!:D
我qq:1510914311 热爱生活
ateng
2011.12.9
辛卯年 庚子月 戊戌日 于南京0 -
“出现:Ice 3.4.1 Copyright 2003-2010 ZeroC, Inc.
我继续:application add 'application.xml'(具体内容见上文)
一切没有什么异常!我窃喜!”
你这段是不是少了启动node的操作,仅仅倒入application.xml只是把配置倒进去了。当然了,你的配置文件如果设置了on-demand,icegrid在发现有请求调用的时候,就会自动启动icebox也就是你的node。这也就是你为什么只有一个node在跑的原因。你可以通过icegrid-gui图形化的来管理你的节点,把所有的node启动起来,看看效果如何。0 -
呵呵,幸会!大哥果然是牛人!
我按照大哥说法,启动了节点,现在已经已经可以让多节点全部运行起来了!
但是,不知道为什么,订阅后发布数据还是没有接收到数据!
而且,节点和复制组也没有反应!
不知道怎么回事!
正常应该是有动态几点同步过程的现实的。。。
这是怎么会说呢?
大哥帮我看看!
加我qq1510914311我可以把我写的所有代码给你看!
谢谢!0 -
再次感谢!问题已经解决。我按照大哥说法,启动了节点,现在已经已经可以让多节点全部运行起来了!
但是,不知道为什么,订阅后发布数据还是没有接收到数据!
而且,节点和复制组也没有反应!
不知道怎么回事!
正常应该是有动态几点同步过程的现实的。。。
这是怎么会说呢?
大哥帮我看看!
加我qq1510914311我可以把我写的所有代码给你看!
谢谢!
thank you very much for your reply ,I have sloved the problem !
再次感谢!问题已经解决。
原来icestorm确实要求节点数量和启动服务器数量相同。
ateng
2011.12.10 19:020 -
不错的应用积累:)
有时间可以多交流交流使用Ice storm的心得。0 -
thank you very much for your reply ,I have sloved the problem !
再次感谢!问题已经解决。
原来icestorm确实要求节点数量和启动服务器数量相同。
ateng
2011.12.10 19:02
终于看到一个说中文的了。
我最近也再学习Ice。在Ice-3.4.2的c++ demo的Icestorm目录中,有一个replicated的例子,我在单台机器上可以跑通,但如果在一台机器上运行icegrid和publisher,一台机器上运行subscriber,那么config.grid,config.pub,config.sub和application又该怎么样配置捏?0