Jump to content

Recommended Posts

I'm looking for a Node Map tool to document my applications using my messaging architecture.

I want to write some code that can extract relationships between classes (some being processes and some being messages) and then feed that data into a tool to visualize the relationships in my application.  The end goal would be something like the http://www.visualthesaurus.com/.  Unfortunately, the software behind that tool starts at $5k.  I am hoping to find something a bit less expensive.  Has anyone found a solution they like?

 

thanks,

 

-John

 

 

Share this post


Link to post
Share on other sites

Due to the overwhelming response  :rolleyes: I put together a solution using some free online tools.

 

First, you will need a tool called yEd.  (http://www.yworks.com/en/products_yed_about.html) This is a very nice free tool for generating various graphs and charts.

Next you will need Excel because that is the file type yEd uses to import an adjacency matrix.

Last, you will need some LV code to generate an adjacency matrix and node property list from a project.  Here is one I made for Actor Framework.  Please excuse the poor code layout as I hacked this together quickly.

Generate AF Node Map Data.vi

(Note: this can easily be adapted to other message systems.  The only change would be the mapping for the color properties to the appropriate parent classes.

 

Open the VI, choose your target project and your destination xlsx file and run it!

 

You will get a file like this:

AF Demo node list.zip

(zipped for your protection.  ;) )

 

Next you need to open this file in yEd.  When you do, you need to set the data ranges correctly, like this:

post-2411-0-74394700-1369176427_thumb.jp

and choose a presentation configuration like this:

post-2411-0-42686900-1369176446_thumb.jp

which I created earlier using this:

post-2411-0-84151900-1369176490_thumb.jp

 

The end result, after a few cosmetic tweaks results in this:

post-2411-0-84877000-1369176536_thumb.pn

 

Pretty cool, eh?   :D

 

(Well, I think it is useful.  I always prefer to visualize my applications.  Complex apps using messaging architectures can get pretty hard to follow without good documentation.)

 

I hope others find this useful.

 

-John

  • Like 1

Share this post


Link to post
Share on other sites

Super-cool! Now to get yEd to auto-size and contain the names. Here's the early stage of a project, shown as Heirarchical:

post-107-0-50257200-1369179060_thumb.png

Share this post


Link to post
Share on other sites

Yes.  You can define many different properties in the node list.  I just tried color first.  This was mainly a proof of concept.  I would love to see where other take this idea.  One idea is to choose a class in the project to focus on and limit the graph to only 2 links away from that class.  Otherwise, your graph can get huge.  Here is one portion of my current project (just 25% of the UI model).

post-2411-0-61273100-1369179764_thumb.pn

Share this post


Link to post
Share on other sites

Yes.  You get what you pay for!   :P

But, you certainly can automate the generation of the excel file so you can easily import the data and customize the graph in several ways.  Not a bad compromise.  There are other tools out there for creating node maps.  Perhaps there is a better solution.

Share this post


Link to post
Share on other sites

I guess maybe I am missing something but what exactly does this information tell you?  I can see the graph as representative of the relationships but how does that help?

 

Do you have like a use case example that you could walk me through to show how the data is used?

 

Wire Warrior

Share this post


Link to post
Share on other sites
I guess maybe I am missing something but what exactly does this information tell you?  I can see the graph as representative of the relationships but how does that help?

 

Do you have like a use case example that you could walk me through to show how the data is used?

 

Wire Warrior

I could see this used in a document explaining how the software components communicate.  Sure you'd probably want a section explaining each relationship in more detail, but it would to spice up a boring software document with some graphics.

 

I do something similar with my software design documents, but they are custom made, and could be error prone.  I may miss some messaging connection between nodes where this software wouldn't.

Edited by hooovahh

Share this post


Link to post
Share on other sites

Hoovah, Okay that makes sense. 

 

I suppose extending on that idea you could have a "planned" communication graph and an "actual" communication graph as well.  Doing that lets the tool be used as a verification piece also. 

 

I wonder....does the state machine tool kit have features/functions that could be co-opted to assist with this?

Share this post


Link to post
Share on other sites

My main goal was to come up with an automated way to document the relationships between an actor and all it's messages.  This is a natural case for a node map.  Also, it will uncover the connections from other actors that connect to an actor via it's messages.

This mainly makes sense if you are using a messaging architecture where each message is a class and the only communication path between your independent processes is via these messages.  This is not limited to the Actor Framework.  (I use my own architecture that is much less limiting than AF) but the concept still applies.

Applications written with this type of architecture can very quickly become too complex to understand, even for the author.  By having a diagram like this, you can have a means of graphically representing the logical links within the system that are not visible in the source code, even when using a graphical programming language like LabVIEW.

This is admittedly a very early version of this tool that I just put together in a few hours to prove the concept.  I hope to improve on it over time but wanted to share the idea and code in case others wanted to contribute.

Share this post


Link to post
Share on other sites

I am thinking of expanding on this for a CLA Summit presentation.  But before I invest a lot of time, I am wondering how many others think a tool like this would be useful.  If you are interested, please reply or 'like' this post so I have an idea of the level of interest in this subject.

 

thanks,

 

-John

  • Like 1

Share this post


Link to post
Share on other sites
I am thinking of expanding on this for a CLA Summit presentation. But before I invest a lot of time, I am wondering how many others think a tool like this would be useful. If you are interested, please reply or 'like' this post so I have an idea of the level of interest in this subject.

thanks,

-John

From my point of view. It's no better and a little bit worse than the hierarchy window since it hides "depth". What I would really like to see is a 3D version of the hierarchy a bit like the  firefox "layers" (we could zoom in and out then,too ;) )

Edited by ShaunR

Share this post


Link to post
Share on other sites

The class hierarchy window contains none of this information.  It only shows you what classes are children of other classes.  Messages are not children of the processes that execute them.

The VI hierarchy window is just a mess, showing every single VI connection from a VI perspective, but again, not the information I am looking for.

 

The node map is intended to show links between processes/actors via the messages they send/receive.  This only works for messages systems where the message is a class.  The idea is the process appears as a central node with the messages it can receive surrounding it.  If one of those messages in turn sends a message to another process when it is executed, then a link is shown from the sending message to the receiving message.

The idea is you can see all the messages a process can be sent and you can see what other processes are sending what messages to each process.  So, you can then trace the propagation of an action through the application.

For example: The user presses button X.  The UI code sends a message to the UI message process that button X was pressed.  The UI process then executes this message, causing it to send another message to the main controller process to execute action X.  The main controller process then executes this message, causing it to send another message to the external comm process to send command X to some external device/application.  The node map would show all those links so you could visualize what was happening and see the message flow.  Ideally, you would be able to click on each node and view the underlying code in LabVIEW, but, I have not developed it to the point where that is possible.

 

I have not seen another method to help visualize the message flow of an application.  I have looked at sequence diagrams but those show specific intra-process communication for specific conditions.  They do not expose all the potential links in the system.  Command pattern message based system are tightly coupled but it is not easy to visualize that coupling.  I think we need a way to do this to help us understand complex system implemented with these type of architectures.

Share this post


Link to post
Share on other sites

Hey John,

 

I'm a little late to the party, but I am curious what metric you used to drive the size of the nodes in your graph?

 

Thanks,

Jon

Share this post


Link to post
Share on other sites

I don't have a size control.  Just color.  I think the size difference you see is because I messed around with the output in yEd a bit.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.