views:

123

answers:

2
+1  A: 

When you want to indicate that data is sent from (Client)A to (Server)B, draw the arrow from A to B. When you want to indicate that data is sent from (Server)B back to (Client)A, draw the arrow from B to A. Data can flow both ways.

In regards to your slashdot reference, when the (Client)A wants to browse to Slashdot.org, it makes a request to the server, so you would draw an arrow from (Client)A to (Server)Slashdot.org. When Slashdot receives this request, it sends back a response to your client to render Slashdot in your browser, so in that case you would draw an arrow from Server(Slashdot.org) to (Client)A.

Here is a simple reference explaining it:

http://computer.howstuffworks.com/web-server1.htm

Xaisoft
Then you would draw an arrow on both sides. Wouldn't you say that the arrow from (Client) A to Server (B) is implicit?
toaster
You can draw the arrow both ways to show a response and request or you can draw 2 separate diagrams. Both arrows are actually implicit because you know there is communication both ways in this case.
Xaisoft
Well, I am still not convinced. Since the first flow (A->B) is only here to get the response (B->A), the most important flow is B->A.
toaster
Both flows are important. In order for you to actually get a response back from Slashdot.org, for example, your client first needs to be able to send a request to slashdot.org and it needs to reach slashdot.org server(s). If your request does not reach it, you will not get a response back, you most likely will get a request time out or some similar error. If your request does reach slashdot, then it is its responsibility to send a response back to your browser to render the page. Basically, without a request, there is no response.
Xaisoft
With regards to your diagram, I would say the 3rd option best describes the flow. Client A sends request to Server B, Server B sends a request to Database C, Database C sends a response back to Server B, Server B sends a response back to Client A. If Server B just sent a response to Database C to update data, not return anything, you could draw a one way arrow, but based on your description of what is happening, I think number 3 on your list best describes the communication between A,B,and C
Xaisoft
I believe that if I would choose the 3rd option, most of the arrows will be bidrectional, which will obfuscate the real meaning of the diagram, don't you think?
toaster
I think it is a matter of how detailed you actually want to be. Since you are the creator of your diagram, you probably don't need to be as detailed with the arrows because you know the system, but for someone who does not know the system, it may be better to offer more detail in the diagrams.
Xaisoft
A: 

If it's a diagram of "what the user is doing", the user is going from client to server.

If it's a diagram of "where data is going", the client is passing a string to the server, and the server is returning a string to the client; it can be a two way arrow.

I'd probably go with Variant 1. "The browser is accessing" is a one-way operation.

Dean J