I am about to draw/document for some client-server connection establishing code to better understand it. There are several operations that are done asynchronously in separate threads (connecting threads, data receiving threads, etc).
我即将绘制/记录一些客户端 - 服务器连接建立代码以更好地理解它。有几个操作在不同的线程中异步完成(连接线程,数据接收线程等)。
Should I show them on separate diagrams? I would prefer to have it on a single diagram to grasp overall view but don't know how to represent it on Activity diagram.
我应该在单独的图表上显示它们吗?我更愿意将它放在一个图表上以掌握整体视图,但不知道如何在活动图上表示它。
2 个解决方案
#1
I'm not sure if there's a correct way of doing this, I developed my own method by testing different strategies until I came up with something that worked for my own mindset.
我不确定是否有正确的方法,我通过测试不同的策略开发了自己的方法,直到我找到了适合我自己心态的东西。
This is how I do it:
我是这样做的:
- Threads == Swimlanes
- Thread Operations == Action/Activity nodes
- Critical sections == Object nodes
- Thread creation == Fork nodes
线程== Swimlanes
线程操作==操作/活动节点
关键部分==对象节点
线程创建== Fork节点
An example image below.
下面的示例图片。
alt text http://www.freeimagehosting.net/uploads/55eaa90498.jpg
alt text http://www.freeimagehosting.net/uploads/55eaa90498.jpg
#2
Instead of using full arrowheads you can use half arrowheads to show an asynchronous message call. As shown
您可以使用半箭头显示异步消息调用,而不是使用完整箭头。如图所示
#1
I'm not sure if there's a correct way of doing this, I developed my own method by testing different strategies until I came up with something that worked for my own mindset.
我不确定是否有正确的方法,我通过测试不同的策略开发了自己的方法,直到我找到了适合我自己心态的东西。
This is how I do it:
我是这样做的:
- Threads == Swimlanes
- Thread Operations == Action/Activity nodes
- Critical sections == Object nodes
- Thread creation == Fork nodes
线程== Swimlanes
线程操作==操作/活动节点
关键部分==对象节点
线程创建== Fork节点
An example image below.
下面的示例图片。
alt text http://www.freeimagehosting.net/uploads/55eaa90498.jpg
alt text http://www.freeimagehosting.net/uploads/55eaa90498.jpg
#2
Instead of using full arrowheads you can use half arrowheads to show an asynchronous message call. As shown
您可以使用半箭头显示异步消息调用,而不是使用完整箭头。如图所示