Thread: [complement-svn] SF.net SVN: complement: [1564] trunk/complement/explore/app
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2007-05-18 07:19:25
|
Revision: 1564 http://svn.sourceforge.net/complement/?rev=1564&view=rev Author: complement Date: 2007-05-18 00:19:24 -0700 (Fri, 18 May 2007) Log Message: ----------- initial doc for 'exam' project Added Paths: ----------- trunk/complement/explore/app/exam/ trunk/complement/explore/app/exam/doc/ trunk/complement/explore/app/exam/doc/requirements/ trunk/complement/explore/app/exam/doc/requirements/UseCaseSpec.tex trunk/complement/explore/app/exam/doc/requirements/Vision.tex trunk/complement/explore/app/exam/doc/requirements/debug-focus.fig trunk/complement/explore/app/exam/doc/requirements/p1.fig trunk/complement/explore/app/exam/doc/requirements/p2.fig trunk/complement/explore/app/exam/doc/requirements/p3.fig trunk/complement/explore/app/exam/doc/requirements/p4.fig trunk/complement/explore/app/exam/doc/requirements/p5.fig trunk/complement/explore/app/exam/doc/requirements/rup.sty Property changes on: trunk/complement/explore/app/exam/doc/requirements ___________________________________________________________________ Name: svn:ignore + *.log *.out *.dvi *.toc *.0 *.mps *.mp *.mpx *.bak *.aux *.pdf *.pdf_t Added: trunk/complement/explore/app/exam/doc/requirements/UseCaseSpec.tex =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/UseCaseSpec.tex (rev 0) +++ trunk/complement/explore/app/exam/doc/requirements/UseCaseSpec.tex 2007-05-18 07:19:24 UTC (rev 1564) @@ -0,0 +1,311 @@ +% -*- LaTeX -*- + +\documentclass[a4paper,twoside]{article} + +% \usepackage[koi8-r]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[pdftex]{graphics} +\usepackage{pslatex} +% \usepackage[dvips,final]{epsfig} +% \usepackage{cm-super} +\usepackage[colorlinks,urlcolor=blue]{hyperref} +\usepackage{url} + +\usepackage{rup} +%% Define a new 'leo' style for the package that will use a smaller font. +\makeatletter +\def\url@leostyle{% + \@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\small\ttfamily}}} +\makeatother +%% Now actually use the newly defined style. +\urlstyle{leo} + + +\version{0.1} +\title{Use Case Specification: ``Unit Test Framework''} + +\project{Exam} + +\RevHistory{2007--03--08 & 1.0 & Initial document & Petr Ovtchenkov \cr \hline} + +\begin{document} + +\maketitle +% toc +\tableofcontents + +\section{Unit Test Framework} + +% [The following template is provided for a Use-Case +% Specification, which contains the textual properties of the use case. +% This document is used with a requirements management tool, such as Rational +% RequisitePro, for specifying and marking the requirements within the use case +% properties] + +% [The diagrams of the use case can be developed in a visual +% modeling tool, such as Rational Rose. A use-case report (with all +% properties) may be generated with Rational SoDA. For more information, see the tool mentors in the Rational +% Unified Process.] + +\subsection{Brief Description} + +% [The description should briefly convey the role and purpose +% of the use case. A single paragraph +% should suffice for this description.] + +Unit test framework should provide a matched set of components for writing +test programs, grouping tests into test cases and test suites, +monitoring and controlling their runtime execution. Unit test framework +should be convenient for testing programs and set of programs that implement +services and client--server technologies (the set of intercommunicating programs, many +control flows). + +\section{Flow of Events} + +\subsection{Basic Flow} + +% [This use case starts when the actor does something. An actor always initiates use Cases. The use case should describe what the actor +% does and what the system does in response. +% It should be phrased in the form of a dialog between the actor and the +% system. +% +% The use case should describe what happens inside the system, +% but not how or why. If information is +% exchanged, be specific about what is passed back and forth. For example, it is not very illuminating to +% say that the Actor enters customer information. It is better to say the Actor +% enters the customer's name and address. +% A Glossary of Terms is often useful to keep the complexity of the use +% case manageable---you +% may want to define things like customer information there to keep the use case +% from drowning in details. +% +% Simple alternatives may be presented within the text of the +% use case. If it only takes a few +% sentences to describe what happens when there is an alternative, do it directly +% within the \textbf{Flow of Events} section. +% If the alternative flows are more complex, use a separate section to +% describe it. For example, an \textbf{Alternative Flow} +% subsection explains how to describe more complex alternatives. +% +% A picture is sometimes worth a thousand words, though there +% is no substitute for clean, clear prose. +% If it improves clarity, feel free to paste graphical depictions of user +% interfaces, process flows or other figures into the use case. If a flow chart is useful to present a +% complex decision process, by all means use it! +% Similarly for state-dependent behavior, a state-transition diagram often +% clarifies the behavior of a system better than pages upon pages of text. Use the right presentation medium for your +% problem, but be wary of using terminology, notations or figures that your +% audience may not understand. Remember +% that your purpose is to clarify, not obscure.] + +The test suite with single control flow. It notify about start of test suite, +run tests within this test suite (in the order following from tests dependency +graph), report about checks of conditions (verbosity depends upon log level), and print the resulting summary of the test suite (see fig.\ref{SingleFlow}). + +\begin{figure} + \begin{center} +% \input intercessor-time.pstex_t +% \input p1.pdf_t +% \scalebox{0.8}{\includegraphics{p1.pdf}} + \includegraphics{p1.mps} + \end{center} + \caption{The test case with single control flow.\label{SingleFlow}} +\end{figure} + + +\subsection{Alternative Flows} + +\subsubsection{Test suite for interactive program} + +% [More complex alternatives should be described in a separate +% section, which is referred to in the \textbf{Basic Flow} subsection +% of \textbf{Flow of Events} section. Think of the +% \textbf{Alternative Flow}> subsections like alternative behavior---each +% alternative flow +% represents alternative behavior, many times because of exceptions that occur in +% the main flow. They may be as long as +% necessary to describe the events associated with the alternative behavior. When an alternative flow ends, the events of +% the main flow of events are resumed unless otherwise stated.] + +The test suite with single control flow. It notify about start of test suite, +run tests within this test suite (in the order, described by tests dependency +graph), print conditions report (verbosity depends upon log level), and print the resulting summary of the test suite (see fig.\ref{InteractiveSingleFlow}). +During execution of the test suite, it require interaction with: it print +messages onto terminal and expect input from terminal. + +\begin{figure} + \begin{center} + \includegraphics{p5.mps} + \end{center} + \caption{The test case with single control flow; test suite is + interactive, it print some message to terminal and expect input + from terminal.\label{InteractiveSingleFlow}} +\end{figure} + +This use-case reflect test suite for interactive part of program. + +\subsubsection{Multi-threaded test suite} + +% [There may be, and most likely will be, a number of +% alternative flows in a use case. Keep +% each alternative separate to improve clarity. +% Using alternative flows improves the readability of the use case, as +% well as preventing use cases from being decomposed into hierarchies of use +% cases. Keep in mind that use cases are +% just textual descriptions, and their main purpose is to document the behavior +% of a system in a clear, concise, and understandable way.] + +The test suite with more then one control flow. It register start of test suite, +run tests within this test suite (in the order, described by tests dependency +graph), print conditions report (verbosity depends upon log level), and print the resulting summary of the test suite (see fig.\ref{ThreadedFlow}). +Test control flow is splitted into few threads. + +\begin{figure} + \begin{center} + \includegraphics{p2.mps} + \end{center} + \caption{The test case with few control flows, single process.\label{ThreadedFlow}} +\end{figure} + +This use-case reflect test suite for multi-threaded program, such as server, +that provide some kind of service. + +\subsubsection{Test suite with fork} + +The test suite with more then one control flow. It register start of test suite, +run tests within this test suite (in the order, described by tests dependency +graph), print conditions report (verbosity depends upon log level), and print the resulting summary of the test suite (see fig.\ref{ForkedFlow}). +Some tests of the test suite forked into several processes. + +\begin{figure} + \begin{center} + \includegraphics{p4.mps} + \end{center} + \caption{The test case with few control flows, process forked.\label{ForkedFlow}} +\end{figure} + +This use-case reflect test suite for daemons and client-server interaction. + +\subsubsection{Test suite with process intercommunication} + +The test suite with more then one control flow. It register start of test suite, +run tests within this test suite (in the order, described by tests dependency +graph), print conditions report (verbosity depends upon log level), and print the resulting summary of the test suite (see fig.\ref{IntercomProcesses}). +Some tests of the test suite forked into several processes. + +\begin{figure} + \begin{center} + \includegraphics{p3.mps} + \end{center} + \caption{The test case with few control flows, intercommunicated processes.\label{IntercomProcesses}} +\end{figure} + +This use-case reflect test suite for daemons and client-server interaction. + +\section{Special Requirements} + +% [A special requirement is typically a non-functional +% requirement that is specific to a use case, but is not easily or naturally +% specified in the text of the use case's event flow. Examples of special +% requirements include legal and regulatory requirements, application standards, +% and quality attributes of the system to be built including usability, +% reliability, performance or supportability requirements. Additionally, other +% requirements---such +% as operating systems and environments, compatibility requirements, and design +% constraints---should be captured in this section.] + +\subsection{Suitable for debugging} + +\begin{figure} + \begin{center} + \includegraphics{debug-focus.mps} + \end{center} + \caption{Development application: functionality implementation cycle.\label{DevCycle}} +\end{figure} + +Unit tests not only instrument of QA (see fig.~\ref{DevCycle}). +Unit tests written +in parallel with functionality implementation,\footnote{as assume XP technique} +provide a good practice ground +for debugging. Implementation of special test cases for debugging +after detection problem in unit test isn't a good idea by financial (time and other resources) reasons. +Even more: in non-trivial cases not evident, what was wrong: +either incorrect functionality imlementation, or test, or even +specification. Developer should has a chance to debug program +keeping in mind as main functionality, as unit test logic. + +Due to this unit test framework intended for testing services, and services +often has own logic of signal processing, the unit test framework +should not (at least by default) intervenes into signal catching. +This also concern fatal errors with dumping core: dumping core ``as is'' +is more preferable way (useful for post-mortal debugging) then nice report +``you test died'' with unuseful stack. + +\subsection{Output from few control flows} + +Unit test suite should provide reasonable output as for tests +with single control flow, as for multi-threaded and multi-process tests. + +Unit test suite should provide reasonable output for test +with console output and input, i.e. split prints from interaction with user +from prints about failed conditions. + +\subsection{Integrable} + +To be light-weight, easy integrable into other tools and scripts. + +\subsection{Tests dependency\label{TestDependency}} + +Tests run order should be determined from tests dependency graph. + +\subsection{Tests grouping} + +The ability of grouping tests is desirable: +\begin{itemize} + \item single function tests + \item class (group of tests) with initialization and finalization. +\end{itemize} + +\subsection{Report format} + +Unit test framework should provide few levels of output verbosity, and +few formats of reports (plain text, xml/html). + +\subsection{Test timeout} + +Due to deadlock (or other conditions, leads to stalled test) may occur, +it would be nice if monitoring program abort such test after specified timeout, +and continue other tests (taken into account tests dependencies, section~\ref{TestDependency}). + +% \section{Pre-Conditions} + +% [A pre-condition of a use case is the state of the system +% that must be present prior to a use case being performed.] + +% \subsection{Pre-condition One} + +% \section{Post-Conditions} + +% [A post-condition of a use case is a list of possible states +% the system can be in immediately after a use case has finished.] + +% \subsection{Post-condition One} + +\section{Extension Points} + +% [Extension points of the use case.] + +\subsection{Remote testing} + +% [Definition of the location of the extension point in the +% flow of events.] + +Test suite monitoring may be performed from remote host. This also useful +if test suite allow monitoring a few (intercommunicating) processes, that +run on different hosts. + +\subsection{Performance Mesure} + +Unit tests may be used for performance measure of key technology solutions. + +\end{document} Added: trunk/complement/explore/app/exam/doc/requirements/Vision.tex =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/Vision.tex (rev 0) +++ trunk/complement/explore/app/exam/doc/requirements/Vision.tex 2007-05-18 07:19:24 UTC (rev 1564) @@ -0,0 +1,791 @@ +% -*- LaTeX -*- +% $Id: Vision.tex,v 1.2 2002/11/04 13:38:30 ptr Exp $ + +\documentclass[a4paper,twoside]{article} + +\usepackage{rup} + +\title{Vision} +\project{Virtual Manual} +% \RevHistory{dd/mmmm/yyyy & x.x & & \cr \hline} +\begin{document} + +\maketitle + +\section{Introduction} + +[The purpose of this document is to collect, +analyze, and define high-level needs and features of the +``System Name''. It focuses on the capabilities needed by the +stakeholders, and the target users, and \textbf{why} these needs exist. +The details of how the +``System Name'' fulfils these +needs are detailed in the use-case and supplementary specifications.] + +[The introduction of the \textbf{Vision} document should provide + an overview of the +entire document. It should include the purpose, scope, definitions, acronyms, +abbreviations, references, and overview of this \textbf{Vision} document.] + +\subsection{Purpose} + +[Specify the purpose of this \textbf{Vision} document.] + +\subsection{Scope} + +[A brief description of the scope of this \textbf{Vision} +document; what Project(s) it is associated with, and anything else that is +affected or influenced by this document.] + +\subsection{Definitions, Acronyms and Abbreviations} + +[This subsection should provide the +definitions of all terms, acronyms, and abbreviations required to properly +interpret the \textbf{Vision} document. This information may +be provided by +reference to the project Glossary.] + +\subsection{References} + +[This subsection should provide a complete +list of all documents referenced elsewhere in the \textbf{Vision} +document. Each document should be identified by title, +report number (if applicable), date, and publishing organization. +Specify the sources from which the +references can be obtained. This information may be provided by reference to an +appendix or to another document.] + +\subsection{Overview} + +[This subsection should describe what the +rest of the \textbf{Vision} document contains and explain how the document is +organized.] + +\section{Positioning} + +\subsection{Business Opportunity} + +[Briefly describe the business opportunity being met by this +project.] + +\subsection{Problem Statement} + +[Provide a statement summarizing the problem being solved by +this project. The following format may be used:] + +\begin{center} +\begin{minipage}[t]{2in} +\textit{The problem of} +\end{minipage} +\begin{minipage}[t]{4in} +[describe the problem] +\end{minipage} +\\[1em] +\begin{minipage}[t]{2in} +\textit{affects} +\end{minipage} +\begin{minipage}[t]{4in} +[the stakeholders affected by the problem] +\end{minipage} +\\[1em] +\begin{minipage}[t]{2in} +\textit{the impact of which is} +\end{minipage} +\begin{minipage}[t]{4in} +[what is the impact of the problem] +\end{minipage} +\\[1em] +\begin{minipage}[t]{2in} +\textit{a successful solution would be} +\end{minipage} +\begin{minipage}[t]{4in} +[list some key benefits of a successful solution] +\end{minipage} + +\end{center} + +\subsection{Product Position Statement} + +[Provide an overall statement summarizing at the highest +level, the unique position the product intends to fill in the marketplace. The +following format may be used:] +\begin{center} +\begin{minipage}[t]{2in} +\textit{For} +\end{minipage} +\begin{minipage}[t]{4in} +[target customer] +\end{minipage} +\\[1em] +\begin{minipage}[t]{2in} +\textit{Who} +\end{minipage} +\begin{minipage}[t]{4in} +[statement of the need or opportunity] +\end{minipage} +\\[1em] +\begin{minipage}[t]{2in} +\textit{The (product name) is a} +\end{minipage} +\begin{minipage}[t]{4in} +[product category] +\end{minipage} +\\[1em] +\begin{minipage}[t]{2in} +\textit{That} +\end{minipage} +\begin{minipage}[t]{4in} +[statement of key benefit; that is---compelling reason to buy] +\end{minipage} +\\[1em] +\begin{minipage}[t]{2in} +\textit{Unlike} +\end{minipage} +\begin{minipage}[t]{4in} +[primary competitive alternative] (text manuals, electronic text-only +manuals, electonic 2D illustrated manuals with hyper references) +\end{minipage} +\\[1em] +\begin{minipage}[t]{2in} +\textit{Our product} +\end{minipage} +\begin{minipage}[t]{4in} +[statement of primary differentiation] +\end{minipage} +\end{center} + +[A product position statement communicates the intent of the +application and the importance of the project to all concerned personnel.] + +\section{Stakeholder and User Descriptions} + +[To effectively +provide products and services that meet your stakeholders and users' real +needs, it is necessary to identify and involve all of the stakeholders as part +of the Requirements Modeling process. +You must also identify the users of the system and ensure that the +stakeholder community adequately represents them. This section provides a profile of the stakeholders and users +involved in the project and the key problems that they perceive to be addressed +by the proposed solution. It does not +describe their specific requests or requirements as these are captured in a +separate stakeholder requests artifact. +Instead it provides the background and justification for why the +requirements are needed.] + +\subsection{Market Demographics} + +[Summarize the key +market demographics that motivate your product decisions. Describe and position +target market segments. Estimate the market's size and growth by using the +number of potential users, or the amount of money your customers spend trying +to meet needs that your product or enhancement would fulfill. Review major industry +trends and technologies. Answer these strategic questions: + +\begin{itemize} + \item What is your organization's reputation +in these markets? + + \item What would you like it to be? + + \item How does this product or service support your goals? +\end{itemize} + +] + +\subsection{Stakeholder Summary} + +[Present a summary list of all the identified stakeholders.] + +\begin{center} +\begin{minipage}[t]{1.2in} +\centering \textbf{Name} +\end{minipage} +\begin{minipage}[t]{2in} +\centering \textbf{Represents} +\end{minipage} +\begin{minipage}[t]{2in} +\centering \textbf{Role} +\end{minipage}\nopagebreak +\\[1em] +\begin{minipage}[t]{1.2in} +Name the stakeholder type. +\end{minipage} +\begin{minipage}[t]{2in} +Briefly describe what they represent with respect to the development. +\end{minipage} +\hskip 1ex +\begin{minipage}[t]{2in} + [Briefly describe the role they are playing in the development. + For example, Ensure this] +\end{minipage} +\end{center} + +\subsection{User Summary} + +[Present a summary list of all the identified users.] + +\begin{center} +\begin{minipage}[t]{1.2in} +\centering\textbf{Name} +\end{minipage} +\begin{minipage}[t]{2in} +\centering\textbf{Description} +\end{minipage} +\hskip 1ex +\begin{minipage}[t]{2in} +\centering\textbf{Stakeholder} +\end{minipage} +\\[1em] +\begin{minipage}[t]{1.2in} + Name the user type +\end{minipage} +\begin{minipage}[t]{2in} +[Briefly describe what they represent with respect to the system.] +\end{minipage} +\hskip 1ex +\begin{minipage}[t]{2in} +[List how the user is represented by the stakeholders. + For example, Represented by Stakeholder 1.1] +\end{minipage} +\end{center} + + +\subsection{User Environment} + +[Detail the working +environment of the target user. Here are some suggestions: +\begin{itemize} + \item Number of people +involved in completing the task? Is this changing? + \item How long is a task + cycle? Amount of time spent in each activity? Is this changing? + \item Any unique environmental constraints: mobile, outdoors, + in-flight, etc.? + \item Which systems platforms are in use today? Future platforms? + \item What other applications are in use? Does your application + need to integrate with them? + \item This is where extracts from the Business Model could + be included to outline the task and workers involved etc.] +\end{itemize} + + +\subsection{Stakeholder Profiles} + +[Describe each +stakeholder in the system here by filling in the following table for each +stakeholder. Remember stakeholder types +can be as divergent as users, strategy departments and technical +developers. A thorough profile should +cover the following topics for each type of stakeholder:] + +\subsubsection{``Stakeholder Name''} + +\begin{center} +\begin{minipage}[t]{2in} +Representative +\end{minipage} +\begin{minipage}[t]{4in} +[Who is the stakeholder representative to the project? (optional if documented elsewhere.) + What we want here is names.] +\end{minipage} +\\[1ex] %-------------------------------- +\begin{minipage}[t]{2in} +Description +\end{minipage} +\begin{minipage}[t]{4in} +[Brief description of the stakeholder type.] +\end{minipage} +\\[1ex] %-------------------------------- +\begin{minipage}[t]{2in} +Type +\end{minipage} +\begin{minipage}[t]{4in} +[Qualify the stakeholder's expertise, technical background, and degree of + sophistication---that is, guru, business, expert, casual user, etc.] +\end{minipage} +\\[1ex] %-------------------------------- +\begin{minipage}[t]{2in} +Responsibilities +\end{minipage} +\begin{minipage}[t]{4in} +[List the stakeholder's key responsibilities with regards to the system being + developed that is, their interest as a stakeholder.] +\end{minipage} +\\[1ex] %-------------------------------- +\begin{minipage}[t]{2in} +Success Criteria +\end{minipage} +\begin{minipage}[t]{4in} +[How does the stakeholder define success? How is the stakeholder rewarded?] +\end{minipage} +\\[1ex] %-------------------------------- +\begin{minipage}[t]{2in} +Involvement +\end{minipage} +\begin{minipage}[t]{4in} +[How the stakeholder is involved in the project? Relate where possible + to RUP workers that is, Requirements Reviewer etc.] +\end{minipage} +\\[1ex] %-------------------------------- +\begin{minipage}[t]{2in} +Deliverables +\end{minipage} +\begin{minipage}[t]{4in} +[Are there any additional deliverables required by the stakeholder? + These could be project deliverables or outputs from the system under development.] +\end{minipage} +\\[1ex] %-------------------------------- +\begin{minipage}[t]{2in} +Comments / Issues +\end{minipage} +\begin{minipage}[t]{4in} +[Problems that interfere with success and any other relevant information go here.] +\end{minipage} +\end{center} + +\subsection{User Profiles} + +[Describe each +unique user of the system here by filling in the following table for each user +type. Remember user types can be as +divergent as gurus and novices. For example, a guru might need a sophisticated, +flexible tool with cross-platform support, while a novice might need a tool +that is easy to use and user-friendly. A thorough profile should cover the +following topics for each type of user:]</p> + +\subsubsection{``User Name''} +\begin{center} +\begin{minipage}[t]{2in} +Representative +\end{minipage} +\begin{minipage}[t]{4in} +[Who is the user representative to the project? (optional if documented + elsewhere.) This often refers to the Stakeholder that represents the set of users, + for example, Stakeholder: Stakeholder1.] +\end{minipage} +\\[1em] % ---------------------------------------- +\begin{minipage}[t]{2in} +Description +\end{minipage} +\begin{minipage}[t]{4in} +[A brief description of the user type.] +\end{minipage} +\\[1em] % ---------------------------------------- +\begin{minipage}[t]{2in} +Type +\end{minipage} +\begin{minipage}[t]{4in} +[Qualify the user's expertise, technical background, and degree +of sophistication that is, guru, casual user, etc.] +\end{minipage} +\\[1em] % ---------------------------------------- +\begin{minipage}[t]{2in} +Responsibilities +\end{minipage} +\begin{minipage}[t]{4in} +[List the user's key responsibilities with regards to the system + being developed that is, captures details, produces + reports, coordinates work, etc.] +\end{minipage} +\\[1em] % ---------------------------------------- +\begin{minipage}[t]{2in} +Success Criteria +\end{minipage} +\begin{minipage}[t]{4in} +[How does the user define success? How is the user rewarded?] +\end{minipage} +\\[1em] % ---------------------------------------- +\begin{minipage}[t]{2in} +Involvement +\end{minipage} +\begin{minipage}[t]{4in} +[How the user is involved in the project? + Relate where possible to RUP workers that is, + Requirements Reviewer, etc.] +\end{minipage} +\\[1em] % ---------------------------------------- +\begin{minipage}[t]{2in} +Deliverables +\end{minipage} +\begin{minipage}[t]{4in} +[Are there any deliverables the user produces and, if so, for whom?] +\end{minipage} +\\[1em] % ---------------------------------------- +\begin{minipage}[t]{2in} +Comments / Issues +\end{minipage} +\begin{minipage}[t]{4in} +[Problems that interfere with success and any other relevant + information go here. These would include trends that make the + user's job easier or harder.] +\end{minipage} +\end{center} + +\subsection{Key Stakeholder / User Needs} + +[List the key +problems with existing solutions as perceived by the stakeholder. Clarify the +following issues for each problem: + +\begin{itemize} + \item What are the reasons for this problem? + \item How is it solved now? + \item What solutions does the stakeholder want?] +\end{itemize} + +[It is important to +understand the \textbf{relative} importance the stakeholder or user places on +solving each problem. Ranking and cumulative voting techniques indicate +problems that \textbf{must} be solved versus issues they would + like addressed. + +Fill in the +following table --- if using ReqPro to capture the Needs, this could be an +extract or report from that tool.] + +\begin{tabular}{c|c|c|c|c} + Need & Priority & Concerns & Current Solution & Proposed Solutions \\ + Broadcast messages \\ +\end{tabular} + + +\subsection{Alternatives and Competition} + +[Identify +alternatives the stakeholder perceives as available. These can include buying a +competitor's product, building a homegrown solution or simply maintaining the +status quo. List any known competitive choices that exist, or may become +available. Include the major strengths and weaknesses of each competitor as +perceived by the stakeholder.] + +\subsubsection{``aCompetitor''} + +\subsubsection{``anotherCompetitor''} + +\section{Product Overview} + +[This section provides a high level view of the product +capabilities, interfaces to other applications, and systems configurations. +This section usually consists of three subsections, as follows: +\begin{itemize} + \item Product perspective + \item Product functions + \item Assumptions and dependencies] +\end{itemize} + +\subsection{Product Perspective} + +[This subsection of the <b>Vision</b> document should put the +product in perspective to other related products and the user's environment. If +the product is independent and totally self-contained, state it here. If the +product is a component of a larger system, then this subsection should relate +how these systems interact and should identify the relevant interfaces between +the systems. One easy way to display the major components of the larger system, +interconnections, and external interfaces is via a block diagram.] + +\subsection{Summary of Capabilities} + +[Summarize the major benefits and features the product will +provide. For example, a <b>Vision</b> document for a customer support system +may use this part to address problem documentation, routing, and status +reporting without mentioning the amount of detail each of these functions requires. + +Organize the functions so the list is understandable to the +customer or to anyone else reading the document for the first time. A simple +table listing the key benefits and their supporting features might suffice. For +example:] + +\begin{center} +Customer Support System \\[2ex] +\begin{tabular}{p{2in}|p{3in}} + Customer Benefit & Supporting Features \\ +\hline +New support staff can quickly get up to speed. & +Knowledge base assists support personnel in quickly +identifying known fixes and workarounds \\ +\hline +Customer satisfaction is improved because nothing falls through the cracks. & +Problems are uniquely itemized, classified and tracked throughout +the resolution process. Automatic notification occurs for any aging issues.\\ +\hline +Management can identify problem areas and gauge staff workload.& +Trend and distribution reports allow high level review of problem status.\\ +\hline +Distributed support teams can work together to solve problems. & +Replication server allows current database information to be shared +across the enterprise\\ +\hline +Customers can help themselves, lowering support costs and improving +response time. & +Knowledge base can be made available over the Internet. Includes +hypertext search capabilities and graphical query engine +\end{tabular} +\end{center} + + +\subsection{Assumptions and Dependencies} + +[List each of the factors that affects the features stated in +the <b>Vision</b> document. List assumptions that, if changed, will alter the +\textbf{Vision} +document. For example, an assumption may state that a specific operating +system will be available for the hardware designated for the software product. +If the operating system is not available, the \textbf{Vision} document + will need to change.] + +\subsection{Cost and Pricing} + +[For products sold to external customers and for many in-house + applications, cost and pricing issues can directly impact the +applications definition and implementation. In this section, record any cost +and pricing constraints that are relevant. For example, distribution costs, (\# +of diskettes, \# CD-ROMs, CD mastering) or other cost of goods sold constraints +(manuals, packaging) may be material to the projects success, or irrelevant, +depending on the nature of the application.] + +\subsection{Licensing and Installation} + +[Licensing and installation issues can also directly impact +the development effort. For example, the need to support serializing, password +security or network licensing will create additional requirements of the system +that must be considered in the development effort. + +Installation requirements may also affect coding, or create +the need for separate installation software.] + +\section{Product Features} + +[List and briefly describe the product features. Features are +the high-level capabilities of the system that are necessary to deliver +benefits to the users. Each feature is an externally desired service that +typically requires a series of inputs to achieve the desired result. For +example, a feature of a problem tracking system might be the ability to provide +trending reports. As the use-case model takes shape, update the description to +refer to the use cases. + +Because the \textbf{Vision} document is reviewed by a wide +variety of involved personnel, the level of detail should be general enough for +everyone to understand. However, enough detail should be available to provide +the team with the information they need to create a use-case model. + +To effectively manage application complexity, we recommend +for any new system, or an increment to an existing system, capabilities are +abstracted to a high enough level so 25--99 features result. These features +provide the fundamental basis for product definition, scope management, and +project management. Each feature will be expanded in greater detail in the use-case +model. + +Throughout this section, each feature should be externally +perceivable by users, operators or other external systems. These features +should include a description of functionality and any relevant usability issues +that must be addressed. The following guidelines apply: + + Avoid design. Keep feature +descriptions at a general level. Focus on capabilities needed and why, (not +how)\xA0 they should be implemented + + If you are using the Requisite +toolkit, all should be selected as requirements of type for easy reference and +tracking.] + +\subsection{``aFeature''} + +\subsection{``anotherFeature''} + +\section{Constraints} + +[Note any design constraints, external constraints or other +dependencies.] + +\section{Quality Ranges} + +[Define the quality ranges for performance, robustness, fault +tolerance, usability, and similar characteristics that are not captured in the +Feature Set.] + +\section{Precedence and Priority} + +[Define the priority of the different system features.] + +\section{Other Product Requirements} + +[At a high-level, list applicable standards, hardware or +platform requirements, performance requirements, and environmental +requirements.] + +\subsection{Applicable Standards} + +[List all standards with which the product must comply. These +can include legal and regulatory (FDA, UCC) communications standards (TCP/IP, +ISDN), platform compliance standards (Windows, Unix, etc.), and quality and +safety standards (UL, ISO, CMM).] + +\subsection{System Requirements} + +[Define any system requirements necessary to support the +application. These can include the supported host operating systems and network +platforms, configurations, memory, peripherals, and companion software.] + +\subsection{Performance Requirements} + +[Use this section to detail performance requirements. +Performance issues can include such items as user load factors, bandwidth or +communication capacity, throughput, accuracy, and reliability or response times +under a variety of loading conditions.] + +\subsection{Environmental Requirements} + +[Detail environmental requirements as needed. For hardware- +based systems, environmental issues can include temperature, shock, humidity, +radiation, etc. For software applications, environmental factors can include +usage conditions, user environment, resource availability, maintenance issues, +and error handling, and recovery.] + +\section{Documentation Requirements} + +[This section describes the documentation that must be +developed to support successful application deployment.] + +\subsection{User Manual} + +[Describe the purpose and contents of the User Manual. +Discuss desired length, level of detail, need for index, glossary of terms, +tutorial vs. reference manual strategy, etc. Formatting and printing constraints +should also be identified.] + +\subsection{On-line Help} + +[Many applications provide an on-line help system to assist +the user. The nature of these systems is unique to application development as +they combine aspects of programming (hyperlinks, etc) with aspects of technical +writing (organization, presentation). Many have found the development of +on-line help system is a project within a project that benefits from up-front +scope management and planning activity.] + +\subsection{Installation Guides, Configuration, Read Me File} + +[A document that includes installation instructions and +configuration guidelines is important to a full solution offering. Also, a Read +Me file is typically included as a standard component. The Read Me can include +a What's New With This Release section, and a discussion of +compatibility issues with earlier releases. Most users also appreciate +documentation defining any known bugs and workarounds in the Read Me file.] + +\subsection{Labeling and Packaging} + +[Today's state of the art applications provide a consistent +look and feel that begins with product packaging and manifests through +installation menus, splash screens, help systems, GUI dialogs, etc. This +section defines the needs and types of labeling to be incorporated into the +code. Examples include copyright and patent notices, corporate logos, +standardized icons and other graphic elements, etc.] + +\section{Appendix 1 - Feature Attributes} + +[Features should be given attributes that can be used to +evaluate, track, prioritize, and manage the product items proposed for +implementation. All requirement types and attributes should be outlined in the +Requirements Management Plan, however you may wish to list and briefly +describes the attributes for features that have been chosen. Following +subsections represent a set of suggested feature attributes.] + +\subsection{Status} + +[Set after negotiation and review by the project management +team. Tracks progress during definition of the project baseline.] + +\begin{tabular}{l|p{4in}} +Proposed & +[Used to describe features that are under discussion but + have not yet been reviewed and accepted by the ``official channel'', + such as a working group consisting of representatives from the project team, + product management and user or customer community.]\\ +Approved & +[Capabilities that are deemed useful and feasible and have + been approved for implementation by the official channel.] \\ +Incorporated & +[Features incorporated into the product baseline at a specific point + in time.] +\end{tabular} + +\subsection{Benefit} + +[Set by Marketing, the product manager or the business +analyst. All requirements are not created equal. Ranking requirements by their +relative benefit to the end user opens a dialogue with customers, analysts and +members of the development team. Used in managing scope and determining +development priority.] + +\begin{tabular}{l|p{3in}} +Critical & +[Essential features. Failure to implement means the system + will not meet customer needs. All critical features must be implemented in + the release or the schedule will slip.]\\ +Important & +[Features important to the effectiveness and efficiency of + the system for most applications. The functionality cannot be easily provided + in some other way. Lack of inclusion of an important feature may affect + customer or user satisfaction, or even revenue, but release will not be + delayed due to lack of any important feature.]\\ +Useful & +[Features that are useful in less typical applications, will + be used less frequently, or for which reasonably efficient workarounds can be + achieved. No significant revenue or customer satisfaction impact can be + expected if such an item is not included in a release.]\\ +\end{tabular} + +\subsection{Effort} + +[Set by the development team. Because some features require +more time and resources than others, estimating the number of team or +person-weeks, lines of code required or function points, for example, is the +best way to gauge complexity and set expectations of what can and cannot be +accomplished in a given time frame. Used in managing scope and determining +development priority.] + +\subsection{Risk} + +[Set by development team based on the probability the project +will experience undesirable events, such as cost overruns, schedule delays or +even cancellation. Most project managers find categorizing risks as high, +medium, and low sufficient, although finer gradations are possible. Risk can +often be assessed indirectly by measuring the uncertainty (range) of the +projects teams schedule estimate.] + +\subsection{Stability} + +[Set by analyst and development team based on the probability +the feature will change or the team's understanding of the feature will change. +Used to help establish development priorities and determine those items for +which additional elicitation is the appropriate next action.] + +\subsection{Target Release} + +[Records the intended product version in which the feature +will first appear. This field can be used to allocate features from a +\textbf{Vision} document into a particular baseline release. + When combined with the status +field, your team can propose, record and discuss various features of the +release without committing them to development. Only features whose Status is +set to Incorporated and whose Target Release is defined will be implemented. +When scope management occurs, the Target Release Version Number can be +increased so the item will remain in the \textbf{Vision} document but will be +scheduled for a later release.] + +\subsection{Assigned To} + +[In many projects, features will be assigned to ``feature +teams'' responsible for further elicitation, writing the software +requirements and implementation. This simple pull down list will help everyone +on the project team better understand responsibilities.] + +\subsection{Reason} + +[This text field is used to track the source of the requested +feature. Requirements exist for specific reasons. This field records an +explanation or a reference to an explanation. For example, the reference might +be to a page and line number of a product requirement specification, or to a +minute marker on a video of an important customer interview.] + + +\end{document} Added: trunk/complement/explore/app/exam/doc/requirements/debug-focus.fig =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/debug-focus.fig (rev 0) +++ trunk/complement/explore/app/exam/doc/requirements/debug-focus.fig 2007-05-18 07:19:24 UTC (rev 1564) @@ -0,0 +1,58 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Portrait +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +1 1 0 1 0 31 52 -1 20 0.000 1 0.0000 2775 3000 675 375 2775 3000 3450 3000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 2 + 0 0 1.00 60.00 120.00 + 2625 825 2025 825 + 0.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 825 2025 1275 + 0.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 2 + 0 0 1.00 60.00 120.00 + 3075 825 2400 1200 + 0.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 2 + 0 0 1.00 60.00 120.00 + 2025 1500 1425 2100 + 0.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 2 + 0 0 1.00 60.00 120.00 + 2325 1500 2775 2100 + 0.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 2 + 0 0 1.00 60.00 120.00 + 2775 2400 2775 2925 + 0.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 3 + 0 0 1.00 60.00 120.00 + 1200 2100 675 1575 1050 900 + 0.000 1.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 2 + 0 0 1.00 60.00 120.00 + 2025 600 2625 600 + 0.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 7 + 0 0 1.00 60.00 120.00 + 2925 3225 3150 3825 4125 3525 4275 1875 4200 300 3450 225 + 3300 600 + 0.000 1.000 1.000 1.000 1.000 1.000 0.000 +3 0 0 1 0 7 52 -1 -1 0.000 0 1 0 7 + 0 0 1.00 60.00 120.00 + 2550 3225 2550 3750 675 3600 -300 2550 -450 225 900 225 + 975 525 + 0.000 1.000 1.000 1.000 1.000 1.000 0.000 +4 1 0 50 -1 4 10 0.0000 0 150 900 2175 1425 Running Test\001 +4 1 0 50 -1 4 10 0.0000 0 150 825 3225 750 Writing Test\001 +4 1 0 50 -1 4 10 0.0000 0 120 885 1425 2325 Test Success\001 +4 1 0 50 -1 4 10 0.0000 0 120 555 2775 2325 Test Fail\001 +4 1 0 50 -1 4 10 0.0000 0 150 750 2775 3075 Debugging\001 +4 1 0 50 -1 4 10 0.0000 0 150 1800 975 750 Implementing functionality\001 Added: trunk/complement/explore/app/exam/doc/requirements/p1.fig =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/p1.fig (rev 0) +++ trunk/complement/explore/app/exam/doc/requirements/p1.fig 2007-05-18 07:19:24 UTC (rev 1564) @@ -0,0 +1,29 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Portrait +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1200 975 1500 975 1500 2925 1200 2925 1200 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 975 1875 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 1575 1875 1575 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 2925 1875 2925 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 450 1350 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 2925 1350 3375 +4 0 0 50 -1 4 10 0.0000 0 150 1170 1950 1650 Condition report\001 +4 0 0 50 -1 4 10 0.0000 0 120 825 1950 3000 Success/Fail\001 +4 0 0 50 -1 4 10 0.0000 0 120 360 1950 1050 Start\001 Added: trunk/complement/explore/app/exam/doc/requirements/p2.fig =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/p2.fig (rev 0) +++ trunk/complement/explore/app/exam/doc/requirements/p2.fig 2007-05-18 07:19:24 UTC (rev 1564) @@ -0,0 +1,42 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Portrait +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1200 975 1500 975 1500 2925 1200 2925 1200 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 975 1875 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 1575 1875 1575 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 2925 1875 2925 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 450 1350 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 2925 1350 3375 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 3 + 0 0 1.00 60.00 120.00 + 1500 1125 3600 1125 3600 1350 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3450 1350 3750 1350 3750 2250 3450 2250 3450 1350 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3750 1575 4125 1575 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 3 + 0 0 1.00 60.00 120.00 + 3600 2250 3600 2400 1500 2400 +4 0 0 50 -1 4 10 0.0000 0 150 1170 1950 1650 Condition report\001 +4 0 0 50 -1 4 10 0.0000 0 120 825 1950 3000 Success/Fail\001 +4 0 0 50 -1 4 10 0.0000 0 120 360 1950 1050 Start\001 +4 0 0 50 -1 4 10 0.0000 0 120 825 2400 1350 start thread\001 +4 0 0 50 -1 4 10 0.0000 0 150 1170 4200 1650 Condition report\001 Added: trunk/complement/explore/app/exam/doc/requirements/p3.fig =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/p3.fig (rev 0) +++ trunk/complement/explore/app/exam/doc/requirements/p3.fig 2007-05-18 07:19:24 UTC (rev 1564) @@ -0,0 +1,56 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Portrait +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1200 975 1500 975 1500 2925 1200 2925 1200 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 975 1875 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 2925 1875 2925 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 450 1350 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 2925 1350 3375 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3750 1350 4125 1350 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3450 1350 3750 1350 3750 2625 3450 2625 3450 1350 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3750 2625 4125 2625 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3600 450 3600 1350 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3600 2625 3600 3375 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 2175 1875 2175 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3750 2175 4125 2175 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 1 2 + 0 0 1.00 60.00 120.00 + 0 0 1.00 60.00 120.00 + 1500 1800 3450 1800 +4 0 0 50 -1 4 10 0.0000 0 120 825 1950 3000 Success/Fail\001 +4 0 0 50 -1 4 10 0.0000 0 120 360 4200 1425 Start\001 +4 0 0 50 -1 4 10 0.0000 0 120 360 1950 1050 Start\001 +4 0 0 50 -1 4 10 0.0000 0 120 825 4200 2700 Success/Fail\001 +4 0 0 50 -1 4 10 0.0000 0 150 1170 1950 2250 Condition report\001 +4 0 0 50 -1 4 10 0.0000 0 150 1170 4200 2250 Condition report\001 +4 1 0 50 -1 4 10 0.0000 0 120 1350 2475 1650 Intercommunication\001 +4 1 0 50 -1 4 10 0.0000 0 120 690 1350 300 Process 1\001 +4 1 0 50 -1 4 10 0.0000 0 120 690 3600 300 Process 2\001 Added: trunk/complement/explore/app/exam/doc/requirements/p4.fig =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/p4.fig (rev 0) +++ trunk/complement/explore/app/exam/doc/requirements/p4.fig 2007-05-18 07:19:24 UTC (rev 1564) @@ -0,0 +1,52 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Portrait +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1200 975 1500 975 1500 2925 1200 2925 1200 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 975 1875 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 1575 1875 1575 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 2925 1875 2925 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 450 1350 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 2925 1350 3375 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 3 + 0 0 1.00 60.00 120.00 + 1500 1125 3600 1125 3600 1350 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3450 1350 3750 1350 3750 2250 3450 2250 3450 1350 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3750 1575 4125 1575 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3750 1350 4125 1350 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3750 2250 4125 2250 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3600 2250 3600 3375 +4 0 0 50 -1 4 10 0.0000 0 150 1170 1950 1650 Condition report\001 +4 0 0 50 -1 4 10 0.0000 0 120 825 1950 3000 Success/Fail\001 +4 0 0 50 -1 4 10 0.0000 0 120 285 2400 1350 fork\001 +4 0 0 50 -1 4 10 0.0000 0 150 1170 4200 1650 Condition report\001 +4 0 0 50 -1 4 10 0.0000 0 120 360 4200 1425 Start\001 +4 0 0 50 -1 4 10 0.0000 0 120 360 1950 1050 Start\001 +4 0 0 50 -1 4 10 0.0000 0 120 825 4200 2325 Success/Fail\001 +4 1 0 50 -1 4 10 0.0000 0 120 690 1350 375 Process 1\001 +4 1 0 50 -1 4 10 0.0000 0 120 690 3600 975 Process 2\001 Added: trunk/complement/explore/app/exam/doc/requirements/p5.fig =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/p5.fig (rev 0) +++ trunk/complement/explore/app/exam/doc/requirements/p5.fig 2007-05-18 07:19:24 UTC (rev 1564) @@ -0,0 +1,37 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Portrait +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1200 975 1500 975 1500 2925 1200 2925 1200 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 975 1875 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 1575 1875 1575 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 2925 1875 2925 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 450 1350 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 2925 1350 3375 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2 + 0 0 1.00 60.00 120.00 + 825 1650 1200 1650 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 825 1950 1200 1950 +4 0 0 50 -1 4 10 0.0000 0 150 1170 1950 1650 Condition report\001 +4 0 0 50 -1 4 10 0.0000 0 120 825 1950 3000 Success/Fail\001 +4 0 0 50 -1 4 10 0.0000 0 120 360 1950 1050 Start\001 +4 2 0 50 -1 4 10 0.0000 0 150 480 750 1725 Output\001 +4 2 0 50 -1 4 10 0.0000 0 150 360 750 2025 Input\001 Added: trunk/complement/explore/app/exam/doc/requirements/rup.sty =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/rup.sty (rev 0) +++ trunk/complement/explore/app/exam/doc/requirements/rup.sty 2007-05-18 07:19:24 UTC (rev 1564) @@ -0,0 +1,149 @@ +% -*- LaTeX -*- +% $Id: rup.sty,v 1.1 2002/11/04 10:53:08 ptr Exp $ + +\makeatletter + +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +\ProvidesClass{rup}[2002/10/24 v0.1 RUP document class] + +\newcommand\version[1]{\gdef\@version{#1}} +\gdef\@version{1{.}0} +\newcommand\project[1]{\gdef\@project{#1}} +\gdef\@project{Project Name} +\newcommand\RevHistory[1]{\gdef\@revhistory{#1}} +\gdef\@revhistory{dd/mmmm/yyyy & x.x & & \cr \hline} + +% \setlength\parsep{5\p@ \@plus \p@} +% \setlength\parsep{5em} +% \parindent 0em +\setlength\parskip{5pt plus 1pt minus 1pt} +\setlength\parindent{0pt} +% \setlength\parsep{1em} + +\if@titlepage + \renewcommand\maketitle{\begin{titlepage}% + \let\footnotesize\small + \let\footnoterule\relax + \let \footnote \thanks + \null\vfil + \vskip 60\p@ + \begin{flushright}% + {\LARGE \@title \par}% + \vskip 3em% + {\large + \lineskip .75em% + \begin{tabular}[t]{c}% + \@author + \end{tabular}\par% + }% + \vskip 1.5em% + {\large \@date \par}% % Set date in \large size. + \end{flushright}\par + \@thanks + \vfil\null + \end{titlepage}% + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax + } +\else + \renewcommand\maketitle{\par + \begingroup + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi + \else + \newpage + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \fi + \thispagestyle{plain}\@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax + } + \def\@maketitle{% + \newpage + \null + \vskip 2em% + \begin{flushright}% + \let \footnote \thanks + {\LARGE \@project \par} + \vskip 1.5em% + {\LARGE \@title \par}% + \vskip 1.5em% + {\Large Version \@version \par} + \vskip 4em% + {\large Revision History + \vskip 1em% + \lineskip 0.5em% + {\small\fontfamily{cmss}\selectfont + \begin{tabular}{|c|c|p{1.5in}|p{1.2in}|} + \hline + Date & Version & Description & Author \\ + \hline + \@revhistory + % <dd/mmm/yy> & <x.x> & & \\ + % \hline + \end{tabular} + } +% \begin{tabular}[t]{c}% +% \@author +% \end{tabular}\par + }% +% \vskip 1em% +% {\large \@date}% + \end{flushright}% + \par + \vskip 1.5em% + } +\fi + +\renewenvironment{thebibliography}[1] + {\list{\@biblabel{\@arabic\c@enumiv}}% + {\settowidth\labelwidth{\@biblabel{#1}}% + \leftmargin\labelwidth + \advance\leftmargin\labelsep + \@openbib@code + \usecounter{enumiv}% + \let\p@enumiv\@empty + \renewcommand\theenumiv{\@arabic\c@enumiv}}% + \sloppy + \clubpenalty4000 + \@clubpenalty \clubpenalty + \widowpenalty4000% + \sfcode`\.\@m} + {\def\@noitemerr + {\@latex@warning{Empty `thebibliography' environment}}% + \endlist} + +\makeatother + +\RequirePackage{vmargin} +\setmarginsrb{1in}{1in}{1in}{1in}{30pt}{36pt}{40pt}{36pt} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-26 09:39:53
|
Revision: 1778 http://complement.svn.sourceforge.net/complement/?rev=1778&view=rev Author: complement Date: 2007-10-26 02:39:51 -0700 (Fri, 26 Oct 2007) Log Message: ----------- intercessor, request proxy from web server (scripting, as php) to reportware Added Paths: ----------- trunk/complement/explore/app/intercessor/ trunk/complement/explore/app/intercessor/Makefile trunk/complement/explore/app/intercessor/Makefile.inc trunk/complement/explore/app/intercessor/README trunk/complement/explore/app/intercessor/doc/ trunk/complement/explore/app/intercessor/doc/Bib.bib trunk/complement/explore/app/intercessor/doc/IntercessorSoftwareArchitecture.tex trunk/complement/explore/app/intercessor/doc/UseCaseSpec.tex trunk/complement/explore/app/intercessor/doc/intercessor-depl.fig trunk/complement/explore/app/intercessor/doc/intercessor-events.fig trunk/complement/explore/app/intercessor/doc/intercessor-layers.fig trunk/complement/explore/app/intercessor/doc/intercessor-obj.fig trunk/complement/explore/app/intercessor/doc/intercessor-time-neg.fig trunk/complement/explore/app/intercessor/doc/intercessor-time.fig trunk/complement/explore/app/intercessor/doc/rup.sty trunk/complement/explore/app/intercessor/http.cc trunk/complement/explore/app/intercessor/http.h trunk/complement/explore/app/intercessor/intercessor.cc trunk/complement/explore/app/intercessor/intercessor.h trunk/complement/explore/app/intercessor/intercessor_main.cc trunk/complement/explore/app/intercessor/server.cc trunk/complement/explore/app/intercessor/server.h trunk/complement/explore/app/intercessor/unit/ trunk/complement/explore/app/intercessor/unit/Makefile trunk/complement/explore/app/intercessor/unit/Makefile.inc trunk/complement/explore/app/intercessor/unit/dummy_srv.cc trunk/complement/explore/app/intercessor/unit/dummy_srv.h trunk/complement/explore/app/intercessor/unit/unit_test.cc Property changes on: trunk/complement/explore/app/intercessor ___________________________________________________________________ Name: svn:ignore + obj Added: trunk/complement/explore/app/intercessor/Makefile =================================================================== --- trunk/complement/explore/app/intercessor/Makefile (rev 0) +++ trunk/complement/explore/app/intercessor/Makefile 2007-10-26 09:39:51 UTC (rev 1778) @@ -0,0 +1,31 @@ +# -*- Makefile -*- Time-stamp: <07/02/21 15:30:24 ptr> + +SRCROOT := ../.. +# CoMT_DIR := ../external/complement/explore + +include Makefile.inc +include ${SRCROOT}/Makefiles/gmake/top.mak + +INCLUDES += -I${CoMT_INCLUDE_DIR} -I${BOOST_INCLUDE_DIR} +LDFLAGS += -L${INSTALL_LIB_DIR} -Wl,-rpath=${INSTALL_LIB_DIR} + +release-shared: LDLIBS = -lxmt -lsockios -lstem -lboost_regex -lboost_fs -lboost_program_options +dbg-shared: LDLIBS = -lxmtg -lsockiosg -lstemg -lboost_regexg -lboost_fsg -lboost_program_optionsg +stldbg-shared: LDLIBS = -lxmtstlg -lsockiosstlg -lstemstlg -lboost_regexstlg -lboost_fsstlg -lboost_program_optionsstlg + +check-shared: all-shared + $(MAKE) -C unit check || exit 1 + +check-release-shared: release-shared + $(MAKE) -C unit check-release-shared || exit 1 + +check-dbg-shared: dbg-shared + $(MAKE) -C unit check-dbg-shared || exit 1 + +ifndef WITHOUT_STLPORT +check-stldbg-shared: stldbg-shared + $(MAKE) -C unit check-stldbg-shared || exit 1 +endif + +depend:: + $(MAKE) -C unit depend Added: trunk/complement/explore/app/intercessor/Makefile.inc =================================================================== --- trunk/complement/explore/app/intercessor/Makefile.inc (rev 0) +++ trunk/complement/explore/app/intercessor/Makefile.inc 2007-10-26 09:39:51 UTC (rev 1778) @@ -0,0 +1,8 @@ +# -*- Makefile -*- + +PRGNAME = intercessor +SRC_CC = intercessor_main.cc \ + http.cc \ + intercessor.cc \ + server.cc + Added: trunk/complement/explore/app/intercessor/README =================================================================== --- trunk/complement/explore/app/intercessor/README (rev 0) +++ trunk/complement/explore/app/intercessor/README 2007-10-26 09:39:51 UTC (rev 1778) @@ -0,0 +1,50 @@ +This is intercessor, request proxy from php to reportware. + +Options: + -h [ --help ] print help message + -p [ --port=] arg (=8080) listen port (default 8080) + -s [ --save ] arg store uploaded stream to files in this catalog (default none) + -t [ --timeout=] arg (=3) timeout for response from ReportWare Server, seconds (default 3) + -d [ --daemon ] become daemon + +Compilation (on fresh commit): + +./configure +make + +The results will be in build/bin and build/lib +For installation you will need following files: + +build/bin: +intercessor* + +build/lib: following command give you names of required files + +ldd build/bin/intercessor | grep /build/lib/ | awk '{ v = system( "readlink " $3); b = system( "basename " $3 ); }' + +If you developer, and and use 'svn update', following make tags may be useful for you: +make check --- Build and run all possible unit tests for libraries and applications + related to 'intercessor' application. + +make depend --- calculate build dependencies + +make clean --- Delete object files, intermediate depenedency files + that are created by building the program. However, + don't delete the files that record the configuration. + Also preserve dependencies file, tags files and resulting + program or library. + +make distclean --- Same as 'clean' plus delete resulting program(s) or + libraie(s) files, dependencies file and directories that + used for compilation and linking (directories should be + empty at this stage). `make distclean' should leave only + the files that were in the distribution. + + +Projects, that was used in 'intercessor': + - Boost (http://www.boost.org) [program_options, regex, filesystem, test] + - STLport (http://stlport.sourceforge.net) + - Complement (http://complement.sourceforge.net) [xmt, sockios, StEM, Makefiles] + +Architecture desicions and more complete documentation you can found in +doc/IntercessorSoftwareArchitecture.pdf Property changes on: trunk/complement/explore/app/intercessor/doc ___________________________________________________________________ Name: svn:ignore + *.log *.aux *.toc *.dvi *.bbl *.blg *.out *.bak Added: trunk/complement/explore/app/intercessor/doc/Bib.bib =================================================================== --- trunk/complement/explore/app/intercessor/doc/Bib.bib (rev 0) +++ trunk/complement/explore/app/intercessor/doc/Bib.bib 2007-10-26 09:39:51 UTC (rev 1778) @@ -0,0 +1,62 @@ +@misc { + RFC2616, + author = "R. Fielding and J. Gettys and J. Mogul and H. Frystyk and L. Masinter and P. Leach and T. Berners-Lee", + title = "{RFC} 2616. {H}ypertext {T}ransfer {P}rotocol --- {HTTP}/1.1", + howpublished = "Website", + year = {1999}, + note = "\url{http://www.w3.org/Protocols/rfc2616/rfc2616.html}" +} + +@misc { + ComplementProject, + author = "Petr Ovtchenkov", + title = "``{C}omplement'' project", + howpublished = "Website", + year = {2007}, + note = "\url{http://complement.sourceforge.net}" +} + +@misc { + BoostProject:filesystem, + author = "Beman Dawes", + title = "``{B}oost'', {F}ilesystem", + howpublished = "Website", + year = {2005}, + note = "\url{http://www.boost.org/libs/filesystem/doc/index.htm}" +} + +@misc { + BoostProject:programoptions, + author = "Vladimir Prus", + title = "``{B}oost'', {P}rogram {O}ptions", + howpublished = "Website", + year = {2004}, + note = "\url{http://www.boost.org/doc/html/program_options.html}" +} + +@misc { + BoostProject:regex, + author = "John Maddock", + title = "``{B}oost'', {R}eg{E}x", + howpublished = "Website", + year = {2004}, + note = "\url{http://www.boost.org/libs/regex/doc/index.html}" +} + +@misc { + BoostProject:testutf, + author = "Gennadiy Rozental", + title = "``{B}oost'', {U}nit {T}est {F}ramework", + howpublished = "Website", + year = {2005}, + note = "\url{http://www.boost.org/libs/test/doc/components/utf/index.html}" +} + +@misc { + STLportProject, + author = "Boris Fomitchev and Francois Dumont and Petr Ovtchenkov", + title = "{STL}port", + howpublished = "Website", + year = {2006}, + note = "\url{http://stlport.sourceforge.net}" +} Added: trunk/complement/explore/app/intercessor/doc/IntercessorSoftwareArchitecture.tex =================================================================== --- trunk/complement/explore/app/intercessor/doc/IntercessorSoftwareArchitecture.tex (rev 0) +++ trunk/complement/explore/app/intercessor/doc/IntercessorSoftwareArchitecture.tex 2007-10-26 09:39:51 UTC (rev 1778) @@ -0,0 +1,720 @@ +% -*- LaTeX -*- + +\documentclass[a4paper,twoside]{article} + +% \usepackage[koi8-r]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[pdftex]{graphics} +\usepackage{pslatex} +% \usepackage[dvips,final]{epsfig} +% \usepackage{cm-super} +\usepackage[colorlinks,urlcolor=blue]{hyperref} +\usepackage{url} +\usepackage{rup} + +%% Define a new 'leo' style for the package that will use a smaller font. +\makeatletter +\def\url@leostyle{% + \@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\small\ttfamily}}} +\makeatother +%% Now actually use the newly defined style. +\urlstyle{leo} + +\version{1.2} +\title{Software Architecture Document} + +\project{Intercessor} + +\RevHistory{% +19 Feb 2007 & 1.0 & Initial document & Petr Ovtchenkov \cr \hline +05 Mar 2007 & 1.1 & Functionality changes: early error processing added & Petr Ovtchenkov \cr \hline +07 Mar 2007 & 1.2 & Detailed error codes & Petr Ovtchenkov \cr \hline +} + +\newcommand{\Inter}{{\fontseries{b}\selectfont ``Intercessor''}} + +\begin{document} + +\maketitle + +% [Note: The following template is provided for use with the +% Rational Unified Process. Text enclosed +% in square brackets and displayed in blue italics is included +% to provide guidance to the author and should be deleted before publishing the +% document. A paragraph entered following this style will automatically be set to +% normal.] + +% toc +\tableofcontents + +\section{Introduction} + +% [The introduction of the Software Architecture +% Document should provide an overview of the entire Software +% Architecture Document. It should include the purpose, scope, +% definitions, acronyms, abbreviations, references, and overview of the Software +% Architecture Document.] + +\subsection{Purpose} + +This document provides a comprehensive architectural overview of the \Inter{} server, using a +number of different architectural views to depict different aspects of the +\Inter{}. It is intended to capture and +convey the significant architectural decisions which have been made on the +system. + +\subsection{Scope} + +Software Architecture Document applies to \Inter{} proxy server, +middleware that help +to publish reports related to some server via Web service. + +\subsection{Definitions, Acronyms and Abbreviations} + +% [This subsection should provide the definitions of all terms, +% acronyms, and abbreviations required to properly interpret the Software +% Architecture Document. This information may be provided by +% reference to the project Glossary.] +\begin{description} + \item[HTTP] Hypertext Transfer Protocol + \item[TCP/IP] Transmission Control Protocol and the Internet Protocol (the set of network communications protocols) + \item[URL] Universal Resource Locator + \item[LWP] LightWeight Process + \item[SMP] Symmetrical MultiProcessing + \item[OE] Operational Environment + \item[EDA] Event-Driven Architecture + \item[POSIX] Portable Operating System Interface + \item[BSD] Berkeley Software Distribution + \item[pid] Process ID +\end{description} + +\subsection{References} + +\bibliographystyle{plain} +\bibliography{Bib} + +\subsection{Overview} + +% [This subsection should describe what the rest of the Software +% Architecture Document contains and explain how the Software +% Architecture Document is organized.] + +Following Software Architecture Document consider \Inter{} design and usage from various +points of view (sections~\ref{ArchRep}--\ref{DataView}), performance (section~\ref{SizePerf}) and +aspects of self-testing and quality of \Inter{} (section~\ref{Quality}). + +\section{Architectural Representation\label{ArchRep}} + +% [This section describes what software architecture is for the +% current system, and how it is represented. Of the Use-Case, Logical, +% Process, Deployment, and Implementation +% Views, it enumerates the views that are necessary, and for each view, +% explains what types of model elements it contains.] + +Architectural Representation illustrates \Inter{} design from various aspects: +goals (section~\ref{ArchGoals}), usage (section~\ref{UCView}), logical decomposition (section~\ref{LogicalView}), +concurrency (section~\ref{ProcessView}), deployment (section~\ref{DeplView}), implementation (section~\ref{ImplView}). + +Software Architecture Document contains description of project goals and constraints (section~\ref{ArchGoals}). + +Section~\ref{UCView} shows intended usage of this software and explains why this software +needed. + +Section~\ref{LogicalView} demonstrates the logical position of this software and +interaction with neighbours. + +Section~\ref{ProcessView} focuses on the processes and LWP, this may give useful info for running +this software on SMP OE and estimations of performance scaling of this software. + +Section~\ref{DeplView} describes what shipped within this software, OE requirements +for proper functionality and how to integrate this software into production. + +Section~\ref{ImplView} demonstrates how \Inter{} was implemented. It includes horizontal +and vertical decomposition. + +\section{Architectural Goals and Constraints\label{ArchGoals}} + +Request from some server Web interface to some report generation server +may take a some (unpredictable) time. Because of time restrictions for answer +on Web server side, we need to complete request in a short time, and allow +to read complete result (when it will be ready) in another request. + +There are unconfirmed information, that ReportWare Server accept only \verb|POST| requests. + +It is known, that body of request MUST be XML request (see section~\ref{DataView} for +request sample), otherwise ReportWare Server drop connection without any response. + +Some problems (like wrong ReportWare server URL, bad request content, ans so on) may produce empty response or quick negative response. +It will be good if script on Web Server side receive negative response in such +cases immediately. + +If the error is reported by ReportWare Server, \Inter{} should immediately return +all the ReportWare Server response in addition to error code. + + + +% [This section describes the software requirements and +% objectives that have some significant impact on the architecture, for example, +% safety, security, privacy, use of an off-the-shelf product, portability, +% distribution, and reuse. It also captures the special constraints that may +% apply: design and implementation strategy, development tools, team structure, +% schedule, legacy code, and so on.] + +\section{Use-Case View\label{UCView}} + +Client makes request for report generation. Because report generation takes +some time, and connection between client and web server may be lost during +report generation, client sees something like ``Waiting...'' and then, after +some time, browser refreshes page and user will see report (or error message). + +\subsection{Use-Case Realizations} + +%[This section illustrates how the software actually works by +%giving a few selected use-case (or scenario) realizations, and explains how the +%various design model elements contribute to their functionality.] + +Script running within scope of Web server forward request to \Inter. +\Inter{} validate request and re-translate request to ReportWare server. +If request from script was ill-formed, \Inter{} give negative response to script; +otherwise it gives positive response. + +\Inter{} asynchronously transmit request to ReportWare Server, read response and +save content of the response to a file. + +Script, running within scope of Web server, may check file with ReportWare response +some time later and deliver content (may be after additional processing) to user, +within separate HTTP-request from Web browser to Web Server. + +\section{Logical View\label{LogicalView}} + +% [This section describes the architecturally significant parts +% of the design model, such as its decomposition into subsystems and packages. +% And for each significant package, its decomposition into classes and class +% utilities. You should introduce architecturally significant classes and +% describe their responsibilities, as well as a few very important relationships, +% operations, and attributes.] + +\subsection{Overview} + +The \Inter{} looks like HTTP proxy, but has significant difference: content +delivery isn't transparent for script. + +\Inter{} accept request from script, validate this request, and forward request +(as event) to object responsible for communication with ReportWare Server (fig.~\ref{IntercessorObjDiagram}). +This object check +the ability to perform request and sends it to ReportWare Server. If this object +see positive HTTP response from ReportWare Server (i.e. request was accepted by ReportWare Server) +within time limit (3 seconds), it notify script about success (fig.~\ref{IntercessorTimeDiagram}); otherwise it +notify script about request failure (fig.~\ref{IntercessorTimeDiagramNeg}). + +The content, received from +ReportWare Server, will be stored in special catalog under name, was specified in initial +request (fig.~\ref{IntercessorObjDiagram}, \ref{IntercessorTimeDiagram}). + +% [This subsection describes the overall decomposition of the +% design model in terms of its package hierarchy and layers.] + +\begin{figure} +\begin{center} +% \input intercessor-obj.pstex_t +% \resizebox{3in}{!}{\includegraphics{intercessor-obj.pdf}} +\scalebox{0.8}{\includegraphics{intercessor-obj.pdf}} +\end{center} +\caption{Position of \Inter{}, data flow and objects interaction diagram.\label{IntercessorObjDiagram}} +\end{figure} + +\begin{figure} +\begin{center} +% \input intercessor-time.pstex_t +\scalebox{0.8}{\includegraphics{intercessor-time.pdf}} +\end{center} +\caption{Position of \Inter{}, time diagram.\label{IntercessorTimeDiagram}} +\end{figure} + +\begin{figure} +\begin{center} +\scalebox{0.8}{\includegraphics{intercessor-time-neg.pdf}} +\end{center} +\caption{Position of \Inter{}, time diagram. Behaviour when response from ReportWare Server come beyond expected time interval.\label{IntercessorTimeDiagramNeg}} +\end{figure} + +\subsection{Architecturally Significant Design Packages} + +\subsubsection{``Boost'' project, filesystem} + +``Filesystem'' (\cite{BoostProject:filesystem}) provide facilities to query and manipulate paths, files, and directories. + +\subsubsection{``Boost'' project, program options} + +``Program Options'' (\cite{BoostProject:programoptions}) provide convenient +and uniform way for command line options processing. + +\subsubsection{``Boost'' project, regex} + +``RegEx'' (\cite{BoostProject:regex}) implements fast and rich regular expressions +implementation; it used in HTTP protocol implementation. + +\subsubsection{``Boost'' project, unit test framework} + +``Unit Test Framework'' (\cite{BoostProject:testutf}) used for unit test of \Inter{}. + +\subsubsection{STLport} + +STLport (\cite{STLportProject}) used for effective STL implementation +and important extentions to base STL (access to file descriptor in fstreams---useful utilities from ``Complement'' project \cite{ComplementProject}). + +\subsubsection{``Complement'' project} + +``Complement'' project (\cite{ComplementProject}) provide high level of abstraction for multi-thread programming, +IPC, work with BSD sockets and EDA paradigm implementation. + + +% +% +%[For each significant package, include a subsection with its +%name, its brief description, and a diagram with all significant classes and +%packages contained within the package. +% +%For each significant class in the package, include its name, +%brief description, and, optionally a description of some of its major +%responsibilities, operations and attributes.] + +\section{Process View\label{ProcessView}} + +% [This section describes the system's decomposition into +% lightweight processes (single threads of control) and heavyweight processes +% (groupings of lightweight processes). Organize the section by groups of +% processes that communicate or interact. Describe the main modes of +% communication between processes, such as message passing, interrupts, and +% rendezvous.] + +\Inter{} was designed as multi-threaded server. The number of threads is restricted +in the connection processing server (\verb|sockios|, \cite{ComplementProject}) and +depends upon intensity of requests to server. Default threads limit is 32 (for HTTP-server +part of \Inter{}). + +The ``client'' part of \Inter{} is based on event-driven architecture (\verb|stem|, \cite{ComplementProject}). +It take at least 2 threads. + +\Inter{} may be run as daemon (\verb|-d| or \verb|--daemon| option for \verb|intercessor|). + +\section{Deployment View\label{DeplView}} + +\subsection{Repository} + +Commit project from SVN repository. + +\subsection{Build} + +\begin{verbatim} +(cd intercessor; ./configure; make) +\end{verbatim} + +\subsection{Check build\label{DeplCheck}} + +Run unit tests of all components of \Inter{}: +\begin{verbatim} +(cd intercessor; make check 2>&1) | tee int.log +grep -ie "\(error\)\|\(fail\)" int.log | grep -v exec_fail +\end{verbatim} +Check that result contain only ``\verb|*** No errors detected|'' (or ``\verb|**** no errors detected|'') records. + +For deployment you will need: +\begin{itemize} + \item binary \verb|intercessor/build/bin/intercessor| + \item shared libraries listed as result of output + \verb+v=`ldd intercessor/build/bin/intercessor | \+ \\ + \verb+grep intercessor/build/lib | \+ \\ + \verb+awk '{ print $3 "*"; }'`; for f in $v; do echo $f; done+ ' % $ +% \item files listed as result of output \verb=ldd intercessor/build/bin/intercessor | \= \\ +% \verb=grep intercessor/build/lib | \= \\ +% \verb=awk '{ print $3 "*"; }' | xargs /bin/sh -c 'ls $@'= +\end{itemize} + +\subsection{Deployment} + +\begin{figure} +\begin{center} +% \input intercessor-depl.pstex_t +\scalebox{0.8}{\includegraphics{intercessor-depl.pdf}} +\end{center} +\caption{\Inter{} deployment.\label{IntercessorDeplDiagram}} +\end{figure} + +\Inter{} should be installed so it can share same filesystem as scripts +running in the Web Server space (see fig.~\ref{IntercessorDeplDiagram}). The place for stored files should +be accessible from scripts running in the Web Server space. By security +reasons, this catalog shouldn't be used for other purposes. + +\Inter{} should has ability to connect to ReportWare Server via TCP/IP connection. + +\Inter{} should has ability to listen one TCP port. + +Libraries that shipped with \Inter{} should be searchable by loader: +ones should be situated either in catalogs mentioned in \verb|/etc/ld.so.conf| +or in catalogs from \verb|LD_LIBRARY_PATH| environment variable. You can check +that all libraries accessible with \verb|ldd intercessor|. The dynamic libraries, +that was built within \Inter{} project are: +\begin{itemize} + \item \verb|libxmt.so.1.10| + \item \verb|libsockios.so.1.11| + \item \verb|libstem.so.4.4| + \item \verb|libboost_regex.so.1.33| + \item \verb|libboost_fs.so.1.33| + \item \verb|libboost_program_options.so.1.33| + \item \verb|libstlport.so.5.2| +\end{itemize} + +Unit test (\verb|ut_intercessor|) required additional libraries: +\begin{itemize} + \item \verb|libboost_test_utf.so.1.33| +\end{itemize} + +Available options for \Inter{}: +\begin{itemize} + \item \verb|-h|, \verb|--help| print help message; + \item \verb|-d|, \verb|--daemon| start as daemon (detach from terminal); + \item \verb|-p number|, \verb|--port=number| listen TCP port for incoming requests, default 8080; + \item \verb|-s catalog|, \verb|--save=catalog| save content from ReportWare in this catalog (no default value) + \item \verb|-t number|, \verb|--timeout=number| timeout for response from ReportWare Server, seconds (default 3) +\end{itemize} + +\subsection{Deployment check} + +Start \Inter{} daemon: +\begin{verbatim} +intercessor -p 8095 -s /tmp -d +\end{verbatim} + +Simulate the request from script with \verb|curl|: +\begin{verbatim} +curl -x localhost:8095 -H "X-API-ReportFileName: test.xxx" \ +-d 'xmlrequest=<?xml version="1.0"?>\ +<RWRequest><REQUEST domain="network" service=\"ComplexReport" nocache="n" \ +contact_id="1267" entity="1" filter_entity_id="1" \ +clientName="ui.ent"><ROWS><ROW type="group" priority="1" ref="entity_id" \ +includeascolumn="n"/><ROW type="group" priority=\"2" \ +ref="advertiser_line_item_id" includeascolumn="n"/><ROW type="total"/></ROWS><COLUMNS> \ +<COLUMN \ +ref="advertiser_line_item_name"/><COLUMN ref="seller_imps"/><COLUMN \ +ref="seller_clicks"/><COLUMN ref="seller_convs"/><COLUMN \ +ref="click_rate"/><COLUMN ref="conversion_rate"/><COLUMN ref="roi"/><COLUMN \ +ref="network_revenue"/><COLUMN ref="network_gross_cost"/><COLUMN \ +ref="network_gross_profit"/><COLUMN ref="network_revenue_ecpm"/><COLUMN \ +ref="network_gross_cost_ecpm"/><COLUMN \ +ref="network_gross_profit_ecpm"/></COLUMNS><FILTERS><FILTER ref="time" \ +macro="yesterday"/></FILTERS></REQUEST></RWRequest>' http://ses0316:8080/rpt +\end{verbatim} +Here is assumed that \Inter{} listen TCP port 8095 on \verb|localhost|, URL of ReportWare Server assumed as \verb|http://ses0316:8080/rpt|. + +Check files \verb|/tmp/test.xxx| and \verb|/tmp/test.xxx.head|. It have to had non-zero +sizes. Content of this files should be like mentioned in section~\ref{DataView}. +If no such files, but present files like \verb|/tmp/test.xxx.DpPXyR| +and \verb|/tmp/test.xxx.head.Ua6Gw3|, then no ReportWare Server on requested URL. + +Stop intercessor: +\begin{verbatim} +pkill -TERM intercessor +\end{verbatim} + +\section{Implementation View\label{ImplView}} + +% [This section describes the overall structure of the +% implementation model, the decomposition of the software into layers and +% subsystems in the implementation model, and any architecturally significant +% components.] + +\subsection{Overview} + +\Inter{} contains two functional blocks: +\begin{itemize} + \item HTTP server; it accepts HTTP requests from Web Server scripts; + \item HTTP client; it makes request to ReportWare Server and process response from it. +\end{itemize} + +% [This subsection names and defines the various layers and +% their contents, the rules that govern the inclusion to a given layer, and the +% boundaries between layers. Include a component diagram that shows the relations +% between layers. ] + +Implementation of \Inter{} based on following abstraction layers: +\begin{itemize} + \item http---basic HTTP protocol implementation, suitable for use with C{+}{+} iostreams; + \item StEM---C{+}{+} implementation of EDA; + \item sockios---client and server working on top of tcp sockets; + \item xmt---multi-thread and few core IPC techniques; + \item BSD sockets; + \item POSIX threads. +\end{itemize} + +\subsection{Functional blocks} + +\begin{figure} +\begin{center} +\scalebox{0.8}{\includegraphics{intercessor-events.pdf}} +\end{center} +\caption{Logical blocks of \Inter{}, events diagram.\label{IntercessorEventsDiagram}} +\end{figure} + +\subsubsection{HTTP server\label{HTTPsrv}} + +Base name of file where content of ReportWare response will be stored +passed by script in the HTTP header \verb|X-API-ReportFileName|. +This header is also used for request validation. If this header absents, +or value in this header contains symbols except alphanumeric, dot and +underscore, the request will be rejected and not translated to ReportWare. +In this case return code will be 412, ``Precondition Failed''. + +\Inter{} accepts only \verb|POST| or \verb|GET| requests, otherwise return +code will be 405, ``Method Not Allowed''. + +If HTTP request looks good, \Inter{} return code 202 ``Accepted'' with zero-length +content. + +\begin{table}[h] + \centering + \begin{tabular}{c|l|p{3in}} + \hline + {\fontseries{b}\selectfont Code} & {\fontseries{b}\selectfont\hfil HTTP meaning} & {\fontseries{b}\selectfont\hfil Description} \\ + \hline + 202 & Accepted & request accepted and retransmitted to ReportWare Server; ReportWare Server give positive HTTP response \\ + \hline + 405 & Method Not Allowed & HTTP command was not \verb|GET| or \verb|POST| \\ + \hline + 412 & Precondition Failed & in the HTTP request + was missed HTTP header \verb|X-API-ReportFileName|, or value of + HTTP header \verb|X-API-ReportFileName| contain symbol that not alphanumeric, + dot or underscore or file(s) mentioned in \verb|X-API-ReportFileName| already exists \\ + \hline + 503 & Service Unavailable & response from ReportWare Server was negative \\ + \hline + 504 & Gateway Timeout & response from ReportWare Server + not received within expected timeout interval (3 seconds by default) \\ + \hline + \end{tabular} + \caption{Summary of codes, that may be returned to script.\label{HTTPcodes}} +\end{table} + +After validation of incoming request, it forwarded (as asynchronous event) +to HTTP client logical block of \Inter{} and waiting positive or negative response from it. +If response was positive (ReportWare Server give positive HTTP response within 3 seconds), +the positive response will be returned to origin of initial request. If the response was +negative, \Inter{} will return to origin of initial request the negative response of ReportWare Server as is. +If \Inter{} don't take response within 3 seconds interval, \Inter{} will return +to origin of initial request the negative response 504 ``Gateway Timeout'' (see fig.~\ref{IntercessorEventsDiagram}). + +Summary of HTTP codes, that \Inter{} may return, shown in table~\ref{HTTPcodes}. + +Motivation to return 202 code on success instead of ``200 Ok'', follow from +\href{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.3}{item 10.2.3 of RFC~2616} \cite{RFC2616}: + +\begin{quotation} + \noindent{\bfseries 10.2.3 202 Accepted} + + The request has been accepted for processing, but the processing + has not been completed. The request might or might not eventually + be acted upon, as it might be disallowed when processing actually + takes place. There is no facility for re-sending a status code + from an asynchronous operation such as this. + + The 202 response is intentionally non-committal. Its purpose is + to allow a server to accept a request for some other process + (perhaps a batch-oriented process that is only run once per day) + without requiring that the user agent's connection to the server + persist until the process is completed. The entity returned with + this response SHOULD include an indication of the request's current + status and either a pointer to a status monitor or some estimate + of when the user can expect the request to be fulfilled. +\end{quotation} + + +\subsubsection{HTTP client\label{HTTPcli}} + +HTTP client logical block check, that there is no files in specified catalog (option \verb|-s|) +with names like specified in \verb|X-API-ReportFileName| header (neither file with name as value from \verb|X-API-ReportFileName| +header, nor file with name as value from \verb|X-API-ReportFileName| header plus ``\verb|.head|''). +If such files was found, the request discarded. + +HTTP client logical block create two files (in specified catalog, with names mentioned above) and +open its for writing. If this procedure was failed, the request discarded. + +HTTP client logical block use HTTP header \verb|Host| to detect URL of ReportWare Server. +This is like all HTTP proxy do. + +\Inter{} connect to ReportWare Server (using URL from \verb|Host|, as mentioned above) +and send to it the same request, as was received from Web Server script, except +\verb|X-API-ReportFileName| header and \verb|Proxy-Connection| header. + +During processing response from ReportWare Server \Inter{} split HTTP headers from content, +and process content in accordance with HTTP protocol. + +When \Inter{} see the code of HTTP response from ReportWare, it detect that response was +positive or negative and inform HTTP server logical block of \Inter{} via asynchronous event (see fig.~\ref{IntercessorEventsDiagram}). + +\subsection{Vertical Layers} + +Figure~\ref{IntercessorLayersDiagram} demonstrates decomposition of \Inter{}'s implementation into vertical layers. Layers 'complement', C++ and 'system' are external to this project. + +% [For each layer, include a subsection with its name, an +% enumeration of the subsystems located in the layer, and a component diagram.] +\begin{figure} +\begin{center} +% \input intercessor-depl.pstex_t +\scalebox{0.8}{\includegraphics{intercessor-layers.pdf}} +\end{center} +\caption{\Inter{} design, implementation layers.\label{IntercessorLayersDiagram}} +\end{figure} + +\subsubsection{Intercessor} + +Application is based on BSD sockets server and client, implemented in \verb|sockios| +(\ref{sockios}) and HTTP protocol implementation (\ref{httpproto}). + +\subsubsection{HTTP protocol\label{httpproto}} + +Due to HTTP protocol is text-based, it may be effectively implemented +on top of C++ \verb|istream|/\verb|ostream|. + +\subsubsection{EDA implementation\label{StEM}} + +EDA implemented in \verb|StEM| library (part of \cite{ComplementProject}). + +\subsubsection{BSD TCP sockets, client and server\label{sockios}} + +BSD sockets server and client implemented in \verb|sockios| library, part of +\cite{ComplementProject}. It is based on +multi-threading server concept and use \verb|xmt| (\ref{xmt}) library. + +\subsubsection{Threads and IPC\label{xmt}} + +Deal with threads, synchronization primitives and IPC methods +is encapsulated in \verb|xmt| library, part of \cite{ComplementProject}. + +\subsubsection{System} + +Underling level is ordinary POSIX-like OE with POSIX threads and BSD +sockets. Any modern Linux acceptable. + +\section{Data View\label{DataView}} + +Raw HTTP request from Web Server script (every line is ended with CR/LF pair). +\begin{verbatim} +POST http://localhost:8090/test.php HTTP/1.1 +Host: localhost:8090 +X-API-ReportFileName: test.xxx +Content-Length: 890 + +xmlrequest=<?xml version="1.0"?> +<RWRequest><REQUEST domain="network" service="ComplexReport" nocache="n" +contact_id="1267" entity="1" filter_entity_id="1" +clientName="ui.ent"><ROWS><ROW type="group" priority="1" ref="entity_id" +includeascolumn="n"/><ROW type="group" priority="2" +ref="advertiser_line_item_id" includeascolumn="n"/><ROW type="total"/></ROWS> +<COLUMNS><COLUMN +ref="advertiser_line_item_name"/><COLUMN ref="seller_imps"/><COLUMN +ref="seller_clicks"/><COLUMN ref="seller_convs"/><COLUMN +ref="click_rate"/><COLUMN ref="conversion_rate"/><COLUMN ref="roi"/><COLUMN +ref="network_revenue"/><COLUMN ref="network_gross_cost"/><COLUMN +ref="network_gross_profit"/><COLUMN ref="network_revenue_ecpm"/><COLUMN +ref="network_gross_cost_ecpm"/><COLUMN +ref="network_gross_profit_ecpm"/></COLUMNS><FILTERS><FILTER ref="time" +macro="yesterday"/></FILTERS></REQUEST></RWRequest> +\end{verbatim} + +Content of file with headers from ReportWare Server response (\verb|test.xxx.head|, for +request above): +\begin{verbatim} +HTTP/1.1 200 Ok +Server: Apache-Coyote/1.1 +Content-Type: text/html;charset=ISO-8859-1 +Content-Length: 8132 +Date: Sun, 18 Feb 2007 16:22:04 GMT + +\end{verbatim} + +Content of file with data from ReportWare Server response (\verb|test.xxx|, for +request above): +\begin{verbatim} +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <title>Apache Tomcat/5.5.20</title> + <style type="text/css"> + /*<![CDATA[*/ + body { + color: #000000; +... + + </tr> +</table> + +</body> +</html> +\end{verbatim} + + +% [A description of the persistent data storage perspective of +% the system. This section is optional if there is little or no persistent data, +% or the translation between the Design Model and the Data Model is trivial.] + +\section{Size and Performance\label{SizePerf}} + +% [A description of the major dimensioning characteristics of +% the software that impact the architecture, as well as the target performance +% constraints.] + +At present time no sure information about size of indicative requests and +responses. + +The perforamance aspects unknown too: intensity of requests unfortunately +not evident too. + +\section{Quality\label{Quality}} + +% [A description of how the software architecture contributes +% to all capabilities (other than functionality) of the system: extensibility, +% reliability, portability, and so on. If these characteristics have special +% significance, for example safety, security or privacy implications, they should +% be clearly delineated.] + +The unit tests for all components involved ('check' procedure, section~\ref{DeplCheck}) +allow to detect problem on early stage. But this tests don't make massive testing, +testing with real scripts and real ReportWare Server\footnote{Test with real +ReportWare Server available, but there are difficulties with rest of test infrastructure.}. + +\Inter{} may be used for requests logging, signaling and other notifications, including +notifications about some events. This functionality +may be added relatively easy, because of asynchronous nature of \Inter{} architecture. + +% reliability + +% No requirements for reliability?! + +% portability + +No special requirements for portability. Expected, that code of \Inter{} and related +components will be compiled and run under any POSIX-compliant architecture. + +% safety + +The aspects of authentication, validation of data, safety of stored files should be taken into +account during administration of the OE, and not considered within scope of \Inter{} server. + +\subsection{Known restrictions and bugs} + +At present time known following potential problems: +\begin{itemize} + \item HTTP header \verb|Keep-Alive| is not taken into account; + \item persistent connection is not supported; this is normal for connection with + WebServer script, but may be treated as drawback in connection with + ReportWare server (extra load on ReportWare server); + \item HTTP protocol is announced as HTTP 1.1, but not all protocol issues were implemented, + and switching to HTTP 1.0 was not considered; + \item \Inter{} when become daemon, don't save own pid in any file; this may be not very convenient + for administration and monitoring. +\end{itemize} + +\end{document} Added: trunk/complement/explore/app/intercessor/doc/UseCaseSpec.tex =================================================================== --- trunk/complement/explore/app/intercessor/doc/UseCaseSpec.tex (rev 0) +++ trunk/complement/explore/app/intercessor/doc/UseCaseSpec.tex 2007-10-26 09:39:51 UTC (rev 1778) @@ -0,0 +1,76 @@ +% -*- LaTeX -*- +% $Id: UseCaseSpec.tex,v 1.1 2002/11/04 10:54:23 ptr Exp $ + +\documentclass[a4paper,twoside]{article} + +\usepackage{rup} + +\title{Use-Case-Realization Specification: ``Use-Case Name''} + +\project{Virtual Manual} +% \RevHistory{dd/mmmm/yyyy & x.x & & \cr \hline} + +\begin{document} + +\maketitle + +\section{Introduction} + +[The introduction of the Use-Case Realization Specification +should provide an overview of the entire document. It should include the +purpose, scope, definitions, acronyms, abbreviations, references, and overview +of this Use-Case Realization Specification.] + +[Note: This document template assumes that the use-case +realization is partly described within a Rational Rose model; this means that +the use case's name and brief description is within the Rose model, and that +this document should be linked as an external file to the use case. This +document should contain additional properties of the use-case realization that +are not in the Rose model.] + +\subsection{Purpose} + +[Specify the purpose of this Use-Case Realization Specification] + +\subsection{Scope} + +[A brief description of the scope of this Use-Case +Realization Specification; what Use Case model(s) it is associated with, +and anything else that is affected or influenced by this document.] + +\subsection{Definitions, Acronyms and Abbreviations} + +[This subsection should provide the definitions of all terms, +acronyms, and abbreviations required to properly interpret the Use-Case +Realization Specification. This information may be provided by +reference to the project Glossary.] + +\subsection{References} + +[This subsection should provide a complete list of all +documents referenced elsewhere in the Use-Case Realization Specification. +Each document should be identified by title, +report number (if applicable), date, and publishing organization. Specify the sources from which the +references can be obtained. This information may be provided by reference to an +appendix or to another document.] + +\subsection{Overview} + +[This subsection should describe what the rest of the Use-Case +Realization Specification contains and explain how the document is +organized.] + +\section{Flow of Events Design} + +[A textual description of how the use case is realized in +terms of collaborating objects. Its main purpose is to summarize the diagrams +connected to the use case and to explain how they are related.] + +\section{Derived Requirements} + +[A textual description that collects all requirements, such +as non-functional requirements, on the use-case realizations that are not +considered in the design model, but that need to be taken care of during +implementation.] + +\end{document} Added: trunk/complement/explore/app/intercessor/doc/intercessor-depl.fig =================================================================== --- trunk/complement/explore/app/intercessor/doc/intercessor-depl.fig (rev 0) +++ trunk/complement/explore/app/intercessor/doc/intercessor-depl.fig 2007-10-26 09:39:51 UTC (rev 1778) @@ -0,0 +1,106 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +0 32 #868286 +0 33 #c7c3c7 +0 34 #e7e3e7 +0 35 #808080 +0 36 #c0c0c0 +0 37 #e0e0e0 +0 38 #8e8e8e +0 39 #8e8f8e +0 40 #444444 +0 41 #868686 +0 42 #c7c7c7 +0 43 #e7e7e7 +0 44 #f7f7f7 +0 45 #9e9e9e +0 46 #717571 +0 47 #414541 +0 48 #757575 +0 49 #414141 +0 50 #effbff +0 51 #404040 +0 52 #f3f3f3 +0 53 #aaaaaa +0 54 #555555 +0 55 #d7d3d7 +0 56 #aeaaae +0 57 #c2c2c2 +0 58 #303030 +0 59 #515551 +0 60 #f7f3f7 +0 61 #666666 +0 62 #717171 +0 63 #c6b797 +0 64 #eff8ff +0 65 #dccba6 +0 66 #d7d7d7 +0 67 #aeaeae +0 68 #bebebe +0 69 #515151 +0 70 #000049 +0 71 #797979 +0 72 #303430 +0 73 #c7b696 +6 1650 2250 2925 2775 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1650 2250 2925 2250 2925 2775 1650 2775 1650 2250 +4 1 0 50 -1 4 10 0.0000 0 120 780 2325 2550 Intercessor\001 +-6 +6 4950 2250 6075 2775 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4950 2250 6075 2250 6075 2775 4950 2775 4950 2250 +4 1 0 50 -1 4 10 0.0000 0 120 810 5550 2550 Web Server\001 +-6 +6 3720 3825 4200 4725 +5 1 0 1 -1 7 80 0 20 0.000 0 1 0 0 3960.000 4185.000 3720 4635 3960 4695 4200 4635 +5 1 0 1 -1 7 80 0 20 0.000 0 1 0 0 3960.000 3465.000 3720 3915 3960 3975 4200 3915 +5 1 0 1 -1 7 80 0 20 0.000 0 1 0 0 3960.000 3585.000 3720 4035 3960 4095 4200 4035 +5 1 0 1 -1 7 80 0 20 0.000 0 1 0 0 3960.000 3705.000 3720 4155 3960 4215 4200 4155 +5 1 0 1 -1 7 81 0 20 0.000 0 1 0 0 3960.000 4365.000 4200 3915 3960 3855 3720 3915 +2 1 0 1 -1 7 80 0 20 0.000 0 0 7 0 0 2 + 4200 4635 4200 3915 +2 1 0 1 -1 7 80 0 20 0.000 0 0 7 0 0 2 + 3720 3915 3720 4635 +2 2 0 0 -1 7 81 -1 20 0.000 0 0 -1 0 0 5 + 3720 3915 4200 3915 4200 4635 3720 4635 3720 3915 +-6 +6 1650 600 2850 1050 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1650 600 2850 600 2850 1050 1650 1050 1650 600 +4 1 0 50 -1 4 10 0.0000 0 150 825 2250 900 ReportWare\001 +-6 +6 5025 675 6000 1050 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 5025 675 6000 675 6000 1050 5025 1050 5025 675 +4 1 0 50 -1 4 10 0.0000 0 120 585 5550 900 Browser\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2400 2775 3675 3900 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4200 3900 5550 2775 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 1 4 + 0 0 1.00 60.00 120.00 + 0 0 1.00 60.00 120.00 + 5400 1050 5400 1650 5625 1350 5625 2250 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 1 4 + 0 0 1.00 60.00 120.00 + 0 0 1.00 60.00 120.00 + 2175 1050 2175 1725 2400 1425 2400 2250 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 1 4 + 0 0 1.00 60.00 120.00 + 0 0 1.00 60.00 120.00 + 2925 2400 3975 2400 3600 2550 4950 2550 +4 0 0 50 -1 4 10 0.0000 0 120 1275 5850 1725 HTTP over TCP/IP\001 +4 1 0 50 -1 4 10 0.0000 0 120 240 4425 4275 HD\001 +4 0 0 50 -1 4 10 0.0000 0 120 1275 2625 1725 HTTP over TCP/IP\001 +4 0 0 50 -1 4 10 0.0000 0 120 1275 3375 2250 HTTP over TCP/IP\001 Added: trunk/complement/explore/app/intercessor/doc/intercessor-events.fig =================================================================== --- trunk/complement/explore/app/intercessor/doc/intercessor-events.fig (rev 0) +++ trunk/complement/explore/app/intercessor/doc/intercessor-events.fig 2007-10-26 09:39:51 UTC (rev 1778) @@ -0,0 +1,53 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Portrait +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +1 1 0 1 0 11 48 -1 20 0.000 1 0.0000 2100 2700 825 450 2100 2700 2925 2700 +1 1 0 1 0 11 48 -1 20 0.000 1 0.0000 4950 2700 825 450 4950 2700 5775 2700 +2 2 0 1 0 30 50 -1 20 0.000 0 0 -1 0 0 5 + 1050 1800 6150 1800 6150 3600 1050 3600 1050 1800 +3 2 0 1 0 7 47 -1 -1 0.000 0 1 0 3 + 0 0 1.00 60.00 120.00 + 1875 1125 1650 1650 1950 2250 + 0.000 -1.000 0.000 +3 2 0 1 0 7 47 -1 -1 0.000 0 1 0 3 + 0 0 1.00 60.00 120.00 + 2925 2625 3600 2325 4200 2550 + 0.000 -1.000 0.000 +3 2 0 1 0 7 47 -1 -1 0.000 0 1 0 3 + 0 0 1.00 60.00 120.00 + 4200 2925 3675 3150 2850 2850 + 0.000 -1.000 0.000 +3 2 0 1 0 7 47 -1 -1 0.000 0 1 0 3 + 0 0 1.00 60.00 120.00 + 2400 2250 2775 1650 2550 1125 + 0.000 -1.000 0.000 +3 2 0 1 0 7 47 -1 -1 0.000 0 1 0 3 + 0 0 1.00 60.00 120.00 + 4725 2250 4350 1500 4650 1050 + 0.000 -1.000 0.000 +3 2 0 1 0 7 47 -1 -1 0.000 0 1 0 3 + 0 0 1.00 60.00 120.00 + 5400 1050 5550 1575 5250 2325 + 0.000 -1.000 0.000 +3 2 0 1 0 7 47 -1 -1 0.000 0 1 0 3 + 0 0 1.00 60.00 120.00 + 4950 3150 4500 3750 5025 4425 + 0.000 -1.000 0.000 +4 1 0 47 -1 4 10 0.0000 0 120 780 5025 2775 HTTP client\001 +4 1 0 47 -1 4 10 0.0000 0 120 855 2175 2775 HTTP server\001 +4 0 0 47 -1 4 10 0.0000 0 150 510 3225 2250 request\001 +4 0 0 47 -1 4 10 0.0000 0 150 1095 3225 3300 response status\001 +4 2 0 47 -1 4 10 0.0000 0 150 510 1575 1500 request\001 +4 0 0 47 -1 4 10 0.0000 0 120 630 2850 1500 response\001 +4 0 0 47 -1 4 10 0.0000 0 120 630 5700 1500 response\001 +4 2 0 47 -1 4 10 0.0000 0 150 510 4275 1425 request\001 +4 2 0 47 -1 4 10 0.0000 0 120 195 4350 3825 file\001 +4 1 0 47 -1 4 10 0.0000 0 150 705 5025 4575 Filesystem\001 +4 1 0 47 -1 4 10 0.0000 0 150 420 2175 900 Script\001 +4 1 0 47 -1 4 10 0.0000 0 150 1335 4950 900 ReportWare Server\001 Added: trunk/complement/explore/app/intercessor/doc/intercessor-layers.fig =================================================================== --- trunk/complement/explore/app/intercessor/doc/intercessor-layers.fig (rev 0) +++ trunk/complement/explore/app/intercessor/doc/intercessor-layers.fig 2007-10-26 09:39:51 UTC (rev 1778) @@ -0,0 +1,98 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +0 32 #868286 +0 33 #c7c3c7 +0 34 #e7e3e7 +0 35 #808080 +0 36 #c0c0c0 +0 37 #e0e0e0 +0 38 #8e8e8e +0 39 #8e8f8e +0 40 #444444 +0 41 #868686 +0 42 #c7c7c7 +0 43 #e7e7e7 +0 44 #f7f7f7 +0 45 #9e9e9e +0 46 #717571 +0 47 #414541 +0 48 #757575 +0 49 #414141 +0 50 #effbff +0 51 #404040 +0 52 #f3f3f3 +0 53 #aaaaaa +0 54 #555555 +0 55 #d7d3d7 +0 56 #aeaaae +0 57 #c2c2c2 +0 58 #303030 +0 59 #515551 +0 60 #f7f3f7 +0 61 #666666 +0 62 #717171 +0 63 #c6b797 +0 64 #eff8ff +0 65 #dccba6 +0 66 #d7d7d7 +0 67 #aeaeae +0 68 #bebebe +0 69 #515151 +0 70 #000049 +0 71 #797979 +0 72 #303430 +0 73 #c7b696 +6 2550 4050 4650 4500 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2550 4050 4650 4050 4650 4500 2550 4500 2550 4050 +4 1 0 50 -1 4 10 0.0000 0 120 1005 3675 4350 C++ iostreams\001 +-6 +6 4650 4500 7875 4950 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4650 4500 6375 4500 6375 4950 4650 4950 4650 4500 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 6375 4500 7875 4500 7875 4950 6375 4950 6375 4500 +4 1 0 50 -1 4 10 0.0000 0 120 1050 5550 4800 POSIX threads\001 +4 1 0 50 -1 4 10 0.0000 0 120 900 7275 4800 BSD sockets\001 +-6 +6 1050 1800 7875 2700 +6 2550 2250 3450 2700 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3450 2700 2550 2700 2550 2250 3450 2250 3450 2700 +4 1 0 50 -1 4 10 0.0000 0 150 300 3000 2550 http\001 +-6 +2 2 0 0 0 45 60 -1 20 0.000 0 0 -1 0 0 5 + 7875 2700 1050 2700 1050 2250 7875 2250 7875 2700 +2 2 0 0 0 44 60 -1 20 0.000 0 0 -1 0 0 5 + 7875 2250 1050 2250 1050 1800 7875 1800 7875 2250 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2550 1800 7875 1800 7875 2250 2550 2250 2550 1800 +4 0 0 50 -1 4 10 0.0000 0 150 825 1200 2475 App. librairy\001 +4 1 0 50 -1 4 10 0.0000 0 120 780 5100 2100 Intercessor\001 +4 0 0 50 -1 4 10 0.0000 0 150 765 1200 2100 Application\001 +-6 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4650 3600 6375 3600 6375 4050 4650 4050 4650 3600 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3450 3150 7875 3150 7875 3600 3450 3600 3450 3150 +2 2 0 0 0 30 60 -1 20 0.000 0 0 -1 0 0 5 + 7875 4500 1050 4500 1050 4050 7875 4050 7875 4500 +2 2 0 0 0 11 60 -1 20 0.000 0 0 -1 0 0 5 + 7875 4950 1050 4950 1050 4500 7875 4500 7875 4950 +2 2 0 0 0 33 60 -1 20 0.000 0 0 -1 0 0 5 + 7875 4050 1050 4050 1050 2700 7875 2700 7875 4050 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3450 2700 7875 2700 7875 3150 3450 3150 3450 2700 +4 1 0 50 -1 4 10 0.0000 0 150 1500 5550 3900 xmt, threads and IPC\001 +4 1 0 50 -1 4 10 0.0000 0 120 510 5550 3450 sockios\001 +4 0 0 50 -1 4 10 0.0000 0 150 510 1200 4800 System\001 +4 0 0 50 -1 4 10 0.0000 0 120 300 1200 4350 C++\001 +4 1 0 50 -1 4 10 0.0000 0 120 405 5550 3000 StEM\001 +4 0 0 50 -1 4 10 0.0000 0 150 870 1200 3450 Complement\001 Added: trunk/complement/explore/app/intercessor/doc/intercessor-obj.fig =================================================================== --- trunk/complement/explore/app/intercessor/doc/intercessor-obj.fig (rev 0) +++ trunk/complement/explore/app/intercessor/doc/intercessor-obj.fig 2007-10-26 09:39:51 UTC (rev 1778) @@ -0,0 +1,80 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Portrait +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 2700 2475 3750 2925 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2700 2475 3750 2475 3750 2925 2700 2925 2700 2475 +4 1 0 50 -1 4 10 0.0000 0 150 420 3225 2775 Script\001 +-6 +6 4350 2475 5400 2925 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4350 2475 5400 2475 5400 2925 4350 2925 4350 2475 +4 1 0 50 -1 4 10 0.0000 0 150 420 4875 2775 Script\001 +-6 +6 4500 3900 5325 4350 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5 + 4500 3900 5325 3900 5325 4350 4500 4350 4500 3900 +4 1 0 50 -1 4 10 0.0000 0 120 225 4950 4200 File\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3900 750 3900 1425 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4350 1425 4350 750 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3750 1950 3150 2475 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3450 2475 4050 1950 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4200 1950 4725 2475 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5025 2475 4500 1950 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5 + 3675 300 4725 300 4725 750 3675 750 3675 300 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3000 2925 1200 3900 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1650 3900 3375 2925 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3600 1425 4725 1425 4725 1950 3600 1950 3600 1425 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 825 3900 2175 3900 2175 4425 825 4425 825 3900 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 825 5100 2250 5100 2250 5625 825 5625 825 5100 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1200 4425 1200 5100 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1800 5100 1800 4425 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 4125 4500 4125 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4875 3900 4875 2925 +4 1 0 50 -1 4 10 0.0000 0 120 585 4200 600 Browser\001 +4 0 0 50 -1 20 12 0.0000 4 120 720 4500 1125 responce\001 +4 2 0 50 -1 20 12 0.0000 4 150 630 3825 1125 request\001 +4 1 0 50 -1 4 10 0.0000 0 120 810 4200 1725 Web Server\001 +4 1 0 50 -1 4 10 0.0000 0 120 780 1500 4200 Intercessor\001 +4 1 0 50 -1 4 10 0.0000 0 150 825 1575 5400 ReportWare\001 +4 0 0 50 -1 4 10 0.0000 0 120 630 2625 3600 responce\001 +4 2 0 50 -1 4 10 0.0000 0 150 510 2025 3300 request\001 +4 0 0 50 -1 4 10 0.0000 0 120 630 1950 4800 responce\001 +4 2 0 50 -1 4 10 0.0000 0 150 510 1050 4800 request\001 +4 0 0 50 -1 4 10 0.0000 0 120 345 3075 3975 write\001 +4 0 0 50 -1 4 10 0.0000 0 120 300 5025 3450 read\001 Added: trunk/complement/explore/app/intercessor/doc/intercessor-time-neg.fig =================================================================== --- trunk/complement/explore/app/intercessor/doc/intercessor-time-neg.fig (rev 0) +++ trunk/complement/explore/app/intercessor/doc/intercessor-time-neg.fig 2007-10-26 09:39:51 UTC (rev 1778) @@ -0,0 +1,53 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Portrait +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1800 975 3000 1200 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3000 1200 5400 1650 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1800 750 1800 3600 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3000 750 3000 3600 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4200 750 4200 3600 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5400 750 5400 3600 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 600 750 600 3600 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 600 900 1800 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3000 2475 1800 2700 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1800 2700 600 2925 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5400 2577 3000 3102 +4 1 0 50 -1 4 10 0.0000 0 120 330 600 600 User\001 +4 1 0 50 -1 4 10 0.0000 0 120 780 3000 600 Intercessor\001 +4 1 0 50 -1 4 10 0.0000 0 150 705 4200 600 Filesystem\001 +4 1 0 50 -1 4 10 0.0000 0 150 825 5400 600 ReportWare\001 +4 0 0 50 -1 4 10 0.0000 0 150 645 825 825 request 1\001 +4 1 0 50 -1 4 10 0.0000 0 150 1365 1725 600 Web Server (script)\001 +4 0 0 50 -1 4 10 0.0000 0 120 675 825 2550 content 1\001 +4 0 0 50 -1 4 10 0.0000 0 150 645 3375 1200 request 1\001 +4 0 0 50 -1 4 10 0.0000 0 120 630 4425 2550 response\001 +4 0 0 50 -1 4 10 0.0000 0 120 60 5550 3525 t\001 +4 0 0 50 -1 4 10 0.0000 0 150 1260 2100 2400 negative response\001 Added: trunk/complement/explore/app/intercessor/doc/intercessor-time.fig =================================================================== --- trunk/complement/explore/app/intercessor/doc/intercessor-time.fig (rev 0) +++ trunk/complement/explore/app/intercessor/doc/intercessor-time.fig 2007-10-26 09:39:51 UTC (rev 1778) @@ -0,0 +1,77 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Portrait +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1800 975 3000 1200 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3000 1200 5400 1650 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5400 2325 3000 2925 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3000 3525 4200 3825 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1800 4650 4200 4950 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4200 5175 1800 5400 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1800 750 1800 6000 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3000 750 3000 6000 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4200 750 4200 6000 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5400 750 5400 6000 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 600 750 600 6000 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 600 900 1800 975 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 600 4500 1800 4650 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1800 5400 600 5550 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3000 2475 1800 2700 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1800 2700 600 2925 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5400 1800 3000 2325 +4 1 0 50 -1 4 10 0.0000 0 120 330 600 600 User\001 +4 1 0 50 -1 4 10 0.0000 0 120 780 3000 600 Intercessor\001 +4 1 0 50 -1 4 10 0.0000 0 150 705 4200 600 Filesystem\001 +4 1 0 50 -1 4 10 0.0000 0 150 825 5400 600 ReportWare\001 +4 0 0 50 -1 4 10 0.0000 0 150 645 825 825 request 1\001 +4 0 0 50 -1 4 10 0.0000 0 120 675 825 5325 content 2\001 +4 0 0 50 -1 4 10 0.0000 0 150 645 825 4425 request 2\001 +4 0 0 50 -1 4 10 0.0000 0 120 60 5550 5850 t\001 +4 0 0 50 -1 4 10 0.0000 0 120 675 3300 3525 content 2\001 +4 0 0 50 -1 4 10 0.0000 0 120 675 3075 5175 content 2\001 +4 0 0 50 -1 4 10 0.0000 0 150 540 2025 4575 try read\001 +4 1 0 50 -1 4 10 0.0000 0 150 1365 1725 600 Web Server (script)\001 +4 0 0 50 -1 4 10 0.0000 0 120 675 825 2550 content 1\001 +4 0 0 50 -1 4 10 0.0000 0 120 675 4500 2775 content 2\001 +4 0 0 50 -1 4 10 0.0000 0 120 630 2100 2475 response\001 +4 0 0 50 -1 4 10 0.0000 0 150 645 3375 1200 request 1\001 +4 0 0 50 -1 4 10 0.0000 0 120 630 3375 2025 response\001 Added: trunk/complement/explore/app/intercessor/doc/rup.sty =================================================================== --- trunk/complement/explore/app/intercessor/doc/rup.sty (rev 0) +++ trunk/complement/explore/app/intercessor/doc/rup.sty 2007-10-26 09:39:51 UTC (rev 1778) @@ -0,0 +1,150 @@ +% -*- LaTeX -*- +% $Id: rup.sty,v 1.1 2002/11/04 10:53:08 ptr Exp $ + +\makeatletter + +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +\ProvidesClass{rup}[2002/10/24 v0.1 RUP document class] + +\newcommand\version[1]{\gdef\@version{#1}} +\gdef\@version{1{.}0} +\newcommand\project[1]{\gdef\@project{#1}} +\gdef\@project{Project Name} +\newcommand\RevHistory[1]{\gdef\@revhistory{#1}} +\gdef\@revhistory{dd/mmmm/yyyy & x.x & & \cr \hline} + +% \setlength\parsep{5\p@ \@plus \p@} +% \setlength\parsep{5em} +% \parindent 0em +\setlength\parskip{5pt plus 1pt minus 1pt} +\setlength\parindent{0pt} +% \setlength\parsep{1em} + +\if@titlepage + \renewcommand\maketitle{\begin{titlepage}% + \let\footnotesize\small + \let\footnoterule\relax + \let \footnote \thanks + \null\vfil + \vskip 60\p@ + \begin{flushright}% + {\LARGE \@title \par}% + \vskip 3em% + {\large + \lineskip .75em% + \begin{tabular}[t]{c}% + \@author + \end{tab... [truncated message content] |
From: <com...@us...> - 2008-04-09 10:22:45
|
Revision: 1844 http://complement.svn.sourceforge.net/complement/?rev=1844&view=rev Author: complement Date: 2008-04-09 03:22:41 -0700 (Wed, 09 Apr 2008) Log Message: ----------- import old staff from K Sky, SMTP-related issues Added Paths: ----------- trunk/complement/explore/app/SMTP-tools/ trunk/complement/explore/app/SMTP-tools/DoSclient/ trunk/complement/explore/app/SMTP-tools/DoSclient/Makefile trunk/complement/explore/app/SMTP-tools/DoSclient/Makefile.inc trunk/complement/explore/app/SMTP-tools/DoSclient/doscl.cc trunk/complement/explore/app/SMTP-tools/scgen/ trunk/complement/explore/app/SMTP-tools/scgen/Makefile trunk/complement/explore/app/SMTP-tools/scgen/Makefile.inc trunk/complement/explore/app/SMTP-tools/scgen/scgen-dropconn/ trunk/complement/explore/app/SMTP-tools/scgen/scgen-dropconn/Makefile trunk/complement/explore/app/SMTP-tools/scgen/scgen-dropconn/Makefile.inc trunk/complement/explore/app/SMTP-tools/scgen/scgen-dropconn/dropconn.cc trunk/complement/explore/app/SMTP-tools/scgen/scgen.cc trunk/complement/explore/app/SMTP-tools/scgen/stategraph.cc trunk/complement/explore/app/SMTP-tools/scgen/stategraph.h trunk/complement/explore/app/SMTP-tools/scgen/ut/ trunk/complement/explore/app/SMTP-tools/scgen/ut/Makefile trunk/complement/explore/app/SMTP-tools/scgen/ut/Makefile.inc trunk/complement/explore/app/SMTP-tools/scgen/ut/unit_test.cc trunk/complement/explore/app/SMTP-tools/smtp-ut/ trunk/complement/explore/app/SMTP-tools/smtp-ut/bad-addr-2 trunk/complement/explore/app/SMTP-tools/smtp-ut/bad-body-1 trunk/complement/explore/app/SMTP-tools/smtp-ut/bad-domain-1 trunk/complement/explore/app/SMTP-tools/smtp-ut/dot-line trunk/complement/explore/app/SMTP-tools/smtp-ut/good-addr trunk/complement/explore/app/SMTP-tools/smtp-ut/good-domain-1 trunk/complement/explore/app/SMTP-tools/smtp-ut/good-domain-2 trunk/complement/explore/app/SMTP-tools/smtp-ut/null-char trunk/complement/explore/app/SMTP-tools/smtp-ut/scr.sed trunk/complement/explore/app/SMTP-tools/smtp-ut/smtp-batch/ trunk/complement/explore/app/SMTP-tools/smtp-ut/smtp-batch/Makefile trunk/complement/explore/app/SMTP-tools/smtp-ut/smtp-batch/Makefile.inc trunk/complement/explore/app/SMTP-tools/smtp-ut/smtp-batch/smtp-batch.cc trunk/complement/explore/app/SMTP-tools/smtp-ut/smtp-batch.py trunk/complement/explore/app/SMTP-tools/smtp-ut/smtp-ut-aux.py trunk/complement/explore/app/SMTP-tools/smtp-ut/smtp-ut.py trunk/complement/explore/app/SMTP-tools/smtp-ut/test-1 trunk/complement/explore/app/SMTP-tools/smtp-ut/test-2 trunk/complement/explore/app/SMTP-tools/smtp-ut/test-3 trunk/complement/explore/app/SMTP-tools/smtp-ut/test-4 trunk/complement/explore/app/SMTP-tools/smtp-ut/test-5 trunk/complement/explore/app/SMTP-tools/smtp-ut/test-drop-conn trunk/complement/explore/app/SMTP-tools/smtp-ut/test-graph-1 trunk/complement/explore/app/SMTP-tools/smtp-ut/test-tecol trunk/complement/explore/app/SMTP-tools/smtp-ut/test-twice trunk/complement/explore/app/SMTP-tools/smtp-ut/timeoutsocket.py trunk/complement/explore/app/SMTP-tools/tecol/ trunk/complement/explore/app/SMTP-tools/tecol/ConnectionProcessor.cc trunk/complement/explore/app/SMTP-tools/tecol/ConnectionProcessor.h trunk/complement/explore/app/SMTP-tools/tecol/Makefile trunk/complement/explore/app/SMTP-tools/tecol/Makefile.inc trunk/complement/explore/app/SMTP-tools/tecol/dump/ trunk/complement/explore/app/SMTP-tools/tecol/dump/Makefile trunk/complement/explore/app/SMTP-tools/tecol/dump/Makefile.inc trunk/complement/explore/app/SMTP-tools/tecol/dump/dump.cc trunk/complement/explore/app/SMTP-tools/tecol/tecol.cc trunk/complement/explore/app/SMTP-tools/tecol/ut/ trunk/complement/explore/app/SMTP-tools/tecol/ut/Makefile trunk/complement/explore/app/SMTP-tools/tecol/ut/Makefile.inc trunk/complement/explore/app/SMTP-tools/tecol/ut/client.cc trunk/complement/explore/app/SMTP-tools/tecol/ut/client.h trunk/complement/explore/app/SMTP-tools/tecol/ut/message.cc trunk/complement/explore/app/SMTP-tools/tecol/ut/message.h trunk/complement/explore/app/SMTP-tools/tecol/ut/unit_test.cc trunk/complement/explore/app/SMTP-tools/test_mta/ trunk/complement/explore/app/SMTP-tools/test_mta/ConnectionProcessor.cc trunk/complement/explore/app/SMTP-tools/test_mta/ConnectionProcessor.h trunk/complement/explore/app/SMTP-tools/test_mta/Makefile trunk/complement/explore/app/SMTP-tools/test_mta/Makefile.inc trunk/complement/explore/app/SMTP-tools/test_mta/tmta.cc Added: trunk/complement/explore/app/SMTP-tools/DoSclient/Makefile =================================================================== --- trunk/complement/explore/app/SMTP-tools/DoSclient/Makefile (rev 0) +++ trunk/complement/explore/app/SMTP-tools/DoSclient/Makefile 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,28 @@ +# -*- Makefile -*- Time-stamp: <03/10/07 18:28:29 ptr> +# $Id: Makefile,v 1.2 2004/06/16 14:29:20 ptr Exp $ + +SRCROOT := ../../../../extern/complement +# SRCROOT := /export/home/ptr/island/workshop/explore +COMPILER_NAME := gcc + +include Makefile.inc +include ${SRCROOT}/Makefiles/top.mak + + +DEFS += -D_NO_TEST +INCLUDES += -I$(SRCROOT)/include -I$(STLPORT_INCLUDE_DIR) -I$(BOOST_INCLUDE_DIR) + +release-shared: LDSEARCH = -L${STLPORT_LIB_DIR} -L${CoMT_LIB_DIR} +stldbg-shared: LDSEARCH = -L${STLPORT_LIB_DIR} -L${CoMT_LIB_DIR_STLDBG} +dbg-shared: LDSEARCH = -L${STLPORT_LIB_DIR} -L${CoMT_LIB_DIR_DBG} + +ifeq ($(OSNAME),sunos) +release-shared : LDLIBS = -lstlport_gcc -lrt +stldbg-shared : LDLIBS = -lstlport_gcc_stldebug -lrt +dbg-shared : LDLIBS = -lstlport_gcc -lrt +else +release-shared : LDLIBS = -lstlport_gcc -lxmt_gcc -lsockios_gcc -lmisc_gcc +stldbg-shared : LDLIBS = -lstlport_gcc_stldebug -lxmt_gcc_stl-g -lsockios_gcc_stl-g -lmisc_gcc_stl-g +dbg-shared : LDLIBS = -lstlport_gcc -lxmt_gcc-g -lsockios_gcc-g -lmisc_gcc-g +endif + Added: trunk/complement/explore/app/SMTP-tools/DoSclient/Makefile.inc =================================================================== --- trunk/complement/explore/app/SMTP-tools/DoSclient/Makefile.inc (rev 0) +++ trunk/complement/explore/app/SMTP-tools/DoSclient/Makefile.inc 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,5 @@ +# -*- makefile -*- Time-stamp: <03/10/07 15:14:22 ptr> +# $Id: Makefile.inc,v 1.1 2003/10/08 08:26:16 ptr Exp $ + +PRGNAME = doscl +SRC_CC = doscl.cc Added: trunk/complement/explore/app/SMTP-tools/DoSclient/doscl.cc =================================================================== --- trunk/complement/explore/app/SMTP-tools/DoSclient/doscl.cc (rev 0) +++ trunk/complement/explore/app/SMTP-tools/DoSclient/doscl.cc 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,144 @@ +// -*- C++ -*- Time-stamp: <04/01/21 18:04:57 ptr> + +#ifdef __unix +# ifdef __HP_aCC +#pragma VERSIONID "@(#)$Id: doscl.cc,v 1.2 2004/06/16 14:29:20 ptr Exp $" +# else +#ident "@(#)$Id: doscl.cc,v 1.2 2004/06/16 14:29:20 ptr Exp $" +# endif +#endif + +#include <iostream> +#include <string> +#include <sstream> +#include <sockios/sockstream> +#include <mt/xmt.h> +#include <misc/args.h> + +using namespace std; +using namespace __impl; + +int command_whole_timeout_test( iostream& s, const string& hello_host, int delay ) +{ + string rline; + string err_line; + + getline( s, rline ); + + cout << rline << endl; + + timespec t; + t.tv_sec = delay; + t.tv_nsec = 0; + + Thread::delay( &t ); + + s << "EHLO " << hello_host << "\r" << endl; + getline( s, rline ); + + if ( s.good() ) { + // cerr << "Connection even here seems ok" << endl; + cout << rline << endl; + } + getline( s, err_line ); + if ( s.good() ) { + return -1; // connection still ok, timeout not happens + } + + return 0; +} + +int cumulative_command_timeout_test( iostream& s, const string& hello_host, int delay ) +{ + string rline; + string err_line; + + getline( s, rline ); + + cout << rline << endl; + + timespec t; + t.tv_sec = delay; + t.tv_nsec = 0; + + stringstream sstr; + sstr << "EHLO " << hello_host << "\r" << endl; + string greeting( sstr.str() ); + + for ( string::iterator i = greeting.begin(); i != greeting.end(); ++i ) { + Thread::delay( &t ); + s << *i; + s.flush(); + (cout << *i).flush(); + } + + getline( s, rline ); + + if ( s.good() ) { + cout << rline << endl; + } + getline( s, err_line ); + if ( s.good() ) { + return -1; // connection still ok, timeout not happens + } + + // cout << rline << endl; + return 0; +} + +int main( int argc, char * const *argv ) +{ + try { + Argv arg; + arg.copyright( "Copyright (C) K sky Lab, 2003" ); + arg.brief( "test for SMTP GW project" ); + arg.option( "-h", false, "print this help message" ); + arg.option( "-s", string( "" ), "host with SMTP GW server" ); + arg.option( "-p", int(25), "port that listen SMTP GW server" ); + arg.option( "-hello", string( "peak.avp.ru" ), "argument of EHLO/HELO command" ); + arg.option( "-delay", int( 305 ), "delay (timeout) for test" ); + arg.option( "-test", int( 0 ), "test number (0 or 1)" ); + try { + arg.parse( argc, argv ); + } + catch ( std::invalid_argument& err ) { + cerr << err.what() << endl; + arg.print_help( cerr ); + throw 1; + } + bool turn; + if ( arg.assign( "-h", turn ) ) { + arg.print_help( cerr ); + throw 0; + } + + string t_host; + int t_port; + arg.assign( "-s", t_host ); + arg.assign( "-p", t_port ); + + string hello_host; + arg.assign( "-hello", hello_host ); + + int delay; + int test_no; + arg.assign( "-delay", delay ); + arg.assign( "-test", test_no ); + + string rline; + + sockstream s( t_host.data(), t_port ); + if ( test_no == 0 ) { + return command_whole_timeout_test( s, hello_host, delay ); + } else if ( test_no == 1 ) { + return cumulative_command_timeout_test( s, hello_host, delay ); + } + + return -1; + } + catch( int ret ) { + return ret; + } + + return 0; +} Added: trunk/complement/explore/app/SMTP-tools/scgen/Makefile =================================================================== --- trunk/complement/explore/app/SMTP-tools/scgen/Makefile (rev 0) +++ trunk/complement/explore/app/SMTP-tools/scgen/Makefile 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,28 @@ +# -*- Makefile -*- Time-stamp: <03/09/08 14:55:56 ptr> +# $Id: Makefile,v 1.1 2003/09/11 10:33:15 ptr Exp $ + +SRCROOT := ../../../../extern/complement +COMPILER_NAME := gcc + +ALL_TAGS := dbg-shared + +include Makefile.inc +include ${SRCROOT}/Makefiles/top.mak + + +INCLUDES += -I$(SRCROOT)/include -I$(STLPORT_INCLUDE_DIR) -I$(BOOST_INCLUDE_DIR) + +release-shared: LDSEARCH = -L${STLPORT_LIB_DIR} -L${CoMT_LIB_DIR} +stldbg-shared: LDSEARCH = -L${STLPORT_LIB_DIR} -L${CoMT_LIB_DIR_STLDBG} +dbg-shared: LDSEARCH = -L${STLPORT_LIB_DIR} -L${CoMT_LIB_DIR_DBG} + +ifeq ($(OSNAME),sunos) +release-shared : LDLIBS = -lstlport_gcc -lrt +stldbg-shared : LDLIBS = -lstlport_gcc_stldebug -lrt +dbg-shared : LDLIBS = -lstlport_gcc -lrt +else +release-shared : LDLIBS = -lstlport_gcc +stldbg-shared : LDLIBS = -lstlport_gcc_stldebug +dbg-shared : LDLIBS = -lstlport_gcc +endif + Added: trunk/complement/explore/app/SMTP-tools/scgen/Makefile.inc =================================================================== --- trunk/complement/explore/app/SMTP-tools/scgen/Makefile.inc (rev 0) +++ trunk/complement/explore/app/SMTP-tools/scgen/Makefile.inc 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,5 @@ +# -*- makefile -*- Time-stamp: <03/09/09 12:51:17 ptr> +# $Id: Makefile.inc,v 1.1 2003/09/11 10:33:15 ptr Exp $ + +PRGNAME = scgen +SRC_CC = scgen.cc stategraph.cc Added: trunk/complement/explore/app/SMTP-tools/scgen/scgen-dropconn/Makefile =================================================================== --- trunk/complement/explore/app/SMTP-tools/scgen/scgen-dropconn/Makefile (rev 0) +++ trunk/complement/explore/app/SMTP-tools/scgen/scgen-dropconn/Makefile 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,28 @@ +# -*- Makefile -*- Time-stamp: <03/09/08 14:55:56 ptr> +# $Id: Makefile,v 1.1 2003/10/07 10:50:16 ptr Exp $ + +SRCROOT := ../../../../../extern/complement +COMPILER_NAME := gcc + +ALL_TAGS := dbg-shared + +include Makefile.inc +include ${SRCROOT}/Makefiles/top.mak + + +INCLUDES += -I$(SRCROOT)/include -I$(STLPORT_INCLUDE_DIR) -I$(BOOST_INCLUDE_DIR) -I.. + +release-shared: LDSEARCH = -L${STLPORT_LIB_DIR} -L${CoMT_LIB_DIR} +stldbg-shared: LDSEARCH = -L${STLPORT_LIB_DIR} -L${CoMT_LIB_DIR_STLDBG} +dbg-shared: LDSEARCH = -L${STLPORT_LIB_DIR} -L${CoMT_LIB_DIR_DBG} + +ifeq ($(OSNAME),sunos) +release-shared : LDLIBS = -lstlport_gcc -lrt +stldbg-shared : LDLIBS = -lstlport_gcc_stldebug -lrt +dbg-shared : LDLIBS = -lstlport_gcc -lrt +else +release-shared : LDLIBS = -lstlport_gcc +stldbg-shared : LDLIBS = -lstlport_gcc_stldebug +dbg-shared : LDLIBS = -lstlport_gcc +endif + Added: trunk/complement/explore/app/SMTP-tools/scgen/scgen-dropconn/Makefile.inc =================================================================== --- trunk/complement/explore/app/SMTP-tools/scgen/scgen-dropconn/Makefile.inc (rev 0) +++ trunk/complement/explore/app/SMTP-tools/scgen/scgen-dropconn/Makefile.inc 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,5 @@ +# -*- makefile -*- Time-stamp: <03/09/09 12:51:17 ptr> +# $Id: Makefile.inc,v 1.1 2003/10/07 10:50:16 ptr Exp $ + +PRGNAME = dropconn +SRC_CC = dropconn.cc ../stategraph.cc Added: trunk/complement/explore/app/SMTP-tools/scgen/scgen-dropconn/dropconn.cc =================================================================== --- trunk/complement/explore/app/SMTP-tools/scgen/scgen-dropconn/dropconn.cc (rev 0) +++ trunk/complement/explore/app/SMTP-tools/scgen/scgen-dropconn/dropconn.cc 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,129 @@ +// -*- C++ -*- Time-stamp: <03/10/06 18:09:23 ptr> + +#ifdef __unix +# ifdef __HP_aCC +#pragma VERSIONID "@(#)$Id: dropconn.cc,v 1.1 2003/10/07 10:50:16 ptr Exp $" +# else +#ident "@(#)$Id: dropconn.cc,v 1.1 2003/10/07 10:50:16 ptr Exp $" +# endif +#endif + +#include <iostream> +#include "stategraph.h" + +enum vertex { + NotConnected, + Connected, + Greeting, + Mail, + Recipient, + Data, + EndOfData, + NVertices +}; + +enum edge { + _connect_, + _disconnect_, + _QUIT_, + _RSET_, + _EXPN_, + _HELP_, + _VRFY_, + _NOOP_, + _MAIL_, + _HELO_, + _EHLO_, + _RCPT_, + _DATA_, + _EOD_, // end of data + _nothing_, + _NCommands_ +}; + + +int main( int, char * const * ) +{ + StateGraph g( NVertices, std::cout ); + + g.edge( NotConnected, Connected, 5, _connect_ ); + // g.edge( Connected, NotConnected, 10, _QUIT_ ); + // g.edge( Connected, Connected, 1, _RSET_ ); + // g.edge( Connected, Connected, 1, _EXPN_ ); + // g.edge( Connected, Connected, 1, _HELP_ ); + // g.edge( Connected, Connected, 1, _NOOP_ ); + // g.edge( Connected, Connected, 1, _VRFY_ ); + g.edge( Connected, Greeting, 2, _HELO_ ); + g.edge( Connected, Greeting, 1, _EHLO_ ); + // g.edge( Greeting, Greeting, 1, _EHLO_ ); + // g.edge( Greeting, Greeting, 1, _RSET_ ); + // g.edge( Greeting, Greeting, 1, _VRFY_ ); + // g.edge( Greeting, Greeting, 1, _EXPN_ ); + // g.edge( Greeting, Greeting, 1, _HELP_ ); + // g.edge( Greeting, Greeting, 1, _NOOP_ ); + g.edge( Greeting, NotConnected, 10, _QUIT_ ); + g.edge( Greeting, Mail, 1, _MAIL_ ); + g.edge( Greeting, NotConnected, 1, _disconnect_ ); + // g.edge( Mail, Mail, 1, _NOOP_ ); + // g.edge( Mail, Mail, 1, _HELP_ ); + // g.edge( Mail, Greeting, 3, _EHLO_ ); + // g.edge( Mail, Greeting, 3, _RSET_ ); + // g.edge( Mail, NotConnected, 10, _QUIT_ ); + g.edge( Mail, NotConnected, 1, _disconnect_ ); + g.edge( Mail, Recipient, 1, _RCPT_ ); + // g.edge( Recipient, Greeting, 3, _RSET_ ); + // g.edge( Recipient, Greeting, 3, _EHLO_ ); + // g.edge( Recipient, NotConnected, 10, _QUIT_ ); + g.edge( Recipient, NotConnected, 1, _disconnect_ ); + // g.edge( Recipient, Recipient, 1, _NOOP_ ); + // g.edge( Recipient, Recipient, 1, _HELP_ ); + g.edge( Recipient, Data, 1, _DATA_ ); + g.edge( Recipient, NotConnected, 1, _disconnect_ ); + g.edge( Data, EndOfData, 1, _EOD_ ); + g.edge( EndOfData, Greeting, 1, _nothing_ ); + g.edge( EndOfData, NotConnected, 1, _disconnect_ ); + + + std::string host( "$1 $2" ); + std::string hello( "$3" ); + std::string msg_to( "<$5>" ); + std::string msg_from( "<$4>" ); + + g[_connect_] << "# --------------\n" + << "connect " << host << "\n" + << "expected 220\n"; + g[_disconnect_] << "disconnect\n"; + g[_QUIT_] << "QUIT\n" + << "expected 221\n" + << "disconnect\n" + << "# --------------\n"; + g[_RSET_] << "RSET\n" + << "expected 250\n"; + g[_EXPN_] << "EXPN so...@ho...\n" + << "expected\n"; + g[_HELP_] << "HELP\n" + << "expected 250\n"; + g[_VRFY_] << "VRFY so...@ho...\n" + << "expected\n"; + g[_NOOP_] << "NOOP\n" + << "expected 250\n"; + g[_MAIL_] << "MAIL FROM:" << msg_from << "\n" + << "expected 250\n"; + g[_HELO_] << "HELO " << hello << "\n" + << "expected 250\n"; + g[_EHLO_] << "EHLO " << hello << "\n" + << "expected 250\n"; + g[_RCPT_] << "RCPT TO:" << msg_to << "\n" + << "expected 250\n"; + g[_DATA_] << "DATA\n" + << "expected 354\n" + << ">>>A\n" + << "Subject: KL smtp relay test\n\nSample mess\n"; + g[_EOD_] // << "\r\n.\r\n" + << "<<<A\n" + << "expected 250\n"; + + g.girdle( NotConnected ); + + return 0; +} Added: trunk/complement/explore/app/SMTP-tools/scgen/scgen.cc =================================================================== --- trunk/complement/explore/app/SMTP-tools/scgen/scgen.cc (rev 0) +++ trunk/complement/explore/app/SMTP-tools/scgen/scgen.cc 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,125 @@ +// -*- C++ -*- Time-stamp: <03/10/06 18:10:41 ptr> + +#ifdef __unix +# ifdef __HP_aCC +#pragma VERSIONID "@(#)$Id: scgen.cc,v 1.3 2003/10/06 15:33:52 ptr Exp $" +# else +#ident "@(#)$Id: scgen.cc,v 1.3 2003/10/06 15:33:52 ptr Exp $" +# endif +#endif + +#include <iostream> +#include "stategraph.h" + +using namespace std; + +enum vertex { + NotConnected, + Connected, + Greeting, + Mail, + Recipient, + Data, + EndOfData, + NVertices +}; + +enum edge { + _connect_, + _disconnect_, + _QUIT_, + _RSET_, + _EXPN_, + _HELP_, + _VRFY_, + _NOOP_, + _MAIL_, + _HELO_, + _EHLO_, + _RCPT_, + _DATA_, + _EOD_, // end of data + _nothing_, + _NCommands_ +}; + + +int main( int, char * const * ) +{ + StateGraph g( NVertices, cout ); + + g.edge( NotConnected, Connected, 5, _connect_ ); + g.edge( Connected, NotConnected, 10, _QUIT_ ); + g.edge( Connected, Connected, 1, _RSET_ ); + g.edge( Connected, Connected, 1, _EXPN_ ); + g.edge( Connected, Connected, 1, _HELP_ ); + g.edge( Connected, Connected, 1, _NOOP_ ); + g.edge( Connected, Connected, 1, _VRFY_ ); + g.edge( Connected, Greeting, 2, _HELO_ ); + g.edge( Connected, Greeting, 1, _EHLO_ ); + g.edge( Greeting, Greeting, 1, _EHLO_ ); + g.edge( Greeting, Greeting, 1, _RSET_ ); + g.edge( Greeting, Greeting, 1, _VRFY_ ); + g.edge( Greeting, Greeting, 1, _EXPN_ ); + g.edge( Greeting, Greeting, 1, _HELP_ ); + g.edge( Greeting, Greeting, 1, _NOOP_ ); + g.edge( Greeting, NotConnected, 10, _QUIT_ ); + g.edge( Greeting, Mail, 1, _MAIL_ ); + g.edge( Mail, Mail, 1, _NOOP_ ); + g.edge( Mail, Mail, 1, _HELP_ ); + g.edge( Mail, Greeting, 3, _EHLO_ ); + g.edge( Mail, Greeting, 3, _RSET_ ); + g.edge( Mail, NotConnected, 10, _QUIT_ ); + g.edge( Mail, Recipient, 1, _RCPT_ ); + g.edge( Recipient, Greeting, 3, _RSET_ ); + g.edge( Recipient, Greeting, 3, _EHLO_ ); + g.edge( Recipient, NotConnected, 10, _QUIT_ ); + g.edge( Recipient, Recipient, 1, _NOOP_ ); + g.edge( Recipient, Recipient, 1, _HELP_ ); + g.edge( Recipient, Data, 1, _DATA_ ); + g.edge( Data, EndOfData, 1, _EOD_ ); + g.edge( EndOfData, Greeting, 1, _nothing_ ); + + string host( "$1 $2" ); + string hello( "$3" ); + string msg_to( "<$5>" ); + string msg_from( "<$4>" ); + + g[_connect_] << "# --------------\n" + << "connect " << host << "\n" + << "expected 220\n"; + g[_disconnect_] << "disconnect\n"; + g[_QUIT_] << "QUIT\n" + << "expected 221\n" + << "disconnect\n" + << "# --------------\n"; + g[_RSET_] << "RSET\n" + << "expected 250\n"; + g[_EXPN_] << "EXPN so...@ho...\n" + << "expected\n"; + g[_HELP_] << "HELP\n" + << "expected 250\n"; + g[_VRFY_] << "VRFY so...@ho...\n" + << "expected\n"; + g[_NOOP_] << "NOOP\n" + << "expected 250\n"; + g[_MAIL_] << "MAIL FROM:" << msg_from << "\n" + << "expected 250\n"; + g[_HELO_] << "HELO " << hello << "\n" + << "expected 250\n"; + g[_EHLO_] << "EHLO " << hello << "\n" + << "expected 250\n"; + g[_RCPT_] << "RCPT TO:" << msg_to << "\n" + << "expected 250\n"; + g[_DATA_] << "DATA\n" + << "expected 354\n" + << ">>>A\n" + << "Subject: KL smtp relay test\n\nSample mess\n"; + g[_EOD_] // << "\r\n.\r\n" + << "<<<A\n" + << "expected 250\n"; + + g.girdle( NotConnected ); + + return 0; +} Added: trunk/complement/explore/app/SMTP-tools/scgen/stategraph.cc =================================================================== --- trunk/complement/explore/app/SMTP-tools/scgen/stategraph.cc (rev 0) +++ trunk/complement/explore/app/SMTP-tools/scgen/stategraph.cc 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,123 @@ +// -*- C++ -*- Time-stamp: <03/09/29 15:22:19 ptr> + +#ifdef __unix +# ifdef __HP_aCC +#pragma VERSIONID "@(#)$Id: stategraph.cc,v 1.2 2003/10/06 07:56:07 ptr Exp $" +# else +#ident "@(#)$Id: stategraph.cc,v 1.2 2003/10/06 07:56:07 ptr Exp $" +# endif +#endif + +#include "stategraph.h" + +using namespace boost; +using namespace std; + +StateGraph::StateGraph( int nv, std::ostream& _out ) : + g( nv ), + out( _out ) +{ + weight = get( edge_weight, g ); + color = get( edge_color, g ); + operation = get( edge_operation, g ); +} + +void StateGraph::edge( int v_from, int v_to, int weight, int operation ) +{ + // the '0' parameter in Color(... is definition of initial color '0' for edge + add_edge( v_from, v_to, EdgeProperty(weight,Color(0,operation)), g ); +} + +StateGraph::vertex_t StateGraph::walk_from( StateGraph::vertex_t v ) +{ + out_edge_iterator_t ei; + out_edge_iterator_t eend; + + for ( tie(ei,eend) = out_edges(v,g); ei != eend; ++ei ) { + if ( color[*ei] == 0 ) { + color[*ei] = 1; + + out << (*this)[operation[*ei]].str(); + return target(*ei, g); + } + } + + return vertex_t(-1); +} + +StateGraph::vertex_t StateGraph::vertex_with_white_edge() +{ + vertex_iterator_t vi; + vertex_iterator_t vie; + for ( tie(vi,vie) = vertices(g); vi != vie; ++vi ) { + out_edge_iterator_t ei; + out_edge_iterator_t eend; + + for ( tie(ei,eend) = out_edges(*vi,g); ei != eend; ++ei ) { + if ( color[*ei] == 0 ) { + return *vi; + } + } + } + + return vertex_t(-1); +} + +int StateGraph::least_cost_edge_aux( const vertex_t& x, const vertex_t& u ) +{ + out_edge_iterator_t ei; + out_edge_iterator_t eend; + out_edge_iterator_t least_cost; + + tie(ei,eend) = out_edges(x,g); + least_cost = eend; + for ( ; ei != eend; ++ei ) { + if ( target(*ei, g) == u ) { + if ( (least_cost == eend) || (weight[*least_cost] > weight[*ei]) ) { + least_cost = ei; + } + } + } + return operation[*least_cost]; +} + +void StateGraph::shortest_path( StateGraph::vertex_t v, StateGraph::vertex_t u ) +{ + vector<vertex_t> p(num_vertices(g)); + vector<int> ops; + + dijkstra_shortest_paths( g, v, predecessor_map(&p[0]) ); + + vertex_t x = p[u]; + while ( x != v ) { + ops.push_back( least_cost_edge_aux(x,u) ); + u = x; + x = p[u]; + } + ops.push_back( least_cost_edge_aux(x,u) ); // last step + + for ( vector<int>::reverse_iterator i = ops.rbegin(); i != ops.rend(); ++i ) { + out << (*this)[*i].str(); + } +} + +void StateGraph::girdle( int start ) +{ + vertex_t v = walk_from( start ); + vertex_t u = v; + + do { + while ( v != vertex_t(-1) ) { + u = v; + v = walk_from( u ); + } + v = vertex_with_white_edge(); + if ( v == vertex_t(-1) ) { + break; + } + shortest_path( u, v ); + } while ( true ); + if ( u != start ) { + shortest_path( u, start ); + } +} Added: trunk/complement/explore/app/SMTP-tools/scgen/stategraph.h =================================================================== --- trunk/complement/explore/app/SMTP-tools/scgen/stategraph.h (rev 0) +++ trunk/complement/explore/app/SMTP-tools/scgen/stategraph.h 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,82 @@ +// -*- C++ -*- Time-stamp: <03/09/29 15:21:11 ptr> + +#ifdef __unix +# ifdef __HP_aCC +#pragma VERSIONID "@(#)$Id: stategraph.h,v 1.2 2003/10/06 07:56:07 ptr Exp $" +# else +#ident "@(#)$Id: stategraph.h,v 1.2 2003/10/06 07:56:07 ptr Exp $" +# endif +#endif + +#include <iostream> +#include <sstream> +#include <map> +#include <boost/graph/adjacency_list.hpp> +#include <boost/graph/dijkstra_shortest_paths.hpp> + +//using namespace boost; +//using namespace std; + +enum edge_operation_t { edge_operation }; + +namespace boost { + BOOST_INSTALL_PROPERTY( edge, operation ); +} // namespace boost + + +//typedef property<edge_operation_t,int> Operation; +//typedef property<edge_color_t,int,Operation> Color; + + +class StateGraph +{ + private: + typedef boost::property<edge_operation_t,int> Operation; + typedef boost::property<boost::edge_color_t,int,Operation> Color; + typedef boost::property<boost::edge_weight_t,int,Color> EdgeProperty; + + typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, EdgeProperty > graph_t; + typedef boost::graph_traits<graph_t>::out_edge_iterator out_edge_iterator_t; + typedef boost::graph_traits<graph_t>::vertex_iterator vertex_iterator_t; + + typedef boost::graph_traits<graph_t>::vertex_descriptor vertex_t; + + typedef boost::property_map<graph_t,boost::edge_color_t>::type edge_color_map_t; + typedef boost::property_map<graph_t,boost::edge_weight_t>::type edge_weight_map_t; + typedef boost::property_map<graph_t,edge_operation_t>::type edge_operation_map_t; + + typedef std::vector<vertex_t> predecessor_map_t; + + public: + StateGraph( int, std::ostream& ); + + void edge( int v_from, int v_to, int weight, int operation ); + std::stringstream& operator [] ( int key ) + { + std::stringstream *_s = _cmd[key]; + if ( _s == 0 ) { + _s = new std::stringstream(); + _cmd[key] = _s; + } + return *_s; + } + + void girdle( int start ); + + private: + + graph_t g; + edge_weight_map_t weight; + edge_color_map_t color; + edge_operation_map_t operation; + + void shortest_path( vertex_t, vertex_t ); + vertex_t walk_from( vertex_t v ); + vertex_t vertex_with_white_edge(); + int least_cost_edge_aux( const vertex_t&, const vertex_t& ); + + std::map<int,std::stringstream *> _cmd; + + std::ostream& out; +}; + Added: trunk/complement/explore/app/SMTP-tools/scgen/ut/Makefile =================================================================== --- trunk/complement/explore/app/SMTP-tools/scgen/ut/Makefile (rev 0) +++ trunk/complement/explore/app/SMTP-tools/scgen/ut/Makefile 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,28 @@ +# -*- Makefile -*- Time-stamp: <03/09/09 12:54:58 ptr> +# $Id: Makefile,v 1.1 2003/09/11 10:34:11 ptr Exp $ + +SRCROOT := ../../../../../extern/complement +COMPILER_NAME := gcc + +ALL_TAGS := dbg-shared + +include Makefile.inc +include ${SRCROOT}/Makefiles/top.mak + + +INCLUDES += -I$(SRCROOT)/include -I$(STLPORT_INCLUDE_DIR) -I$(BOOST_INCLUDE_DIR) -I.. + +release-shared: LDSEARCH = -L${STLPORT_LIB_DIR} -L${CoMT_LIB_DIR} +stldbg-shared: LDSEARCH = -L${STLPORT_LIB_DIR} -L${CoMT_LIB_DIR_STLDBG} +dbg-shared: LDSEARCH = -L${STLPORT_LIB_DIR} -L${CoMT_LIB_DIR_DBG} + +ifeq ($(OSNAME),sunos) +release-shared : LDLIBS = -lstlport_gcc -lrt +stldbg-shared : LDLIBS = -lstlport_gcc_stldebug -lrt +dbg-shared : LDLIBS = -lstlport_gcc -lrt +else +release-shared : LDLIBS = -lstlport_gcc -lboost_test_utf_gcc +stldbg-shared : LDLIBS = -lstlport_gcc_stldebug -lboost_test_utf_gcc_stl-g +dbg-shared : LDLIBS = -lstlport_gcc -lboost_test_utf_gcc-g +endif + Added: trunk/complement/explore/app/SMTP-tools/scgen/ut/Makefile.inc =================================================================== --- trunk/complement/explore/app/SMTP-tools/scgen/ut/Makefile.inc (rev 0) +++ trunk/complement/explore/app/SMTP-tools/scgen/ut/Makefile.inc 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,5 @@ +# -*- makefile -*- Time-stamp: <03/09/09 12:51:52 ptr> +# $Id: Makefile.inc,v 1.1 2003/09/11 10:34:11 ptr Exp $ + +PRGNAME = ut +SRC_CC = unit_test.cc ../stategraph.cc Added: trunk/complement/explore/app/SMTP-tools/scgen/ut/unit_test.cc =================================================================== --- trunk/complement/explore/app/SMTP-tools/scgen/ut/unit_test.cc (rev 0) +++ trunk/complement/explore/app/SMTP-tools/scgen/ut/unit_test.cc 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,88 @@ +// -*- C++ -*- Time-stamp: <03/09/29 15:21:38 ptr> + +#ifdef __unix +# ifdef __HP_aCC +#pragma VERSIONID "@(#)$Id: unit_test.cc,v 1.2 2003/10/06 07:56:08 ptr Exp $" +# else +#ident "@(#)$Id: unit_test.cc,v 1.2 2003/10/06 07:56:08 ptr Exp $" +# endif +#endif + +#include <boost/test/unit_test.hpp> + +using namespace boost::unit_test_framework; +using namespace std; + +#include <iostream> +#include <sstream> + +#include "stategraph.h" + + +enum vertex { + NotConnected, + Connected, + Greeting, + NVertices +}; + +enum edge { + _connect_, + _disconnect_, + _QUIT_, + _HELO_, + _NCommands_ +}; + +void girdle_test_1() +{ + stringstream s; + + StateGraph g( NVertices, s ); + + g.edge( NotConnected, Connected, 5, _connect_ ); + g.edge( Connected, Greeting, 1, _HELO_ ); + g.edge( Greeting, NotConnected, 5, _QUIT_ ); + + g[_connect_] << "1."; + g[_disconnect_] << "2."; + g[_QUIT_] << "3."; + g[_HELO_] << "4."; + + g.girdle( NotConnected ); + + BOOST_REQUIRE( s.str() == "1.4.3." ); +} + +void girdle_test_2() +{ + stringstream s; + + StateGraph g( NVertices, s ); + + g.edge( NotConnected, Connected, 5, _connect_ ); + g.edge( Connected, Greeting, 1, _HELO_ ); + g.edge( Greeting, NotConnected, 5, _QUIT_ ); + g.edge( Greeting, NotConnected, 10, _disconnect_ ); + g.edge( Connected, NotConnected, 10, _disconnect_ ); + + g[_connect_] << "1."; + g[_disconnect_] << "2."; + g[_QUIT_] << "3."; + g[_HELO_] << "4."; + + g.girdle( NotConnected ); + + BOOST_REQUIRE( s.str() == "1.4.3.1.2.1.4.2." ); + // cout << s.str() << endl; +} + +test_suite *init_unit_test_suite( int argc, char **argv ) +{ + test_suite *ts = BOOST_TEST_SUITE( "StateGraph test" ); + + ts->add( BOOST_TEST_CASE( &girdle_test_1 ) ); + ts->add( BOOST_TEST_CASE( &girdle_test_2 ) ); + + return ts; +} Added: trunk/complement/explore/app/SMTP-tools/smtp-ut/bad-addr-2 =================================================================== --- trunk/complement/explore/app/SMTP-tools/smtp-ut/bad-addr-2 (rev 0) +++ trunk/complement/explore/app/SMTP-tools/smtp-ut/bad-addr-2 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,10 @@ +# comment +connect $1 $2 +expected 220 +EHLO $3 +expected 250 +MAIL FROM:<x@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.com> +expected 500 +QUIT +expected 221 +disconnect Added: trunk/complement/explore/app/SMTP-tools/smtp-ut/bad-body-1 =================================================================== --- trunk/complement/explore/app/SMTP-tools/smtp-ut/bad-body-1 (rev 0) +++ trunk/complement/explore/app/SMTP-tools/smtp-ut/bad-body-1 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,23 @@ +# bad-body-1 +connect $1 $2 +expected 220 +EHLO $3 +expected 250 +MAIL FROM:<$4> +expected 250 +RCPT TO:<$5> +expected 250 +send $6 $7 +DATA +expected 354 +>>>A +Subject: KL smtp relay test + +Expected 1 +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +<<<A +expected 500 +wait +QUIT +expected 221 +disconnect Added: trunk/complement/explore/app/SMTP-tools/smtp-ut/bad-domain-1 =================================================================== --- trunk/complement/explore/app/SMTP-tools/smtp-ut/bad-domain-1 (rev 0) +++ trunk/complement/explore/app/SMTP-tools/smtp-ut/bad-domain-1 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,8 @@ +# comment +connect $1 $2 +expected 220 +EHLO badhost +expected 250 +QUIT +expected 221 +disconnect Added: trunk/complement/explore/app/SMTP-tools/smtp-ut/dot-line =================================================================== --- trunk/complement/explore/app/SMTP-tools/smtp-ut/dot-line (rev 0) +++ trunk/complement/explore/app/SMTP-tools/smtp-ut/dot-line 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,28 @@ +# comment +connect $1 $2 +expected 220 +EHLO $3 +expected 250 +MAIL FROM:<$4> +expected 250 +RCPT TO:<$4> +expected 250 +#send $5 $6 +DATA +expected 354 +>>>A +Subject: KL smtp relay test + +Expected 1 and 2 should be here: 1, 2. More chars. +. +You must see this line. + +. + +And this line too! +<<<A +expected 250 +#wait +QUIT +expected 221 +disconnect Added: trunk/complement/explore/app/SMTP-tools/smtp-ut/good-addr =================================================================== --- trunk/complement/explore/app/SMTP-tools/smtp-ut/good-addr (rev 0) +++ trunk/complement/explore/app/SMTP-tools/smtp-ut/good-addr 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,23 @@ +# good-addr test +connect $1 $2 +expected 220 +EHLO $3 +expected 250 +MAIL FROM:<$4> +expected 250 +RCPT TO:<$5> +expected 250 +send $6 $7 +DATA +expected 354 +>>>A +Subject: KL smtp relay test + +Expected 1 +<<<A +expected 250 +wait +QUIT +expected 221 +disconnect +# end of good-addr test Added: trunk/complement/explore/app/SMTP-tools/smtp-ut/good-domain-1 =================================================================== --- trunk/complement/explore/app/SMTP-tools/smtp-ut/good-domain-1 (rev 0) +++ trunk/complement/explore/app/SMTP-tools/smtp-ut/good-domain-1 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,8 @@ +# comment +connect localhost 10025 +expected 220 +EHLO peak.avp.ru +expected 250 +QUIT +expected 221 +disconnect Added: trunk/complement/explore/app/SMTP-tools/smtp-ut/good-domain-2 =================================================================== --- trunk/complement/explore/app/SMTP-tools/smtp-ut/good-domain-2 (rev 0) +++ trunk/complement/explore/app/SMTP-tools/smtp-ut/good-domain-2 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,8 @@ +# comment +connect localhost 10025 +expected 220 +EHLO 127.0.0.1 +expected 250 +QUIT +expected 221 +disconnect Added: trunk/complement/explore/app/SMTP-tools/smtp-ut/null-char =================================================================== (Binary files differ) Property changes on: trunk/complement/explore/app/SMTP-tools/smtp-ut/null-char ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/complement/explore/app/SMTP-tools/smtp-ut/scr.sed =================================================================== --- trunk/complement/explore/app/SMTP-tools/smtp-ut/scr.sed (rev 0) +++ trunk/complement/explore/app/SMTP-tools/smtp-ut/scr.sed 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,24 @@ +# This is sed script to generate MTA test script from output of command like +# find /opt/mcollection/1/Disinfected/ -type f -print + +i \ +# ----- begin\ +connect $1 $2\ +expected 220\ +EHLO $3\ +expected 250\ +MAIL FROM:<$4>\ +expected 250\ +RCPT TO:<$5>\ +expected 250\ +send $6 $7\ +DATA\ +expected 354 +s/\(.*\)/include "\1"/ +a \ +expected 250\ +wait\ +QUIT\ +expected 221\ +disconnect\ +# ----- end Added: trunk/complement/explore/app/SMTP-tools/smtp-ut/smtp-batch/Makefile =================================================================== --- trunk/complement/explore/app/SMTP-tools/smtp-ut/smtp-batch/Makefile (rev 0) +++ trunk/complement/explore/app/SMTP-tools/smtp-ut/smtp-batch/Makefile 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,28 @@ +# -*- Makefile -*- Time-stamp: <04/05/06 14:30:08 ptr> +# $Id: Makefile,v 1.1 2004/06/16 14:24:07 ptr Exp $ + +#SRCROOT := ../../../../extern/complement +SRCROOT := ../../../../../../island/workshop/explore +COMPILER_NAME := gcc + +include Makefile.inc +include ${SRCROOT}/Makefiles/top.mak + + +DEFS += -D_NO_TEST +INCLUDES += -I$(SRCROOT)/include -I$(STLPORT_INCLUDE_DIR) -I$(BOOST_INCLUDE_DIR) + +release-shared: LDSEARCH = -L${STLPORT_LIB_DIR} -L${CoMT_LIB_DIR} -Wl,-rpath=${STLPORT_LIB_DIR} +stldbg-shared: LDSEARCH = -L${STLPORT_LIB_DIR} -L${CoMT_LIB_DIR_STLDBG} -Wl,-rpath=${STLPORT_LIB_DIR} +dbg-shared: LDSEARCH = -L${STLPORT_LIB_DIR} -L${CoMT_LIB_DIR_DBG} -Wl,-rpath=${STLPORT_LIB_DIR} + +ifeq ($(OSNAME),sunos) +release-shared : LDLIBS = -lstlport_gcc -lrt +stldbg-shared : LDLIBS = -lstlport_gcc_stldebug -lrt +dbg-shared : LDLIBS = -lstlport_gcc_debug -lrt +else +release-shared : LDLIBS = -lstlport_gcc -lxmt_gcc -lsockios_gcc -lmisc_gcc -lboost_regex_gcc +stldbg-shared : LDLIBS = -lstlport_gcc_stldebug -lxmt_gcc_stl-g -lsockios_gcc_stl-g -lmisc_gcc_stl-g -lboost_regex_gcc_stl-g +dbg-shared : LDLIBS = -lstlport_gcc_debug -lxmt_gcc-g -lsockios_gcc-g -lmisc_gcc-g -lboost_regex_gcc-g +endif + Added: trunk/complement/explore/app/SMTP-tools/smtp-ut/smtp-batch/Makefile.inc =================================================================== --- trunk/complement/explore/app/SMTP-tools/smtp-ut/smtp-batch/Makefile.inc (rev 0) +++ trunk/complement/explore/app/SMTP-tools/smtp-ut/smtp-batch/Makefile.inc 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,5 @@ +# -*- makefile -*- Time-stamp: <03/09/15 18:23:15 ptr> +# $Id: Makefile.inc,v 1.1 2004/06/16 14:24:07 ptr Exp $ + +PRGNAME = smtp-batch +SRC_CC = smtp-batch.cc Added: trunk/complement/explore/app/SMTP-tools/smtp-ut/smtp-batch/smtp-batch.cc =================================================================== --- trunk/complement/explore/app/SMTP-tools/smtp-ut/smtp-batch/smtp-batch.cc (rev 0) +++ trunk/complement/explore/app/SMTP-tools/smtp-ut/smtp-batch/smtp-batch.cc 2008-04-09 10:22:41 UTC (rev 1844) @@ -0,0 +1,574 @@ +// -*- C++ -*- Time-stamp: <04/06/16 12:51:35 ptr> + +#ifdef __unix +# ifdef __HP_aCC +#pragma VERSIONID "@(#)$Id: smtp-batch.cc,v 1.1 2004/06/16 14:24:07 ptr Exp $" +# else +#ident "@(#)$Id: smtp-batch.cc,v 1.1 2004/06/16 14:24:07 ptr Exp $" +# endif +#endif + + +#include <mt/xmt.h> +#include <mt/time.h> +#include <sockios/sockstream> +#include <misc/args.h> + +#include <iostream> +#include <iomanip> +#include <fstream> +#include <map> + +#include <boost/regex.hpp> + +using namespace std; +using namespace boost; + +struct conn +{ + conn() + { + tm[0].tv_sec = tm[1].tv_sec = tm[2].tv_sec = 0; + tm[0].tv_nsec = tm[1].tv_nsec = tm[2].tv_nsec = 0; + } + + conn( const conn& _c ) + { tm[0] = _c.tm[0]; tm[1] = _c.tm[1]; tm[2] = _c.tm[2]; } + + timespec tm[3]; // time of send, time of response, elapsed interval (from tecol server) +}; + +typedef std::pair<std::string,conn> map_type; +typedef std::map<std::string,conn> container_type; +static container_type m; +static container_type finished; + +enum command_type { + UNKNOWN = 0, + HELO, + EHLO, + VRFY, + EXPN, + NOOP, + RSET, + QUIT, + DATA, + HELP, + MAIL, + RCPT, + _connect_, + _disconnect_, + _wait_, + _include_, + _send_, + _expected_, + _delay_, + LAST_CMD +}; + +map<command_type,string> CMD; +sockstream tecol; +__impl::Condition tecol_ready; + +void init_map() +{ + CMD[UNKNOWN] = ""; + CMD[HELO] = "HELO"; + CMD[EHLO] = "EHLO"; + CMD[VRFY] = "VRFY"; + CMD[EXPN] = "EXPN"; + CMD[NOOP] = "NOOP"; + CMD[RSET] = "RSET"; + CMD[QUIT] = "QUIT"; + CMD[DATA] = "DATA"; + CMD[HELP] = "HELP"; + CMD[MAIL] = "MAIL"; + CMD[RCPT] = "RCPT"; + CMD[_connect_] = "connect"; + CMD[_disconnect_] = "disconnect"; + CMD[_wait_] = "wait"; + CMD[_include_] = "include"; + CMD[_send_] = "send"; + CMD[_expected_] = "expected"; + CMD[_delay_] = "delay"; +} + +class RAWclient +{ + public: + RAWclient() + { } + + ~RAWclient() + { + s.close(); + sess << "== " << calendar_time( time(0) ) << endl; + } + + void open( const string& host, int port, const string& log ) + { + if ( !sess.is_open() ) { + sess.open( log.c_str() ); + sess << "== " << calendar_time( time(0) ) << ' ' + << "this prg name and args" << endl; + } + s.open( host.c_str(), port ); + // _hostname = host; + // _port = port; + sess << "=+ " << calendar_time( time(0) ) + << ' ' << host << ':' << port << endl; + } + + void close() + { + s.close(); + sess << "=- " << calendar_time( time(0) ) << endl; + // sess.close(); + } + + // bool is_open() const + // { return s.is_open(); } + + // const string& hostname() const + // { return _hostname; } + + // int port() const + // { return _port; } + + void command( const string& str ) + { + s << str << "\r\n"; + s.flush(); + sess << "<- " << str << "\r\n"; + } + + int response( string& text ) + { + string line; + text.clear(); + getline( s, line ); + sess << "-> " << line; + while ( line.length() > 3 && line[3] == '-' ) { + text += line.substr( 4 ); + getline( s, line ); + sess << "\n-> " << line; + } + text += line; + stringstream str( line ); + int ret; + str >> ret; + getline( str, text ); + sess << endl; + return ret; + } + + string rawline() + { + string line; + getline( s, line ); + sess << "-> " << line << endl; + + return line; + } + + void write_silent( const string& str ) + { + s << str; + s.flush(); + } + + template <class InputIter> + void write_silent( InputIter b, InputIter e ) + { + ostream_iterator<char> o( s ); + copy( b, e, o ); + s.flush(); + } + + void write( const string& str ) + { + s << str; + /* + if ( str is "^\r\n" ) { + sess << "<- \n"; + skip NL + } + */ + sess << "<- " << str; + s.flush(); + } + + void mark_in_log( const string& str ) + { + sess << "!! " << str; + } + + void import_in_log( const string& str ) + { + sess << "<= " << str << '\n'; + } + + private: + sockstream s; + ofstream sess; + + // string _hostname; + // int _port; +}; + +command_type cmd_token( const string& cmd ) +{ + if ( cmd == "HELO" ) { + return HELO; + } else if ( cmd == "EHLO" ) { + return EHLO; + } else if ( cmd == "VRFY" ) { + return VRFY; + } else if ( cmd == "EXPN" ) { + return EXPN; + } else if ( cmd == "NOOP" ) { + return NOOP; + } else if ( cmd == "RSET" ) { + return RSET; + } else if ( cmd == "QUIT" ) { + return QUIT; + } else if ( cmd == "DATA" ) { + return DATA; + } else if ( cmd == "HELP" ) { + return HELP; + } else if ( cmd == "MAIL" ) { + return MAIL; + } else if ( cmd == "RCPT" ) { + return RCPT; + } else if ( cmd == "connect" ) { + return _connect_; + } else if ( cmd == "disconnect" ) { + return _disconnect_; + } else if ( cmd == "wait" ) { + return _wait_; + } else if ( cmd == "include" ) { + return _include_; + } else if ( cmd == "send" ) { + return _send_; + } else if ( cmd == "expected" ) { + return _expected_; + } else if ( cmd == "delay" ) { + return _delay_; + } + + return UNKNOWN; +} + +void interpret( istream& is, const Argv& arg ) +{ + string s; + ostringstream re; // ( "(\'.*?\')|(\".*?\")" ); + // re.seekp( 5, ios_base::beg ); + // cout << re.tellp() << endl; + re << "(\'.*?\')|(\".*?\")"; + for ( int j = 0; j < arg.size(); ++j ) { + re << "|(\\$" << (j+1) << ")"; + } + // cout << re.str().size() << endl; + // cout << re.str() << endl; + regex REcomment( "(\'.*?\')|(\".*?\")|(#.*)" ); + regex REqoutes( re.str() ); + // regex REname( "([[:space:]]+)((\'(.*?)\')|(\"(.*?)\")|(([[:alnum:]]|(\\\\.))+))" ); + regex REname( "(\'(.*?)\')|(\"(.*?)\")|(([[:word:]\\\\.\\$/,%~+-=])+)" ); + regex REescape( "(\\\\(.))" ); + + re.str( "" ); + re.clear(); + re << "(?1$&)(?2$&)"; + + for ( int j = 0; j < arg.size(); ++j ) { + // "()" used here to separate ?N from replacement string, + // that may contain digits. + re << "(?" << (j+3) << "()" << arg[j] << ")"; + } + // cout << re.str().size() << endl; + // cout << re.str() << endl; + string fmt = re.str(); + + bool verbatim_mode = false; + string verbatim_code; + int ln = 0; + + RAWclient client; + bool send_flag = false; + string id; + + init_map(); + + command_type last_command = UNKNOWN; + + char buf[64]; + gethostname( buf, 64 ); + string my_host_name = buf; + + string lfname; + arg.assign( "-l", lfname ); + + bool nodelay; + arg.assign( "-nodelay", nodelay ); + + while ( is.good() ) { + getline( is, s ); + if ( !is.fail() ) { + ++ln; + s = regex_replace( s, REqoutes, fmt, boost::match_default | boost::format_all ); + cout << ln << ": " << s << endl; + if ( !verbatim_mode ) { + // strip comments + string sr = regex_replace( s, REcomment, "(?1$&)(?2$&)(?3)", boost::match_default | boost::format_all ); + string::size_type p; + if ( (p = sr.find( ">>>" )) != string::npos ) { // start verbatim + verbatim_mode = true; + verbatim_code = sr.substr( p + 3 ); + if ( last_command == DATA && send_flag ) { + string tmp( "X-smtpgw-test: " ); + tmp += id; + tmp += " action=recv\n"; + client.write( tmp ); + send_flag = false; + } + continue; + } + istringstream ss( sr ); + string cmd; + ss >> cmd; + if ( cmd.size() > 0 ) { + command_type command = cmd_token( cmd ); + string host; + int port; + int expected; + string rest; + switch ( command ) { + case _connect_: + ss >> host >> port; + // cout << "connect " << host << ":" << port << endl; + client.open( host, port, lfname ); + break; + case HELO: + case EHLO: + case VRFY: + case EXPN: + getline( ss, rest ); + client.command( CMD[command] + rest ); + last_command = command; + // cout << CMD[command] << rest << endl; + break; + case NOOP: + case RSET: + case QUIT: + case DATA: + client.command( CMD[command] ); + // cout << CMD[command] << endl; + last_command = command; + break; + case HELP: + getline( ss, rest ); + client.command( CMD[command] + rest ); + // cout << CMD[command] << rest << endl; + break; + case MAIL: + case RCPT: + getline( ss, rest ); + client.command( CMD[command] + rest ); + last_command = command; + // cout << CMD[command] << rest << endl; + break; + case _disconnect_: + client.close(); + // cout << CMD[command] << endl; + break; + case _expected_: + ss >> expected; + getline( ss, rest ); + { + string txt; + int resp = client.response( txt ); + if ( resp != expected ) { + stringstream msg; + msg << "Unexpected return code after command " + << CMD[last_command] << ": " + << resp << " (expected " << expected << ")" << endl; + client.mark_in_log( msg.str() ); + cerr << msg.str(); + } + // cout << CMD[command] << rest << endl; + } + break; + case _send_: + ss >> host >> port; + // cout << "send " << host << ":" << port <... [truncated message content] |