DiscoTect - Dynamically Discovering Software Architectures
DiscoTect is a system that can be used for mapping dynamically observed events in a system to a software architecture. A software architect describes the mapping as a DiscoSTEP specification.
To understand how to write DiscoSTEP programs, you should refer to the this paper
The binary distribution of DiscoTect is available here. It contains:
- scripts to run the DiscoSTEP compiler and runtime support * necessary jar file used as libraries (includes some third party binaries)
Installing DiscoTect
Configure J2EE Server
DiscoTect requires a J2EE implementation for publishing and receiving messages to JMS topics. In your J2EE installation, you need to define the right topics. You need two topics: DiscoTectSystem and AcmeStudioRemote. To do this for JBOSS (4.0.2) you need to edit the file '/server/defaul/deploy/jms/jbossmq-destinations-service.xml':
<!-- Beginning of Change For DiscoTect -->
<mbean code="org.jboss.mq.server.jmx.Topic"
name="jboss.mq.destination:service=Topic,name=DiscoTectSystem">
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
<attribute name="SecurityConf">
<security>
<role name="guest" read="true" write="true"/>
<role name="publisher" read="true" write="true" create="false"/>
<role name="durpublisher" read="true" write="true" create="true"/>
</security>
</attribute>
</mbean>
<mbean code="org.jboss.mq.server.jmx.Topic"
name="jboss.mq.destination:service=Topic,name=AcmeStudioRemote">
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
<attribute name="SecurityConf">
<security>
<role name="guest" read="true" write="true"/>
<role name="publisher" read="true" write="true" create="false"/>
<role name="durpublisher" read="true" write="true" create="true"/>
</security>
</attribute>
</mbean>
<!-- End of Change of DiscoTect -->
To do this with OC4J (deprecated) you need to edit the jms.xml file (before the </jms-server> end tag):
<!-- DiscoTect queues -->
<topic-connection-factory name="DiscoTectTopicConnectionFactory"
location="jms/DiscoTectTopicConnectionFactory"/>
<topic name="DiscoTect System Level" location="jms/DiscoTectSystem"/>
<topic-connection-factory name="AcmeStudioRemoteTopicConnectionFactory"
location="jms/AcmeStudioRemoteTopicConnectionFactory"/>
<topic name="AcmeStudio Remote Control" location="jms/AcmeStudioRemote"/>
Once you have installed these topics, you should then restart your J2EE server.
Installing and Configuring AcmeStudio
DiscoTect works by reading in events that are published to the DiscoTectSystem topic, and then publishing architectural events to the AcmeStudioRemote topic. This topic is listened to by AcmeStudio to pick up architectural changes. To configure AcmeStudio, you must have installed the AcmeStudioRemote plugin. (It is also helpful to have the auto layout plugin installed, so that you can lay out the diagrams nicely.) Note, this version of DiscoTect only works with the AcmeStudio 2.2 releases, the latest being 2.2.9.
You can download AcmeStudio from http://www.cs.cmu.edu/afs/cs/project/able/ftp/AcmeStudio/AcmeStudio_2.2.8b-Eclipse31-win32.zip . The plugins that you will need are here.
Installing DiscoTect
The DiscoTect 0.0.6 binary distribution is available here
Unzip this file into a directory. Inside that directory you will find a bunch of JAR files, and a two shell scripts (dsc.sh and dsr.sh). dsc.sh is the DiscoSTEP compiler, which takes in mappings specified in an .epp file. It produces .epo files. Usage is dsc.sh <file>.epp.
The DiscoTect runtime is started by running dsr.sh <file>.epo.
Those interested in the source distribution can find it here. Instructions on compiling in Eclipse may be forthcoming.
Note that in the current release there is a hardwired path. To work around this problem, change the line in dsr.sh that invokes discotect to include:
java ... -DJMSXMLEventLog=myfile ...
Examples
- PipeFilter Example. An example that contains source code, DiscoSTEP mapping specification, and ApsectJ instrumentation, as an Eclipse project, is available here