On Mon, Jul 6, 2009 at 7:57 AM, Douglas Leite<[email protected]> wrote: > > > On Mon, Jul 6, 2009 at 11:05 AM, Luciano Resende <[email protected]> > wrote: >> >> On Mon, Jul 6, 2009 at 6:48 AM, Douglas Leite<[email protected]> wrote: >> > Here are some updates from my project, (source code at [1]): >> > >> > 1) A new test scenario was developed: primary-backup with N backups. In >> > this >> > scenario we have a server-client application, with N nodes on the server >> > side. The first node to join on the server side becomes the primary >> > server, >> > and the subsequent ones are the backups. The primary gets a request from >> > a >> > client, and sends a reply to the client and a copy of it state to the >> > backups. When the primary fails, the first backup on the queue becomes >> > the >> > new server. On the other hand, when a backup fails, the primary simply >> > stop >> > to send updates to it. >> > >> > This scenario was implemented using the guardian-model approach. >> >> What is a node here, is this the same concept of a SCA Node ? > > I guess so. Actually, each node is implemented as a component. > > Take a look at: > http://svn.apache.org/repos/asf/tuscany/sandbox/dougsleite/guardian-model/src/main/resources/primaryNbackups.composite > The nodes are implemented as components whose name are "Participant#".
In Tuscany, Node can run one or more composites, that can have multiple components.... > >> >> > >> > 2) A new tag was added to the recovery rules XML file: >> > <affected_participants>. It allows specify in which participants the >> > exception will be raised. For example: >> > >> > <participant match="*.BACKUP"> >> > <throw_exception >> > >> > class="org.apache.tuscany.sca.guardian.itests.primaryBackup.common.PrimaryFailedException" >> > target_context="MAIN"> >> > <affected_participants>FIRST</affected_participants> >> > </throw_exception> >> > </participant> >> > >> > With this rule, only the first backup on the backup queue will have a >> > PrimaryFailedException raised in it's MAIN context. >> > >> >> How is this configuration integrated with SCA and the composite file ? > > At this moment the two files are separated, and there is a reference on the > composite file to the recovery rule XML file. I am using a property tag to > link the two files: > > <component name="GuardianGroup"> > <implementation.java > class="org.apache.tuscany.sca.guardian.GuardianGroupImpl"/> > <property > name="recovery_rules">src/main/resources/recoveryrules_nbackpus.xml</property> > </component> > > I do not know if it is the best design, but as a first design I think it is > good. :) > It looks like we are creating yet another piece of xml, in yet another side file to configure things... How about using intents (e.g requeires="recoveryRules"), and then use a policySet in the definitions.xml to further configure it ? >> >> > >> > Thoughts? >> > >> >> What are your plans to integrate this into the SCA Runtime ? It would >> be really good to continue the design discussions we had earlier and >> advance on the SCA/Tuscany Runtime integration discussion. I wouldn't >> like to see this as a sandbox side project for much more time. >> Any comments here ? -- Luciano Resende Apache Tuscany, Apache PhotArk http://people.apache.org/~lresende http://lresende.blogspot.com/
