Edgewall Software
Modify

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#8696 closed enhancement (fixed)

diagrams for Trac request processing

Reported by: anatoly techtonik <techtonik@…> Owned by: Carsten Klein <carsten.klein@…>
Priority: normal Milestone: not applicable
Component: general Version: none
Severity: normal Keywords: devguide documentation
Cc: lists@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

As a potential plugin developer, I would really appreciate the diagram with the order of various components called when Trac processes request.

For example, to answer the question, that consequences has null Exception handler in this plugin:

http://trac-hacks.org/browser/noanonymousplugin/0.11/noanonymous/filter.py?rev=4369

Attachments (1)

RequestHandling.png (74.2 KB ) - added by Carsten Klein <carsten.klein@…> 14 years ago.
General Trac Request Handling

Download all attachments as: .zip

Change History (14)

comment:1 by Christian Boos, 15 years ago

Keywords: devguide documentation added
Milestone: 0.12.1

Well, nobody really knows what happens …

by Carsten Klein <carsten.klein@…>, 14 years ago

Attachment: RequestHandling.png added

General Trac Request Handling

comment:2 by Carsten Klein <carsten.klein@…>, 14 years ago

See the attached file. It displays general trac request handling. Of course, there is a lot more going on during request dispatch, especially when it comes to the actual request handler in charge for processing the request.

I forgot to also have the owners displayed for each of the actors, however, these are basically all from the trac.web.main and trac.web.api and trac.web.chrome modules.

comment:3 by Carsten Klein <carsten.klein@…>, 14 years ago

Regarding your question towards the noanonymous filter plugin. It is implemented in the wrong way. all of the code should go to pre_process_request, basically making it

   def pre_process_request(req, ...):

     if req.authenticate() == 'anonymous' and \
        not req.pathinfo.startswith("/login") and \
        not req.pathinfo.startswith("/resetpassword"):
        req.redirect(req.href.login())

comment:4 by Carsten Klein <carsten.klein@…>, 14 years ago

ups it is of course req.authname instead of req.authenticate()

comment:5 by Christian Boos, 14 years ago

Milestone: next-minor-0.12.xnot applicable
Owner: set to Carsten Klein <carsten.klein@…>

Thanks Carsten. Could you stick that diagram somewhere in an appropriate TracDev page (if none is fitting you can of course create a new one).

comment:6 by anatoly techtonik <techtonik@…>, 14 years ago

I second to thank you, Carsten. Very insightful. Now it is my problem to find some time to integrate this knowledge into NoAnonymous practices. =)

in reply to:  5 comment:7 by anatoly techtonik <techtonik@…>, 14 years ago

Replying to cboos:

Could you stick that diagram somewhere in an appropriate TracDev page.

I believe it is already done 7 weeks ago at TracDev/RequestHandling

in reply to:  4 comment:8 by anatoly techtonik <techtonik@…>, 14 years ago

Replying to Carsten Klein <carsten.klein@…>:

ups it is of course req.authname instead of req.authenticate()

Actually I've implemented new version of the plugin as you recommended about the same time the ticket was created. The previous link was to old version, because of questionable exception handler. New version is here - http://trac-hacks.org/browser/noanonymousplugin/0.11/noanonymous/filter.py

It seems that the diagram can be broken into two for better screen alignment. One for project index request and one for the generic request. If there could be a source file for some sequence diagram tool like sdedit people could use it to improve the diagram.

Perhaps requests for static resources can also be presented as more detailed example.

comment:9 by carsten.klein@…, 14 years ago

The diagram was made using MagicDrawUML. I will split the diagram into two distinct sequence diagrams, one for the project index and one for the generic request and post these here, incl. the MagicDrawUML file.

comment:10 by Carsten Klein <carsten.klein@…>, 14 years ago

I have update the wiki page and the diagrams there. Also included the original UML file (MagicDrawUML).

See TracDev/RequestHandling for more information.

Please note that some of the attachments there can be removed.

comment:11 by Thijs Triemstra <lists@…>, 14 years ago

Cc: lists@… added

Guess this ticket can be closed then.

comment:12 by Remy Blank, 14 years ago

Resolution: fixed
Status: newclosed

comment:13 by anatoly techtonik <techtonik@…>, 14 years ago

Thanks.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Carsten Klein <carsten.klein@…>.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Carsten Klein <carsten.klein@…> to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.