Обсуждение: Protocol Message Graph

Поиск
Список
Период
Сортировка

Protocol Message Graph

От
Agent M
Дата:
I have created a directed graph using graphviz that shows the message
flow/event stream. Perhaps this will be helpful to someone. Of course,
corrections are also welcome.

http://www.themactionfaction.com/pg/PGXProtocol.dot
http://www.themactionfaction.org/pg/PGXProtocol.svg
http://www.themactionfaction.org/pg/PGXProtocol.pdf

(Messages in ellipses are sent from the server, rectangle message are
sent from the client.)

-M

¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬
AgentM
agentm@themactionfaction.com
¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬


Re: Protocol Message Graph

От
Alvaro Herrera
Дата:
Agent M wrote:
> I have created a directed graph using graphviz that shows the message 
> flow/event stream. Perhaps this will be helpful to someone. Of course, 
> corrections are also welcome.

Interesting.  I'm not sure how to read the graph however -- for example
what does it mean to have ReadyForQuery in both a rectangle and an
ellipse?  What do the standalone boxes mean? (e.g. the SSLRequest and
CancelRequest? and why are they wrapped in two boxes?  why
Close/CloseComplete appear from nowhere and they don't lead anywhere?)

Maybe it would make more sense to have a graph of states, and the edges
would indicate what messages are sent to change from one state to
another.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


Re: Protocol Message Graph

От
Agent M
Дата:
On Apr 23, 2006, at 6:43 PM, Alvaro Herrera wrote:

> Agent M wrote:
>> I have created a directed graph using graphviz that shows the message
>> flow/event stream. Perhaps this will be helpful to someone. Of course,
>> corrections are also welcome.
>
> Interesting.  I'm not sure how to read the graph however -- for example
> what does it mean to have ReadyForQuery in both a rectangle and an
> ellipse?  What do the standalone boxes mean? (e.g. the SSLRequest and
> CancelRequest? and why are they wrapped in two boxes?  why
> Close/CloseComplete appear from nowhere and they don't lead anywhere?)
>
> Maybe it would make more sense to have a graph of states, and the edges
> would indicate what messages are sent to change from one state to
> another.

I tried to group the messages by functionality: asynchronous, simple,
extended, copy, function, etc. Since ReadyForQuery shows up in multiple
modes, I put it in its own mode (hence the additional bounding box). I
agree that the graph isn't perfect, but I also ran up against certain
limitations in graphiz itself (e.g., only one level of subgraph is
supported). So it's useful as a guide, but it clearly isn't a state
machine.

-M

¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬
AgentM
agentm@themactionfaction.com
¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬



Re: Protocol Message Graph

От
Simon Riggs
Дата:
On Sun, 2006-04-23 at 18:43 -0400, Alvaro Herrera wrote:
> Agent M wrote:
> > I have created a directed graph using graphviz that shows the message 
> > flow/event stream. Perhaps this will be helpful to someone. Of course, 
> > corrections are also welcome.

Thats a good start. 

> Maybe it would make more sense to have a graph of states, and the edges
> would indicate what messages are sent to change from one state to
> another.

Yes, that would be better.

It would be good to do the same for LWLock states, to help check for
deadlock possibilities.

--  Simon Riggs              EnterpriseDB   http://www.enterprisedb.com