Opened 7 years ago

Closed 7 years ago

#2938 closed task (complete)

Hooks framework design

Reported by: stephen Owned by: stephen
Priority: medium Milestone: Sprint-DHCP-20130821
Component: Unclassified Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

Produce a design for the hooks framework. This design should cover both parts of the hooks framework:

  • how the caller (one of the BIND server processes) loads (and unloads) the hooks and how it calls them. Also how the server process is supposed to act on the status returned.
  • how the called hook reads (and modifies) the data passed to it and how it requests any services of the hooks.

Subtickets

Attachments (1)

hooks_classes.svg (31.7 KB) - added by tmark 7 years ago.
Class Diagram for Hooks Library

Download all attachments as: .zip

Change History (12)

comment:1 Changed 7 years ago by stephen

  • Owner set to stephen
  • Status changed from new to accepted

comment:2 Changed 7 years ago by stephen

  • Owner changed from stephen to tomek
  • Status changed from accepted to reviewing

The first draft of the hooks framework design can be found here.

comment:3 Changed 7 years ago by stephen

  • Milestone changed from Sprint-DHCP-20130509 to Sprint-DHCP-20130523

comment:4 Changed 7 years ago by tomek

  • Owner changed from tomek to UnAssigned

comment:5 Changed 7 years ago by stephen

The hooks framework design on the wiki has been updated to reflect the implementation.

comment:6 Changed 7 years ago by tmark

  • Owner changed from UnAssigned to tmark

Changed 7 years ago by tmark

Class Diagram for Hooks Library

comment:7 Changed 7 years ago by tmark

Comments are largely minor corrections. I did create a more detailed class diagram for you
and attached it to this ticket, if you wish to use it. It was helpful to my understanding, and imagine others would find it of some value.

In the example code under "Callout Arguments" section,

Change this phrase:

'and does not require a "set".' to 'and does not require a "setArgument."'

I had read it a couple of times before the "light bulb" went on.


"User-Side Objects"

This paragraph:

"As far as user-library code is concerned, two objects are important: the LibraryHandle? and the CalloutHandle?. The former allows registration of callouts, whereas the latter is the mechanism by which data are passed between the server and library, and between callouts in the library on a per-request basis."

I'd suggest replacing "former" and "latter" second sentence and with the object
names themselves.


Under Restrictions on Callout Registration:

"Firstly, a callout can be deregistered a function"

insert missing "by":

"Firstly, a callout can be deregistered by a function"


Under Per-Request Callout Handle:

"Gets/sets per-query (or pre-packet) context."

change "pre" to "per":

"Gets/sets per-query (or per-packet) context."


Under Per-Request Callout Handle:

"These methods gets and set the arguments"

change "gets" to "get":

"These methods get and set the arguments"


Under Per-Request Callout Handle:

"instead the code immediately call the pd_lease_assign_post hook"

insert missing "would":

"instead the code would immediately call the pd_lease_assign_post hook"


Under Per-Request Callout Handle:

"a reference to the libraryt handle."

change "libraryt" to "library"


Under Server-Side Objects:

"LibraryHandle? is contains little more"

remove extraneous "is"

"LibraryHandle? contains little more"


Under LibraryManager?

"using the associated LibraryHandle?'s registerHook()"

add a "!" in front of LibraryHandle?.


Under LibraryManager?

"the associated shared library will be close."

change "be close." to "be closed."

comment:8 Changed 7 years ago by tmark

  • Owner changed from tmark to stephen

comment:9 Changed 7 years ago by stephen

  • Owner changed from stephen to tmark

I did create a more detailed class diagram for you and attached it to this ticket, if you wish to use it.

Thanks. I've attached it to the page and noted that it is a more detailed class diagram.

I've incorporated all the changes apart from the replacement of "former" and "latter" by the class names - it's a style issue: I think repetition of the class names in two successive sentences is a bit of a mouthful. The changes can be found in version 16 of the design.

If You're happy with the changes, I'll close the ticket.

Last edited 7 years ago by stephen (previous) (diff)

comment:10 Changed 7 years ago by tmark

  • Owner changed from tmark to stephen

Changes look fine. Close away.

comment:11 Changed 7 years ago by stephen

  • Resolution set to complete
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.