diff options
author | coreyg <coreyg@13f79535-47bb-0310-9956-ffa450edef68> | 2014-11-21 09:30:19 +0000 |
---|---|---|
committer | coreyg <coreyg@13f79535-47bb-0310-9956-ffa450edef68> | 2014-11-21 09:30:19 +0000 |
commit | 200a40b332420f94992eb39a6d0ea1cf1490ffc4 (patch) | |
tree | 1c76ef1d254c7bfc91128a313d319bd60da9d01e /site/trunk/site-publish/federation-notes.html | |
parent | 85f53ab6ab4f664d63774c94b672a875c9e52b8a (diff) |
Adding tuscany's website to their svn repo for svnpubsub
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1640879 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'site/trunk/site-publish/federation-notes.html')
-rw-r--r-- | site/trunk/site-publish/federation-notes.html | 267 |
1 files changed, 267 insertions, 0 deletions
diff --git a/site/trunk/site-publish/federation-notes.html b/site/trunk/site-publish/federation-notes.html new file mode 100644 index 0000000000..2facc1f947 --- /dev/null +++ b/site/trunk/site-publish/federation-notes.html @@ -0,0 +1,267 @@ + +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE- 2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + + +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<HTML> + <HEAD> + <!-- generateKeywords macro --> + <META name="description" content="Apache Tuscany"> + <META name="keywords" content="apache, apache tuscany, tuscany, service, services, fabric, soa, service oriented architecture, sca, service component architecture, das, sdo, csa, ruby, opensource"> + <!-- generateKeywords macro end --> + + <LINK type="text/css" rel="stylesheet" href="http://tuscany.apache.org/stylesheets/default.css"> + <LINK rel="SHORTCUT ICON" href="https://cwiki.apache.org/confluence/display/TUSCANY/$images/favicon.ico"> + <TITLE>Apache Tuscany : Federation Notes</TITLE> + <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD> + + <BODY onload="init()"> + <!-- topNav macro --> + <TABLE valign="top" border="0" cellspacing="0" cellpadding="0" width="100%" background="http://tuscany.apache.org/images/TuscanyLogoNEW_Text_120px_bg.jpg"> + <TR> + <TD valing="top" align="left"> + <A href="https://cwiki.apache.org/confluence/pages/viewpage.action?spaceKey=TUSCANY&title=$siteroot"><IMG src="http://tuscany.apache.org/images/TuscanyLogoNEW_Text_120px_bg.jpg" height="91" width="25" border="0"></A> + </TD> + <TD> + <A href="http://tuscany.apache.org/"><IMG src="http://tuscany.apache.org/images/TuscanyLogo.jpg" border="0"></A> + </TD> + + <TD width="100%"> + + </TD> + + <!-- Adds the edit page link to the top banner--> + <TD valign="bottom"> + <DIV style="padding: 2px 10px; margin: 0px;"> + <A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=49982"> + <IMG src="http://tuscany.apache.org/images/notep_16.gif" height="16" width="16" border="0" align="absmiddle" title="Edit Page"></A> + </DIV> + </TD> + + </TR> + </TABLE> + <!-- topNav macro end --> + + <!-- breadCrumbs macro --> + <TABLE border="0" cellpadding="2" cellspacing="0" width="100%"> + <TR class="topBar"> + <TD align="left" valign="middle" class="topBarDiv" nowrap="true" width="100%"> + <A href="home.html" title="Apache Tuscany">Apache Tuscany</A> > <A href="home.html" title="Home">Home</A> > <A href="sca-overview.html" title="SCA Overview">SCA Overview</A> > <A href="sca-java.html" title="SCA Java">SCA Java</A> > <A href="sca-java-work-in-progress.html" title="SCA Java Work-In-Progress">SCA Java Work-In-Progress</A> > <A href="" title="Federation Notes">Federation Notes</A> + </TD> + + <TD align="right" valign="middle" class="topBarDiv" align="left" nowrap="true"> + <A href="http://mail-archives.apache.org/mod_mbox/tuscany-user">User List</A> | <A href="http://mail-archives.apache.org/mod_mbox/tuscany-dev">Dev List</A> | <A href="http://issues.apache.org/jira/browse/Tuscany">Issue Tracker</A> + </TD> + </TR> + </TABLE> + <!-- breadCrumbs macro end --> + + + <TABLE border="0" cellpadding="0" width="100%" bgcolor="#FFFFFF"> + <TR> + <TD align="left" valign="top"> + + <!-- pageContent macro --> + <DIV id="PageContent"> + + <DIV class="pagecontent"> + <DIV class="wiki-content"> + <P>Pulling together notes on what has been build to support federation in the tunk as it stands (just after TSS demo - March 07)</P> + +<H2><A name="FederationNotes-References"></A>References</H2> + +<P>Raymond's architecture guide <A href="http://cwiki.apache.org/confluence/display/TUSCANY/Tuscany%20Architecture%20Guide" class="external-link" rel="nofollow">http://cwiki.apache.org/confluence/display/TUSCANY/Tuscany+Architecture+Guide</A><BR> +Some discussions from the dev list about contributio, discovery, federation and the TSS demo:</P> +<UL> + <LI>First talk of contribution and assembly service <A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3CE38CFB43-CEB5-456F-BDDD-C25BFFC3C238@apache.org%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3cE38CFB43-CEB5-456F-BDDD-C25BFFC3C238@apache.org%3e</A></LI> + <LI>Mangament service intro <A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3CBAY105-F38054BAB691DCF4F15BA77DDB80@phx.gbl%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3cBAY105-F38054BAB691DCF4F15BA77DDB80@phx.gbl%3e</A></LI> + <LI>First talk of distributed/federated assemblies <A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3C90B6915C-ED14-484A-873F-F26894C63DB2@apache.org%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3c90B6915C-ED14-484A-873F-F26894C63DB2@apache.org%3e</A></LI> + <LI>Resolve and verify phases of deployment <A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3C2F2C595B-CCDA-4AB0-8BF9-A20CB4012F88@apache.org%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3c2F2C595B-CCDA-4AB0-8BF9-A20CB4012F88@apache.org%3e</A></LI> + <LI>JMX and standalone runtime <A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/raw/%3C53EC6802E2BF4643BBD5BC34D2C3A38301B6C3F2@SPR3V4.office.local%3E/" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/raw/%3c53EC6802E2BF4643BBD5BC34D2C3A38301B6C3F2@SPR3V4.office.local%3e/</A><BR> +<A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/raw/%3CBAY105-F20D5A6A881D4A9A3ED3D45DDBD0@phx.gbl%3E/" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/raw/%3cBAY105-F20D5A6A881D4A9A3ED3D45DDBD0@phx.gbl%3e/</A></LI> + <LI>Federated deployment<BR> +<A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3CE6925252-9922-4A65-8867-2B0E2B2BFA67@apache.org%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3cE6925252-9922-4A65-8867-2B0E2B2BFA67@apache.org%3e</A><BR> +<A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3CBAY105-F33CE29B9024EDBB20FCA09DDA70@phx.gbl%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3cBAY105-F33CE29B9024EDBB20FCA09DDA70@phx.gbl%3e</A><BR> +<A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200702.mbox/%3C53EC6802E2BF4643BBD5BC34D2C3A38301E41C94@SPR3V4.office.local%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200702.mbox/%3c53EC6802E2BF4643BBD5BC34D2C3A38301E41C94@SPR3V4.office.local%3e</A></LI> + <LI>Federation demo startup<BR> +<A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200703.mbox/%3CBAY105-F14D60CFBA31DA296B772EADD770@phx.gbl%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200703.mbox/%3cBAY105-F14D60CFBA31DA296B772EADD770@phx.gbl%3e</A></LI> + <LI>Meeraj code description<BR> +<A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200703.mbox/%3CBAY105-F7123B0C05FE260B65B8D3DD750@phx.gbl%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200703.mbox/%3cBAY105-F7123B0C05FE260B65B8D3DD750@phx.gbl%3e</A></LI> + <LI>Meeraj note on running the demo<BR> +<A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200703.mbox/%3C53EC6802E2BF4643BBD5BC34D2C3A3830279C142@SPR3V4.office.local%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200703.mbox/%3c53EC6802E2BF4643BBD5BC34D2C3A3830279C142@SPR3V4.office.local%3e</A></LI> +</UL> + + +<H2><A name="FederationNotes-BuildingTheDemo"></A>Building The Demo</H2> + +<H3><A name="FederationNotes-FromTheTSSTag"></A>From The TSS Tag</H3> + +<P>Follow instructions in README.txt here <A href="http://svn.apache.org/repos/asf/incubator/tuscany/java/distribution/sca/tsss-demo/" class="external-link" rel="nofollow">http://svn.apache.org/repos/asf/incubator/tuscany/java/distribution/sca/tsss-demo/</A><BR> +Unzip the resulting demo zip file<BR> +Meeraj's discussion of switching from JXTA to JSM <A href="http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg15731.html" class="external-link" rel="nofollow">http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg15731.html</A><BR> +I had problems in that some of the required dependency JARs were missing. I copied:</P> +<UL> + <LI>tuscany-jms-discovery-0.1-incubating-SNAPSHOT.jar</LI> + <LI>apache-activemq-4.1.0-incubator.jar</LI> + <LI>tuscany-http-jetty-0.1-incubating-SNAPSHOT.jar</LI> + <LI>jetty-6.1.0.jar</LI> + <LI>jetty-util-6.1.0.jar</LI> + <LI>tuscany-sca-console-0.1-incubating-SNAPSHOT.jar</LI> + <LI>geronimo-j2ee-connector_1.5_spec-1.0.jar</LI> +</UL> + + +<P>into each of the profiles boot directories</P> + +<H3><A name="FederationNotes-ManuallyFromHead"></A>Manually From Head</H3> +<P>I couldn't get this to work as the core tests now fail</P> + +<H2><A name="FederationNotes-DebuggingTheDemo"></A>Debugging The Demo</H2> +<P>When run originally the demo complained about missing dependencies. In particular when reading the system components (root.system) I got the error:</P> + +<P>org.apache.tuscany.host.runtime.InitializationException: org.apache.tuscany.spi.<BR> +component.GroupInitializationException: sca://root.system/main<BR> + at org.apache.tuscany.core.runtime.AbstractRuntime.initialize(AbstractRu<BR> +ntime.java)<BR> + at org.apache.tuscany.standalone.server.TuscanyServer.startRuntime(Tusca<BR> +nyServer.java:134)</P> + +<P>What this actually means is that Tuscany failed to load one of the system components successfully but, by default, doesn't tell what the issue is. I wanted to use Eclipse to debug it so I played about a bit but couldn't get the java -jar command line to come up in the Eclipse debugger. As a fall back I started a remote debugging session. There were three steps to this. </P> + +<P>Add a trap to the code to give me a chance to attach the debugger. I added the following lines to the mainline of the:</P> +<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent"> +<PRE class="code-java"> + <SPAN class="code-object">System</SPAN>.out.println(<SPAN class="code-quote">"press a key"</SPAN>); + java.io.BufferedReader stdin = <SPAN class="code-keyword">new</SPAN> java.io.BufferedReader(<SPAN class="code-keyword">new</SPAN> java.io.InputStreamReader(<SPAN class="code-object">System</SPAN>.in)); + <SPAN class="code-object">String</SPAN> line = stdin.readLine(); +</PRE> +</DIV></DIV> + +<P>Start java app with remote debugging enabled. There are plenty of references on the web on how to do this. Here is the comman line I used to start the master profile.</P> +<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent"> +<PRE class="code-java"> +java -Xrunjdwp:server=y,transport=dt_socket,address=4142,suspend=n -Dtuscany.adminPort=2000 -jar server.start.jar ma +ster +</PRE> +</DIV></DIV> + +<P>When the app comes up and stops at the trap connect the Eclipse debugger by selecting the remote debugging profile and specifying localhost:4142 as the connection details. The port number (4142) just comes from that specified on the application command line. </P> + +<H2><A name="FederationNotes-TurningLoggingOn"></A>Turning Logging On</H2> +<P>Its not clear how to do this just yet. Meeraj suggests that the missing nested exception detail can be printed out by specifying a log formatter. TODO.</P> + +<H2><A name="FederationNotes-RunningTheDemo"></A>Running The Demo</H2> + +<P>(From Meeraj's post on the subject)<BR> +This is how you start the servers (Please make sure you start ActiveMQ<BR> +before you start the servers) .</P> + +<P>Master: java -Dtuscany.adminPort=2000 -jar server.start.jar master<BR> +Slave1: java -Dtuscany.adminPort=3000 -jar server.start.jar slave1<BR> +Slave2: java -Dtuscany.adminPort=4000 -jar server.start.jar slave2</P> + +<P>You can access the admin console from <A href="http://localhost:7000/scdlForm" class="external-link" rel="nofollow">http://localhost:7000/scdlForm</A> and<BR> +if you target the deployed SCDL to slave1, access the demo appilcation<BR> +from <A href="http://localhsot:8000/calculatorForm" class="external-link" rel="nofollow">http://localhsot:8000/calculatorForm</A>. The test scdl is as follows<BR> +(this is what you submit from the admin console to target a deployment<BR> +to a slave),</P> + +<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent"> +<PRE class="code-xml"> +<composite xmlns=<SPAN class="code-quote">"http://www.osoa.org/xmlns/sca/1.0"</SPAN> + <SPAN class="code-keyword">xmlns:tuscany</SPAN>=<SPAN class="code-quote">"http://tuscany.apache.org/xmlns/sca/2.0-alpha"</SPAN> + name=<SPAN class="code-quote">"CalculatorComposite"</SPAN>> + + <SPAN class="code-tag"><component runtimeId=<SPAN class="code-quote">"slave1"</SPAN> name=<SPAN class="code-quote">"CalculatorServiceComponent"</SPAN>></SPAN> + <SPAN class="code-tag"><implementation.java class=<SPAN class="code-quote">"calculator.CalculatorServiceImpl"</SPAN>/></SPAN> + <SPAN class="code-tag"><reference name=<SPAN class="code-quote">"addService"</SPAN> target=<SPAN class="code-quote">"AddServiceComponent"</SPAN>/></SPAN> + <reference name=<SPAN class="code-quote">"subtractService"</SPAN> +target=<SPAN class="code-quote">"SubtractServiceComponent"</SPAN>/> + <reference name=<SPAN class="code-quote">"multiplyService"</SPAN> +target=<SPAN class="code-quote">"MultiplyServiceComponent"</SPAN>/> + <reference name=<SPAN class="code-quote">"divideService"</SPAN> +target=<SPAN class="code-quote">"DivideServiceComponent"</SPAN>/> + <SPAN class="code-tag"></component></SPAN> + + <SPAN class="code-tag"><component runtimeId=<SPAN class="code-quote">"slave1"</SPAN> name=<SPAN class="code-quote">"AddServiceComponent"</SPAN>></SPAN> + <SPAN class="code-tag"><implementation.java class=<SPAN class="code-quote">"calculator.AddServiceImpl"</SPAN>/></SPAN> + <SPAN class="code-tag"></component></SPAN> + + <SPAN class="code-tag"><component runtimeId=<SPAN class="code-quote">"slave1"</SPAN> name=<SPAN class="code-quote">"SubtractServiceComponent"</SPAN>></SPAN> + <SPAN class="code-tag"><implementation.java class=<SPAN class="code-quote">"calculator.SubtractServiceImpl"</SPAN>/></SPAN> + <SPAN class="code-tag"></component></SPAN> + + <SPAN class="code-tag"><component runtimeId=<SPAN class="code-quote">"slave1"</SPAN> name=<SPAN class="code-quote">"MultiplyServiceComponent"</SPAN>></SPAN> + <SPAN class="code-tag"><implementation.java class=<SPAN class="code-quote">"calculator.MultiplyServiceImpl"</SPAN>/></SPAN> + <SPAN class="code-tag"></component></SPAN> + + <SPAN class="code-tag"><component runtimeId=<SPAN class="code-quote">"slave1"</SPAN> name=<SPAN class="code-quote">"DivideServiceComponent"</SPAN>></SPAN> + <SPAN class="code-tag"><implementation.java class=<SPAN class="code-quote">"calculator.DivideServiceImpl"</SPAN>/></SPAN> + <SPAN class="code-tag"></component></SPAN> + +<SPAN class="code-tag"></composite></SPAN> +</PRE> +</DIV></DIV> + +<P>Here is the actual sequence of events:</P> + +<P>Start ActiveMQ</P> + +<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent"> +<PRE class="code-java"> +java -Dtuscany.adminPort=2000 -jar server.start.jar master +java -Dtuscany.adminPort=3000 -jar server.start.jar slave1 +java -Dtuscany.adminPort=4000 -jar server.start.jar slave2 +</PRE> +</DIV></DIV> + +<P>Each of these just reports "Started" on the command line</P> + +<P>Go to <A href="http://localhost:7000/scdlForm" class="external-link" rel="nofollow">http://localhost:7000/scdlForm</A> in a browser and paste in the SCDL from above to configure slave1 to create and wire the calculator components.</P> + +<P>Go to <A href="http://localhsot:8000/calculatorForm" class="external-link" rel="nofollow">http://localhsot:8000/calculatorForm</A> in a browser and see the form that drives the calculator sample. Type in a couple of numbers and press Add.</P> + + + </DIV> + </DIV> + </DIV> + <!-- pageContent macro end --> + + </TD> + </TR> + </TABLE> + + <!-- footer macro --> + <SCRIPT src="http://www.google-analytics.com/urchin.js" type="text/javascript"> + </SCRIPT> + <SCRIPT type="text/javascript"> + _uacct = "UA-1174707-5"; + urchinTracker(); + </SCRIPT> + + <A href="http://www.statcounter.com/" target="_blank"><IMG src="http://c26.statcounter.com/counter.php?sc_project=2619156&java=0&security=94bd7e7d&invisible=0" alt="website stats" border="0"></A> + + <DIV class="footer"> + Copyright � 2003-2012, The Apache Software Foundation </BR> + Apache Tuscany and the Apache Tuscany project logo are trademarks of The Apache Software Foundation. + </DIV> + <!-- footer macro end --> + + </BODY> +</HTML> |