Skip to content

The MARC-HI Visualizer is a utility that visualizes a series of RFC3881 (ATNA) messages by interpreting the audit messages and broadcasting events to clients who represent the traffic in XAML diagrams.

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE.md
Unknown
License.rtf
Notifications You must be signed in to change notification settings

MohawkMEDIC/visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MEDIC Visualizer

The MARC-HI Visualizer is a utility that visualizes a series of RFC3881 (ATNA) messages by interpreting the audit messages and broadcasting events to clients who represent the traffic in XAML diagrams.

The architecture of the Visualizer is as follows:

Configuring the Visualizer

Modifying the configuration for the Visualizer Service is quite simple. There are several pieces of configuration information that are needed:

  1. The address/port that the SysLog listening service listens to

  2. The port of the notification broadcast service

  3. Whether or not the CAP service should be enabled (this is only true if Silverlight clients are connecting)

All configuration for the Visualization Service is contained in the MARC.EHRS.VisualizationServer.exe.config file in the installation directory. Using your favorite text editor, open this file.

Configuring the SysLog Listener

First, we have to ensure that the visualizationserver configuration sections are registered (or else the configuration reader won't load your configuration). Ensure that the following lines exist in the configuration file:

<section name="marc.ehrs.visualizationserver.syslog" 
type="MARC.EHRS.VisualizationServer.Syslog.Configuration.ConfigurationHandler,
MARC.EHRS.VisualizationServer.Syslog, Version=1.0.0.0"/>
<section name="marc.ehrs.visualizationserver.notifier"
type="MARC.EHRS.VisualizationServer.Notifier.Configuration.ConfigurationHandler,
MARC.EHRS.VisualizationServer.Notifier, Version=1.0.0.0"/>

Next, locate the SysLog configuration and set the listening address and port, by default the Visualization Service will listen on 127.0.0.1 on port 11514. To change this, modify this configuration setting:

 <marc.ehrs.visualizationserver.syslog maxMessageSize="65536"> 
    <binding address="127.0.0.1"
    port="11514"/>
</marc.ehrs.visualizationserver.syslog>

You can add aditional bindings (so the visualizer can listen on different ports/ip addresses as well), and you may optionally specify a forwardAddress and forwardPort which will instruct the visualizer to forward received messages received on the specified port to the appropriate address.

After you've applied these settings, you will need to restart the Visualization Service host. Using the command prompt type the following command:

net stop "Visualization Service"
net start "Visualization Service"

Configuring the Notifier

The notifier is a piece of code that clients connect to in order to receive events. The notifier service is essential for clients to receive the necessary messages to "light up" the visualizer diagrams.

The notifier is configured using the following parameters:

  • port - The port that the notifier will broadcast events on and will use to accept connections

  • enableCAPServer - When set to true, the notifier will serve as a ClientAccessPolicy provider.

  • capServerPolicyFile - Identifies the ClientAccessPolicy file to send to Silverlight clients attempting to establish connections.

The structure of this configuration section is as follows:

<marc.ehrs.visualizationserver.notifier
port="4530"
enableCAPServer="true"
capServerPolicyFile="ClientAccessPolicy.xml"/>

Configuring the client

By default the Visualization Client that is distributed with the Visualizer comes with no diagrams or configuration. When you launch the Visualization Client and click on either "Change Diagram" or "Connect" you will be presented with an empty option list (like below)

In order to get the visualizer to load diagrams and connect to a server, you will need to deploy the WEB folder (in the install directory) to a web server. Doing this is outside of the scope of this documentation, I will assume you've deployed it to localhost:8008

Our first task, is to instruct the Visualizer Client to load a configuration file, this is done by editing the default.html file (or the approporiate <object...> tag in your source code).

Make sure the following initparams are specified:

 <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
             <param name="source" value="ClientBin/MARC.EHRS.VisualizationClient.Silverlight.xap"/>
         <param name="initparams" value="config=http://localhost:8080/visualizer.xml" /> ...

Where config= points to the appropriate configuration file. Next, you'll have to ensure that the configuration file exists. Using your favourite text editor, create the file specified in your initparams. Create an empty file that looks like this:

 <configuration xmlns:xaml="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
         </configuration>

This represents an empty configuration file that the visualization client will read. Next, we need to register diagrams with the configuration file. To do this, add a diagram element to the configuration section. If you're using the sample XAML file available from the downloads seciton, your config file would look similar to the following:

 <configuration xmlns:xaml="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
            <diagram src="http://localhost:8080/SAMPLE.XAML" name="A Sample Diagram"/>
         </configuration>

If you visit http://localhost:8080/default.html and click "Change Diagram" you will be presented with the contents of your config file. The following example illustrates my demo environment:

If you select the sample diagram your visualizer client should display the empty diagram. Next we need to let the client know what visualization servers are available in the Connect dialog. To do this, add server elements to your diagram. If you're attempting to connect to a local server you can use the following exmaple file:

 <configuration xmlns:xaml="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
            <diagram src="http://localhost:8080/SAMPLE.XAML" name="A Sample Diagram"/>
            <server address="127.0.0.1" port="4530" name="Local Server" imageSrc="http://localhost:8080/sampleServer.png"/>
         </configuration>

The server element contains more attributes than the diagram element. The address attribute instructs the client the IP address or host name that is running the visualization service. The port attribute specifies the port that notifications are broadcast on. The imageSrc is a graphical representation of the server. If you have a logo (or many different servers) this can help the user distinguish between them

Finally, you can specify some data inside of the "about" dialog by simply using XAML markup within the root element. For example, if I wanted a paragraph that explains my product in the visualizer (for clients to read) you can simply use the following configuration:

 <configuration xmlns:xaml="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
            <diagram src="http://localhost:8080/SAMPLE.XAML" name="A Sample Diagram"/>
            <server address="127.0.0.1" port="4530" name="Local Server" imageSrc="http://localhost:8080/sampleServer.png"/>
            <xaml:Paragraph>
                <xaml:Run>Product A communicates with Product B using IHE PIX/PDQv3, Product A is distributed by</xaml:Run>
                <xaml:Hyperlink NavigateUri="http://www.mohawkcollege.ca">Mohawk College</xaml:Hyperlink>
           </xaml:Paragraph>
        </configuration>

Configuring a client access policy file

By default, Silverlight applications will not be able to connect to the Visualization Service unless an appropriate ClientAccessPolicy file is served to them. Whenever the Silverlight application attempts to connect to a Visualization Service instance, the Silverlight framework will attempt to download a Client Access Policy file from port 943 of the server (for example, if the client is connecting to 127.0.0.1:4530 then Silverlight will attempt to download a client access policy file from 127.0.0.1:943)

The client access policy file dictates which Silverlight clients are allowed to connect to the visualization service. The default ClientAccessPolicy.xml file included with the Visualization Service allows all TCP connections to port 4530 for any client. You can modify this file to restrict access to clients.

About

The MARC-HI Visualizer is a utility that visualizes a series of RFC3881 (ATNA) messages by interpreting the audit messages and broadcasting events to clients who represent the traffic in XAML diagrams.

Topics

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE.md
Unknown
License.rtf

Stars

Watchers

Forks

Packages

No packages published