complement-svn Mailing List for Complement (Page 9)
Status: Pre-Alpha
Brought to you by:
complement
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(61) |
Nov
(76) |
Dec
(39) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(33) |
Feb
(41) |
Mar
(16) |
Apr
|
May
(22) |
Jun
(14) |
Jul
(64) |
Aug
(60) |
Sep
(35) |
Oct
(34) |
Nov
(10) |
Dec
(5) |
2008 |
Jan
(4) |
Feb
(24) |
Mar
(10) |
Apr
(30) |
May
(15) |
Jun
(50) |
Jul
(20) |
Aug
(7) |
Sep
(8) |
Oct
(10) |
Nov
|
Dec
|
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...> - 2007-10-24 16:57:31
|
Revision: 1777 http://complement.svn.sourceforge.net/complement/?rev=1777&view=rev Author: complement Date: 2007-10-24 09:57:30 -0700 (Wed, 24 Oct 2007) Log Message: ----------- what price of StEM, in terms of memory? Added Paths: ----------- trunk/complement/explore/lib/stem/sample/size/Makefile trunk/complement/explore/lib/stem/sample/size/Makefile.inc trunk/complement/explore/lib/stem/sample/size/sz.cc Added: trunk/complement/explore/lib/stem/sample/size/Makefile =================================================================== --- trunk/complement/explore/lib/stem/sample/size/Makefile (rev 0) +++ trunk/complement/explore/lib/stem/sample/size/Makefile 2007-10-24 16:57:30 UTC (rev 1777) @@ -0,0 +1,20 @@ +# -*- Makefile -*- Time-stamp: <07/10/15 20:16:57 ptr> + +SRCROOT := ../../../.. +COMPILER_NAME := gcc +# ALL_TAGS := install-release-shared install-dbg-shared +# CoMT_DIR := ../../external/complement/explore + +include Makefile.inc +include ${SRCROOT}/Makefiles/gmake/top.mak + +# DEFS += -DUNIT_TEST +INCLUDES += -I${CoMT_INCLUDE_DIR} + +release-shared: PROJECT_LIBS = -lxmt -lsockios -lstem +dbg-shared: PROJECT_LIBS = -lxmtg -lsockiosg -lstemg +ifndef WITHOUT_STLPORT +stldbg-shared: PROJECT_LIBS = -lxmtstlg -lsockiosstlg -lstemstlg +endif + +LDLIBS = -L${CoMT_LIB_DIR} -Wl,-rpath=${CoMT_LIB_DIR}:${STLPORT_LIB_DIR} ${PROJECT_LIBS} Added: trunk/complement/explore/lib/stem/sample/size/Makefile.inc =================================================================== --- trunk/complement/explore/lib/stem/sample/size/Makefile.inc (rev 0) +++ trunk/complement/explore/lib/stem/sample/size/Makefile.inc 2007-10-24 16:57:30 UTC (rev 1777) @@ -0,0 +1,5 @@ +# -*- Makefile -*- + +PRGNAME = sz + +SRC_CC = sz.cc Added: trunk/complement/explore/lib/stem/sample/size/sz.cc =================================================================== --- trunk/complement/explore/lib/stem/sample/size/sz.cc (rev 0) +++ trunk/complement/explore/lib/stem/sample/size/sz.cc 2007-10-24 16:57:30 UTC (rev 1777) @@ -0,0 +1,76 @@ +// -*- C++ -*- Time-stamp: <07/10/15 22:44:45 ptr> + +#include <stem/EventHandler.h> +#include <stem/EvManager.h> + +#include <mt/xmt.h> + +#include <iostream> +#include <string> + +using namespace std; +using namespace xmt; +using namespace stem; + +class StSample : + public stem::EventHandler +{ + public: + StSample(); + StSample( stem::addr_type id, const char *info = 0 ); + StSample( const char *info ); + ~StSample(); + + private: + void func( const stem::Event& ); + + + DECLARE_RESPONSE_TABLE( StSample, stem::EventHandler ); +}; + +StSample::StSample() : + stem::EventHandler() +{ +} + +StSample::StSample( stem::addr_type id, const char *info ) : + stem::EventHandler( id, info ) +{ +} + +StSample::StSample( const char *info ) : + stem::EventHandler( info ) +{ +} + +StSample::~StSample() +{ +} + +void StSample::func( const stem::Event& ev ) +{ +} + +DEFINE_RESPONSE_TABLE( StSample ) + EV_EDS( ST_NULL, 0x200, func ) +END_RESPONSE_TABLE + +int main() +{ + for ( int i = 0; i < 50000; ++i ) { + StSample *s = new StSample; + } + + cout << "ready" << endl; + + string line; + + while ( cin.good() ) { + getline( cin, line ); + if ( !cin.fail() ) { + cerr << "local: " << line << endl; + } + } + + return 0; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-24 16:56:47
|
Revision: 1776 http://complement.svn.sourceforge.net/complement/?rev=1776&view=rev Author: complement Date: 2007-10-24 09:56:45 -0700 (Wed, 24 Oct 2007) Log Message: ----------- sizeof static array Added Paths: ----------- trunk/complement/explore/inquiry/shades/sz/ trunk/complement/explore/inquiry/shades/sz/Makefile trunk/complement/explore/inquiry/shades/sz/Makefile.inc trunk/complement/explore/inquiry/shades/sz/test.cc Property changes on: trunk/complement/explore/inquiry/shades/sz ___________________________________________________________________ Name: svn:ignore + obj Added: trunk/complement/explore/inquiry/shades/sz/Makefile =================================================================== --- trunk/complement/explore/inquiry/shades/sz/Makefile (rev 0) +++ trunk/complement/explore/inquiry/shades/sz/Makefile 2007-10-24 16:56:45 UTC (rev 1776) @@ -0,0 +1,9 @@ +# -*- Makefile -*- Time-stamp: <04/01/09 16:53:50 ptr> + +SRCROOT := ../../.. +COMPILER_NAME := gcc + +include Makefile.inc +include ${SRCROOT}/Makefiles/gmake/top.mak + +LDFLAGS += -Wl,-rpath=${STLPORT_LIB_DIR} Added: trunk/complement/explore/inquiry/shades/sz/Makefile.inc =================================================================== --- trunk/complement/explore/inquiry/shades/sz/Makefile.inc (rev 0) +++ trunk/complement/explore/inquiry/shades/sz/Makefile.inc 2007-10-24 16:56:45 UTC (rev 1776) @@ -0,0 +1,4 @@ +# -*- makefile -*- Time-stamp: <04/04/16 20:55:38 ptr> + +PRGNAME = test +SRC_CC = test.cc Added: trunk/complement/explore/inquiry/shades/sz/test.cc =================================================================== --- trunk/complement/explore/inquiry/shades/sz/test.cc (rev 0) +++ trunk/complement/explore/inquiry/shades/sz/test.cc 2007-10-24 16:56:45 UTC (rev 1776) @@ -0,0 +1,29 @@ +#include <iostream> +// #include <string> + +char *arr[][2] = { + { "1", "1.2" }, + { "2", "2.2" }, + { "2", "2.2" } +}; + +using namespace std; + +int main() +{ + cerr << sizeof(arr) << " " << sizeof(arr[0]) << " " << sizeof(arr)/sizeof(arr[0]) << endl; + +#if 0 + string s( "01234567Tabc" ); + + string::size_type p = s.find( 'T', 6 ); + if ( p != string::npos ) { + cerr << s.substr( 0, p ) << endl; + } + + s.erase( p ); + cerr << s << endl; +#endif + return 0; +} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-24 16:54:38
|
Revision: 1775 http://complement.svn.sourceforge.net/complement/?rev=1775&view=rev Author: complement Date: 2007-10-24 09:54:36 -0700 (Wed, 24 Oct 2007) Log Message: ----------- what price of VS, in terms of memory? Added Paths: ----------- trunk/complement/explore/lib/janus/samples/sz/ trunk/complement/explore/lib/janus/samples/sz/Makefile trunk/complement/explore/lib/janus/samples/sz/Makefile.inc trunk/complement/explore/lib/janus/samples/sz/sz.cc Property changes on: trunk/complement/explore/lib/janus/samples/sz ___________________________________________________________________ Name: svn:ignore + obj Added: trunk/complement/explore/lib/janus/samples/sz/Makefile =================================================================== --- trunk/complement/explore/lib/janus/samples/sz/Makefile (rev 0) +++ trunk/complement/explore/lib/janus/samples/sz/Makefile 2007-10-24 16:54:36 UTC (rev 1775) @@ -0,0 +1,26 @@ +# -*- Makefile -*- Time-stamp: <07/08/08 22:18:48 ptr> + +SRCROOT := ../../../.. +COMPILER_NAME := gcc +# ALL_TAGS := install-release-shared install-dbg-shared +# CoMT_DIR := ../../external/complement/explore + +include Makefile.inc +include ${SRCROOT}/Makefiles/gmake/top.mak + +# DEFS += -DUNIT_TEST +INCLUDES += -I${CoMT_INCLUDE_DIR} + +release-shared: PROJECT_LIBS = -lxmt -lsockios -lstem -ljanus +dbg-shared: PROJECT_LIBS = -lxmtg -lsockiosg -lstemg -ljanusg +ifndef WITHOUT_STLPORT +stldbg-shared: PROJECT_LIBS = -lxmtstlg -lsockiosstlg -lstemstlg -ljanusstlg +endif + +dbg-shared: DEFS += -D__FIT_VS_TRACE +ifndef WITHOUT_STLPORT +stldbg-shared: DEFS += -D__FIT_VS_TRACE +endif + +LDLIBS = -L${CoMT_LIB_DIR} -Wl,-rpath=${CoMT_LIB_DIR}:${STLPORT_LIB_DIR} ${PROJECT_LIBS} + Added: trunk/complement/explore/lib/janus/samples/sz/Makefile.inc =================================================================== --- trunk/complement/explore/lib/janus/samples/sz/Makefile.inc (rev 0) +++ trunk/complement/explore/lib/janus/samples/sz/Makefile.inc 2007-10-24 16:54:36 UTC (rev 1775) @@ -0,0 +1,5 @@ +# -*- Makefile -*- + +PRGNAME = sz + +SRC_CC = sz.cc Added: trunk/complement/explore/lib/janus/samples/sz/sz.cc =================================================================== --- trunk/complement/explore/lib/janus/samples/sz/sz.cc (rev 0) +++ trunk/complement/explore/lib/janus/samples/sz/sz.cc 2007-10-24 16:54:36 UTC (rev 1775) @@ -0,0 +1,135 @@ +// -*- C++ -*- Time-stamp: <07/08/26 12:54:05 ptr> + +#include <janus/vtime.h> +#include <janus/janus.h> +#include <janus/vshostmgr.h> + +#include <stem/EvManager.h> + +#include <mt/xmt.h> + +#include <iostream> +#include <string> + +using namespace janus; +using namespace std; +using namespace xmt; +using namespace stem; + +#define VS_LINE 0x1300 + +class YaSample : + public janus::VTHandler +{ + public: + YaSample(); + YaSample( stem::addr_type id, const char *info = 0 ); + YaSample( const char *info ); + ~YaSample(); + + private: + void vs_line( const stem::Event& ); + + virtual void VSNewMember( const stem::Event_base<VSsync_rq>& ); + virtual void VSOutMember( const stem::Event_base<VSsync_rq>& ); + virtual void VSsync_time( const stem::Event_base<VSsync>& ); + + + DECLARE_RESPONSE_TABLE( YaSample, janus::VTHandler ); +}; + +YaSample::YaSample() : + janus::VTHandler() +{ +} + +YaSample::YaSample( stem::addr_type id, const char *info ) : + janus::VTHandler( id, info ) +{ +} + +YaSample::YaSample( const char *info ) : + janus::VTHandler( info ) +{ +} + +YaSample::~YaSample() +{ +} + +void YaSample::VSNewMember( const stem::Event_base<VSsync_rq>& ev ) +{ + // VTNewMember_data( ev, "" ); + // cerr << "new member" << endl; + VTHandler::VSNewMember( ev ); +} + +void YaSample::VSOutMember( const stem::Event_base<VSsync_rq>& ) +{ + // cerr << "member out" << endl; +} + +void YaSample::VSsync_time( const stem::Event_base<VSsync>& ev ) +{ + // cout << "VSsync_time" << endl; + VTHandler::VSsync_time( ev ); +} + +void YaSample::vs_line( const stem::Event& ev ) +{ + // cerr << "Line here: '" << ev.value() << "'" << endl; +} + +DEFINE_RESPONSE_TABLE( YaSample ) + EV_EDS( ST_NULL, VS_LINE, vs_line ) +END_RESPONSE_TABLE + +int main() +{ + VSHostMgr::add_srvport( 6700 ); + VSHostMgr::add_wellknown( "island.corbina.net:6700" ); + + YaSample sample; + + // sample.manager()->settrf( stem::EvManager::tracenet | stem::EvManager::tracedispatch | stem::EvManager::tracefault ); + // sample.manager()->settrs( &std::cerr ); + + // sample.vtdispatcher()->settrf( janus::Janus::tracenet | janus::Janus::tracedispatch | janus::Janus::tracefault | janus::Janus::tracedelayed | janus::Janus::tracegroup ); + // sample.vtdispatcher()->settrs( &std::cerr ); + + sample.JoinGroup( janus::vs_base::first_user_group ); + + for ( int i = 0; i < 50000; ++i ) { + YaSample *s = new YaSample; + s->JoinGroup( janus::vs_base::first_user_group + i + 1 ); + } + + cout << "ready" << endl; + + Event ev( VS_LINE ); + ev.dest( janus::vs_base::first_user_group ); + + string line; + + while ( cin.good() ) { + getline( cin, line ); + if ( !cin.fail() ) { + cerr << "local: " << line << endl; + ev.value() = line; + try { + sample.JaSend( ev ); + } + catch ( std::domain_error& err ) { + cerr << err.what() << endl; + } + } + } + + // condition cnd; + + // cnd.set( false ); + + // cnd.wait(); + + return 0; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-24 16:54:02
|
Revision: 1774 http://complement.svn.sourceforge.net/complement/?rev=1774&view=rev Author: complement Date: 2007-10-24 09:54:01 -0700 (Wed, 24 Oct 2007) Log Message: ----------- what price of StEM, in terms of memory? Added Paths: ----------- trunk/complement/explore/lib/stem/sample/ trunk/complement/explore/lib/stem/sample/size/ Property changes on: trunk/complement/explore/lib/stem/sample/size ___________________________________________________________________ Name: svn:ignore + obj This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-24 16:52:50
|
Revision: 1773 http://complement.svn.sourceforge.net/complement/?rev=1773&view=rev Author: complement Date: 2007-10-24 09:52:49 -0700 (Wed, 24 Oct 2007) Log Message: ----------- istreambuf_iterator Added Paths: ----------- trunk/complement/explore/inquiry/STLport/istreambuf_iter/ trunk/complement/explore/inquiry/STLport/istreambuf_iter/Makefile trunk/complement/explore/inquiry/STLport/istreambuf_iter/Makefile.inc trunk/complement/explore/inquiry/STLport/istreambuf_iter/test.cc Property changes on: trunk/complement/explore/inquiry/STLport/istreambuf_iter ___________________________________________________________________ Name: svn:ignore + obj Added: trunk/complement/explore/inquiry/STLport/istreambuf_iter/Makefile =================================================================== --- trunk/complement/explore/inquiry/STLport/istreambuf_iter/Makefile (rev 0) +++ trunk/complement/explore/inquiry/STLport/istreambuf_iter/Makefile 2007-10-24 16:52:49 UTC (rev 1773) @@ -0,0 +1,14 @@ +# -*- Makefile -*- Time-stamp: <03/07/09 18:08:47 ptr> + +SRCROOT := ../../.. +# COMPILER_NAME := gcc + +STLPORT_DIR := /export/home/ptr/STLport.lab/STLport +include Makefile.inc +include ${SRCROOT}/Makefiles/gmake/top.mak + + +INCLUDES += -I$(SRCROOT)/include + +LDFLAGS += -Wl,-rpath=$(STLPORT_LIB_DIR) + Added: trunk/complement/explore/inquiry/STLport/istreambuf_iter/Makefile.inc =================================================================== --- trunk/complement/explore/inquiry/STLport/istreambuf_iter/Makefile.inc (rev 0) +++ trunk/complement/explore/inquiry/STLport/istreambuf_iter/Makefile.inc 2007-10-24 16:52:49 UTC (rev 1773) @@ -0,0 +1,4 @@ +# -*- makefile -*- Time-stamp: <02/07/14 14:03:13 ptr> + +PRGNAME = test +SRC_CC = test.cc Added: trunk/complement/explore/inquiry/STLport/istreambuf_iter/test.cc =================================================================== --- trunk/complement/explore/inquiry/STLport/istreambuf_iter/test.cc (rev 0) +++ trunk/complement/explore/inquiry/STLport/istreambuf_iter/test.cc 2007-10-24 16:52:49 UTC (rev 1773) @@ -0,0 +1,52 @@ +#include <iostream> +// #include <fstream> +#include <string> +#include <vector> +#include <iterator> +#include <sstream> + +using namespace std; + +int main() +{ + // ifstream f; + stringstream s( "1234567890" ); + stringstream g( "1234567890xx" ); + char buf[] = "12345678901234"; + string line; + vector<char> v; + + // f.open( "test.txt", fstream::in ); + // v.assign( istreambuf_iterator<char>(f), istreambuf_iterator<char>() ); + + v.assign( istreambuf_iterator<char>(s), istreambuf_iterator<char>() ); + cerr << v.size() << endl; + + for ( vector<char>::const_iterator i = v.begin(); i != v.end(); ++i ) { + cerr << *i; + } + + cerr << endl; + + vector<char>::const_iterator j = v.begin() + 5; + + v.assign( istreambuf_iterator<char>(g), istreambuf_iterator<char>() ); + + j += 1; + + cerr << *j << endl; + + v.assign( buf, buf + 14); + + for ( vector<char>::const_iterator i = v.begin(); i != v.end(); ++i ) { + cerr << *i; + } + + cerr << endl; + + j += 1; + + cerr << *j << endl; + + return 0; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-24 16:52:24
|
Revision: 1772 http://complement.svn.sourceforge.net/complement/?rev=1772&view=rev Author: complement Date: 2007-10-24 09:52:22 -0700 (Wed, 24 Oct 2007) Log Message: ----------- fifo with fstream, order of open Added Paths: ----------- trunk/complement/explore/inquiry/shades/fifo/ trunk/complement/explore/inquiry/shades/fifo/Makefile trunk/complement/explore/inquiry/shades/fifo/Makefile.inc trunk/complement/explore/inquiry/shades/fifo/test.cc Property changes on: trunk/complement/explore/inquiry/shades/fifo ___________________________________________________________________ Name: svn:ignore + obj Added: trunk/complement/explore/inquiry/shades/fifo/Makefile =================================================================== --- trunk/complement/explore/inquiry/shades/fifo/Makefile (rev 0) +++ trunk/complement/explore/inquiry/shades/fifo/Makefile 2007-10-24 16:52:22 UTC (rev 1772) @@ -0,0 +1,9 @@ +# -*- Makefile -*- Time-stamp: <04/01/09 16:53:50 ptr> + +SRCROOT := ../../.. +COMPILER_NAME := gcc + +include Makefile.inc +include ${SRCROOT}/Makefiles/gmake/top.mak + +LDFLAGS += -Wl,--rpath=${STLPORT_LIB_DIR} Added: trunk/complement/explore/inquiry/shades/fifo/Makefile.inc =================================================================== --- trunk/complement/explore/inquiry/shades/fifo/Makefile.inc (rev 0) +++ trunk/complement/explore/inquiry/shades/fifo/Makefile.inc 2007-10-24 16:52:22 UTC (rev 1772) @@ -0,0 +1,4 @@ +# -*- makefile -*- Time-stamp: <04/01/12 15:37:40 ptr> + +PRGNAME = test +SRC_CC = test.cc Added: trunk/complement/explore/inquiry/shades/fifo/test.cc =================================================================== --- trunk/complement/explore/inquiry/shades/fifo/test.cc (rev 0) +++ trunk/complement/explore/inquiry/shades/fifo/test.cc 2007-10-24 16:52:22 UTC (rev 1772) @@ -0,0 +1,18 @@ +#include <fstream> +#include <iostream> +#include <sys/types.h> +#include <sys/stat.h> + +using namespace std; + +int main() +{ + mkfifo( "./file", 0666 ); + { + ofstream f( "./file" ); + + f << "Hello" << endl; + } + + return 0; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-24 15:17:41
|
Revision: 1771 http://complement.svn.sourceforge.net/complement/?rev=1771&view=rev Author: complement Date: 2007-10-24 08:17:39 -0700 (Wed, 24 Oct 2007) Log Message: ----------- fix hash<void *> Modified Paths: -------------- trunk/complement/explore/include/stem/Event.h Modified: trunk/complement/explore/include/stem/Event.h =================================================================== --- trunk/complement/explore/include/stem/Event.h 2007-10-24 15:14:56 UTC (rev 1770) +++ trunk/complement/explore/include/stem/Event.h 2007-10-24 15:17:39 UTC (rev 1771) @@ -669,7 +669,7 @@ struct hash<void *> { size_t operator()(const void *__x) const - { return static_cast<size_t>(x); } + { return reinterpret_cast<size_t>(__x); } }; #endif // __GNUC__ < 4 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-24 15:15:01
|
Revision: 1770 http://complement.svn.sourceforge.net/complement/?rev=1770&view=rev Author: complement Date: 2007-10-24 08:14:56 -0700 (Wed, 24 Oct 2007) Log Message: ----------- __gnu_cxx::hash<void*> for gcc 3.3.6; initialize pid by unsigned; libstem 4.7.1 Modified Paths: -------------- trunk/complement/explore/include/stem/Event.h trunk/complement/explore/lib/stem/ChangeLog trunk/complement/explore/lib/stem/Makefile.inc Modified: trunk/complement/explore/include/stem/Event.h =================================================================== --- trunk/complement/explore/include/stem/Event.h 2007-10-24 14:41:25 UTC (rev 1769) +++ trunk/complement/explore/include/stem/Event.h 2007-10-24 15:14:56 UTC (rev 1770) @@ -67,7 +67,7 @@ { gaddr_type() : hid(), - pid( -1 ), + pid( 0xffffffff ), addr( badaddr ) { } @@ -664,6 +664,15 @@ } #endif +#if defined(__GNUC__) && (__GNUC__ < 4) +template<> +struct hash<void *> +{ + size_t operator()(const void *__x) const + { return static_cast<size_t>(x); } +}; +#endif // __GNUC__ < 4 + } // namespace __HASH_NAMESPACE #undef __HASH_NAMESPACE Modified: trunk/complement/explore/lib/stem/ChangeLog =================================================================== --- trunk/complement/explore/lib/stem/ChangeLog 2007-10-24 14:41:25 UTC (rev 1769) +++ trunk/complement/explore/lib/stem/ChangeLog 2007-10-24 15:14:56 UTC (rev 1770) @@ -1,3 +1,11 @@ +2007-10-24 Petr Ovtchenkov <pt...@is...> + + * Event.h: initialize pid by unsigned; + + * Event.h: __gnu_cxx::hash<void*> for gcc 3.3.6; + + * * libstem: library version 4.7.1 + 2007-10-16 Petr Ovtchenkov <pt...@is...> * Event.h, EvManager.h: use hash instead of map, this save Modified: trunk/complement/explore/lib/stem/Makefile.inc =================================================================== --- trunk/complement/explore/lib/stem/Makefile.inc 2007-10-24 14:41:25 UTC (rev 1769) +++ trunk/complement/explore/lib/stem/Makefile.inc 2007-10-24 15:14:56 UTC (rev 1770) @@ -3,7 +3,7 @@ LIBNAME = stem MAJOR = 4 MINOR = 7 -PATCH = 0 +PATCH = 1 SRC_CC = _EventHandler.cc NetTransport.cc EvManager.cc EvPack.cc crc.cc \ Names.cc Cron.cc This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-24 14:41:26
|
Revision: 1769 http://complement.svn.sourceforge.net/complement/?rev=1769&view=rev Author: complement Date: 2007-10-24 07:41:25 -0700 (Wed, 24 Oct 2007) Log Message: ----------- allow build without BFD; fix order of def/undef Modified Paths: -------------- trunk/complement/explore/include/config/feature.h Modified: trunk/complement/explore/include/config/feature.h =================================================================== --- trunk/complement/explore/include/config/feature.h 2007-10-24 14:29:05 UTC (rev 1768) +++ trunk/complement/explore/include/config/feature.h 2007-10-24 14:41:25 UTC (rev 1769) @@ -128,9 +128,12 @@ #define __FIT_DISABLE_BFD -#if 0 #ifdef __FIT_DISABLE_BFD +# ifdef __FIT_PRESENT_BFD +# undef __FIT_PRESENT_BFD +# endif /* Without BFD we can't take info about stack */ +#if 0 # ifdef __FIT_CREATE_THREAD_STACK_INFO # undef __FIT_CREATE_THREAD_STACK_INFO # endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-24 14:29:08
|
Revision: 1768 http://complement.svn.sourceforge.net/complement/?rev=1768&view=rev Author: complement Date: 2007-10-24 07:29:05 -0700 (Wed, 24 Oct 2007) Log Message: ----------- allow build without BFD; libxmt 1.14.1 Modified Paths: -------------- trunk/complement/explore/lib/mt/Makefile Modified: trunk/complement/explore/lib/mt/Makefile =================================================================== --- trunk/complement/explore/lib/mt/Makefile 2007-10-24 14:25:11 UTC (rev 1767) +++ trunk/complement/explore/lib/mt/Makefile 2007-10-24 14:29:05 UTC (rev 1768) @@ -8,7 +8,8 @@ INCLUDES += -I$(SRCROOT)/include HEADERS_BASE = $(SRCROOT)/include/mt $(SRCROOT)/include/config $(SRCROOT)/include/misc -LDLIBS += -ldl -lbfd +# LDLIBS += -ldl -lbfd +LDLIBS += -ldl check: all-shared $(MAKE) -C ut all-shared This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-24 14:25:15
|
Revision: 1767 http://complement.svn.sourceforge.net/complement/?rev=1767&view=rev Author: complement Date: 2007-10-24 07:25:11 -0700 (Wed, 24 Oct 2007) Log Message: ----------- allow build without BFD; libxmt 1.14.1 Modified Paths: -------------- trunk/complement/explore/include/config/_linux.h trunk/complement/explore/include/config/feature.h trunk/complement/explore/lib/mt/ChangeLog trunk/complement/explore/lib/mt/Makefile.inc trunk/complement/explore/lib/mt/callstack.cc Modified: trunk/complement/explore/include/config/_linux.h =================================================================== --- trunk/complement/explore/include/config/_linux.h 2007-10-16 08:03:28 UTC (rev 1766) +++ trunk/complement/explore/include/config/_linux.h 2007-10-24 14:25:11 UTC (rev 1767) @@ -82,4 +82,12 @@ #define __FIT_EPOLL */ +/* + * Normally, in Linux present BFD mechanism + */ + +#ifndef __FIT_DISABLE_BFD +# define __FIT_PRESENT_BFD +#endif + #endif /* __config__linux_h */ Modified: trunk/complement/explore/include/config/feature.h =================================================================== --- trunk/complement/explore/include/config/feature.h 2007-10-16 08:03:28 UTC (rev 1766) +++ trunk/complement/explore/include/config/feature.h 2007-10-24 14:25:11 UTC (rev 1767) @@ -114,9 +114,27 @@ /* Store information about stack before create thread in xmt::Thread; - useful for debugging. + useful for debugging. Real implementation require BFD. */ +/* #define __FIT_CREATE_THREAD_STACK_INFO +*/ +/* + Don't use bfd, even if it available on platform; printing stack + impossible without BFD (Binary File Descriptor). +*/ + +#define __FIT_DISABLE_BFD + +#if 0 +#ifdef __FIT_DISABLE_BFD +/* Without BFD we can't take info about stack */ +# ifdef __FIT_CREATE_THREAD_STACK_INFO +# undef __FIT_CREATE_THREAD_STACK_INFO +# endif +#endif +#endif + #endif /* __config_feature_h */ Modified: trunk/complement/explore/lib/mt/ChangeLog =================================================================== --- trunk/complement/explore/lib/mt/ChangeLog 2007-10-16 08:03:28 UTC (rev 1766) +++ trunk/complement/explore/lib/mt/ChangeLog 2007-10-24 14:25:11 UTC (rev 1767) @@ -1,3 +1,11 @@ +2007-10-24 Petr Ovtchenkov <pt...@is...> + + * config/feature.h, config/_linux.h: allow build without BFD; + + * callstack.cc: suggest dummy call, if no BFD available; + + * libxmt: version 1.14.1 + 2007-09-24 Petr Ovtchenkov <pt...@is...> * callstack.h, callstack.cc: print call stack to ostream, initial Modified: trunk/complement/explore/lib/mt/Makefile.inc =================================================================== --- trunk/complement/explore/lib/mt/Makefile.inc 2007-10-16 08:03:28 UTC (rev 1766) +++ trunk/complement/explore/lib/mt/Makefile.inc 2007-10-24 14:25:11 UTC (rev 1767) @@ -3,6 +3,6 @@ LIBNAME = xmt MAJOR = 1 MINOR = 14 -PATCH = 0 +PATCH = 1 SRC_CC = xmt.cc thr_mgr.cc time.cc uid.cc shm.cc callstack.cc SRC_C = fl.c Modified: trunk/complement/explore/lib/mt/callstack.cc =================================================================== --- trunk/complement/explore/lib/mt/callstack.cc 2007-10-16 08:03:28 UTC (rev 1766) +++ trunk/complement/explore/lib/mt/callstack.cc 2007-10-24 14:25:11 UTC (rev 1767) @@ -28,6 +28,23 @@ // #include <stdlib.h> // #include <stdio.h> +#ifndef __FIT_PRESENT_BFD + +#include <mt/callstack.h> + +namespace xmt { + +using namespace std; + +void callstack( std::ostream& s ) +{ + s << "Sorry, compiled without BFD\n"; +} + +} // namespace xmt + +#else // __FIT_PRESENT_BFD + #include <bfd.h> #include <signal.h> #include <ucontext.h> @@ -302,3 +319,4 @@ } // namespace xmt +#endif // __FIT_PRESENT_BFD This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-16 08:03:31
|
Revision: 1766 http://complement.svn.sourceforge.net/complement/?rev=1766&view=rev Author: complement Date: 2007-10-16 01:03:28 -0700 (Tue, 16 Oct 2007) Log Message: ----------- use hash instead of map, this save ~10 bytes per stem object; in gaddr_type structure use 32-bit integer for pid, most systems has max(pid) < 2^15, 64-bit Linuxes max(pid) < 4*1024*1024, but some other unixes may has larger numbers... check it; this save ~24 bytes per stem object; libstem: library version 4.7.0 Modified Paths: -------------- trunk/complement/explore/include/janus/vtime.h trunk/complement/explore/include/stem/EvManager.h trunk/complement/explore/include/stem/Event.h trunk/complement/explore/lib/stem/ChangeLog trunk/complement/explore/lib/stem/EvPack.cc trunk/complement/explore/lib/stem/Makefile.inc Modified: trunk/complement/explore/include/janus/vtime.h =================================================================== --- trunk/complement/explore/include/janus/vtime.h 2007-10-09 13:14:54 UTC (rev 1765) +++ trunk/complement/explore/include/janus/vtime.h 2007-10-16 08:03:28 UTC (rev 1766) @@ -6,6 +6,16 @@ #include <algorithm> #include <list> #include <vector> +#include <iterator> +#include <istream> +#include <ostream> +#include <stdexcept> + +#include <stem/Event.h> +#include <stem/EventHandler.h> + +#include <mt/time.h> + #ifdef STLPORT # include <unordered_map> # include <unordered_set> @@ -24,16 +34,8 @@ # define __USE_STD_TR1 # endif #endif -#include <iterator> -#include <istream> -#include <ostream> -#include <stdexcept> -#include <stem/Event.h> -#include <stem/EventHandler.h> -#include <mt/time.h> - namespace janus { // typedef stem::addr_type oid_type; @@ -41,6 +43,7 @@ } // namespace janus +#if 0 #if defined(__USE_STLPORT_HASH) || defined(__USE_STLPORT_TR1) || defined(__USE_STD_TR1) # define __HASH_NAMESPACE std #endif @@ -68,6 +71,7 @@ } // namespace __HASH_NAMESPACE #undef __HASH_NAMESPACE +#endif namespace janus { Modified: trunk/complement/explore/include/stem/EvManager.h =================================================================== --- trunk/complement/explore/include/stem/EvManager.h 2007-10-09 13:14:54 UTC (rev 1765) +++ trunk/complement/explore/include/stem/EvManager.h 2007-10-16 08:03:28 UTC (rev 1766) @@ -21,7 +21,7 @@ #include <stdint.h> #include <string> -#include <map> +// #include <map> #include <deque> #include <mt/xmt.h> @@ -31,6 +31,25 @@ #include <stem/EventHandler.h> #include <ostream> +#ifdef STLPORT +# include <unordered_map> +# include <unordered_set> +// # include <hash_map> +// # include <hash_set> +// # define __USE_STLPORT_HASH +# define __USE_STLPORT_TR1 +#else +# if defined(__GNUC__) && (__GNUC__ < 4) +# include <ext/hash_map> +# include <ext/hash_set> +# define __USE_STD_HASH +# else +# include <tr1/unordered_map> +# include <tr1/unordered_set> +# define __USE_STD_TR1 +# endif +#endif + namespace stem { namespace detail { @@ -76,6 +95,35 @@ class EvManager { private: +#ifdef __USE_STLPORT_HASH + typedef std::hash_map<addr_type,EventHandler *> local_heap_type; + typedef std::hash_map<addr_type,std::string> info_heap_type; + + typedef std::hash_map<addr_type,gaddr_type> ext_uuid_heap_type; + + typedef std::hash_multimap<gaddr_type,std::pair<addr_type,detail::transport> > uuid_tr_heap_type; + typedef std::hash_multimap<detail::transport_entry,gaddr_type> tr_uuid_heap_type; +#endif +#ifdef __USE_STD_HASH + typedef __gnu_cxx::hash_map<addr_type,EventHandler *> local_heap_type; + typedef __gnu_cxx::hash_map<addr_type,std::string> info_heap_type; + + typedef __gnu_cxx::hash_map<addr_type,gaddr_type> ext_uuid_heap_type; + + typedef __gnu_cxx::hash_multimap<gaddr_type,std::pair<addr_type,detail::transport> > uuid_tr_heap_type; + typedef __gnu_cxx::hash_multimap<detail::transport_entry,gaddr_type> tr_uuid_heap_type; +#endif +#if defined(__USE_STLPORT_TR1) || defined(__USE_STD_TR1) + typedef std::tr1::unordered_map<addr_type,EventHandler *> local_heap_type; + typedef std::tr1::unordered_map<addr_type,std::string> info_heap_type; + + typedef std::tr1::unordered_map<addr_type,gaddr_type> ext_uuid_heap_type; + + typedef std::tr1::unordered_multimap<gaddr_type,std::pair<addr_type,detail::transport> > uuid_tr_heap_type; + typedef std::tr1::unordered_multimap<detail::transport_entry,gaddr_type> tr_uuid_heap_type; +#endif + +#if 0 typedef std::map<addr_type,EventHandler *> local_heap_type; typedef std::map<addr_type,std::string> info_heap_type; @@ -83,6 +131,7 @@ typedef std::multimap<gaddr_type,std::pair<addr_type,detail::transport> > uuid_tr_heap_type; typedef std::multimap<detail::transport_entry,gaddr_type> tr_uuid_heap_type; +#endif static bool tr_compare( const std::pair<gaddr_type,std::pair<addr_type,detail::transport> >& l, const std::pair<gaddr_type,std::pair<addr_type,detail::transport> >& r ) { return l.second.second < r.second.second; } @@ -268,4 +317,17 @@ } // namespace stem +#ifdef __USE_STLPORT_HASH +# undef __USE_STLPORT_HASH +#endif +#ifdef __USE_STD_HASH +# undef __USE_STD_HASH +#endif +#ifdef __USE_STLPORT_TR1 +# undef __USE_STLPORT_TR1 +#endif +#ifdef __USE_STD_TR1 +# undef __USE_STD_TR1 +#endif + #endif // __stem_EvManager_h Modified: trunk/complement/explore/include/stem/Event.h =================================================================== --- trunk/complement/explore/include/stem/Event.h 2007-10-09 13:14:54 UTC (rev 1765) +++ trunk/complement/explore/include/stem/Event.h 2007-10-16 08:03:28 UTC (rev 1766) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/08/17 22:15:41 ptr> +// -*- C++ -*- Time-stamp: <07/10/15 22:41:17 ptr> /* * @@ -31,6 +31,25 @@ #include <mt/uid.h> #include <mt/xmt.h> +#ifdef STLPORT +# include <unordered_map> +# include <unordered_set> +// # include <hash_map> +// # include <hash_set> +// # define __USE_STLPORT_HASH +# define __USE_STLPORT_TR1 +#else +# if defined(__GNUC__) && (__GNUC__ < 4) +# include <ext/hash_map> +# include <ext/hash_set> +# define __USE_STD_HASH +# else +# include <tr1/unordered_map> +# include <tr1/unordered_set> +# define __USE_STD_TR1 +# endif +#endif + namespace stem { typedef uint32_t addr_type; @@ -77,7 +96,10 @@ { } xmt::uuid_type hid; - int64_t pid; // pid_t defined as int, so it may be int64_t + // int64_t pid; // pid_t defined as int, so it may be int64_t + // most systems has max(pid) < 2^15, 64-bit Linuxes max(pid) < 4 *1024 *1024 + // but some other unixes may has larger numbers... check it + uint32_t pid; stem::addr_type addr; __FIT_DECLSPEC virtual void pack( std::ostream& ) const; @@ -618,4 +640,45 @@ namespace EDS = stem; +#if defined(__USE_STLPORT_HASH) || defined(__USE_STLPORT_TR1) || defined(__USE_STD_TR1) +# define __HASH_NAMESPACE std #endif +#if defined(__USE_STD_HASH) +# define __HASH_NAMESPACE __gnu_cxx +#endif + +namespace __HASH_NAMESPACE { + +#ifdef __USE_STD_TR1 +namespace tr1 { +#endif + +template <> +struct hash<stem::gaddr_type> +{ + size_t operator()(const stem::gaddr_type& __x) const + { return __x.addr | (__x.pid << 23); } +}; + +#ifdef __USE_STD_TR1 +} +#endif + +} // namespace __HASH_NAMESPACE + +#undef __HASH_NAMESPACE + +#ifdef __USE_STLPORT_HASH +# undef __USE_STLPORT_HASH +#endif +#ifdef __USE_STD_HASH +# undef __USE_STD_HASH +#endif +#ifdef __USE_STLPORT_TR1 +# undef __USE_STLPORT_TR1 +#endif +#ifdef __USE_STD_TR1 +# undef __USE_STD_TR1 +#endif + +#endif // __stem_Event_h Modified: trunk/complement/explore/lib/stem/ChangeLog =================================================================== --- trunk/complement/explore/lib/stem/ChangeLog 2007-10-09 13:14:54 UTC (rev 1765) +++ trunk/complement/explore/lib/stem/ChangeLog 2007-10-16 08:03:28 UTC (rev 1766) @@ -1,3 +1,16 @@ +2007-10-16 Petr Ovtchenkov <pt...@is...> + + * Event.h, EvManager.h: use hash instead of map, this save + ~10 bytes per stem object; + + * Event.h, EvPack.cc: in gaddr_type structure use 32-bit + integer for pid, most systems has max(pid) < 2^15, 64-bit + Linuxes max(pid) < 4*1024*1024, but some other unixes may + has larger numbers... check it; this save ~24 bytes per + stem object; + + * libstem: library version 4.7.0 + 2007-10-09 Petr Ovtchenkov <pt...@is...> * EventHandler.h: preserve and restore format flags during Modified: trunk/complement/explore/lib/stem/EvPack.cc =================================================================== --- trunk/complement/explore/lib/stem/EvPack.cc 2007-10-09 13:14:54 UTC (rev 1765) +++ trunk/complement/explore/lib/stem/EvPack.cc 2007-10-16 08:03:28 UTC (rev 1766) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/08/03 09:22:05 ptr> +// -*- C++ -*- Time-stamp: <07/10/15 22:35:41 ptr> /* * Copyright (c) 1997-1999, 2002, 2003, 2005, 2006 @@ -143,7 +143,7 @@ __FIT_DECLSPEC void gaddr_type::_xnet_pack( char *buf ) const { - uint64_t _pid = to_net( pid ); + /* uint64_t */ uint32_t _pid = to_net( pid ); addr_type _addr = to_net( addr ); // copy( (char *)hid.u.b, (char *)hid.u.b + 16, buf ); Modified: trunk/complement/explore/lib/stem/Makefile.inc =================================================================== --- trunk/complement/explore/lib/stem/Makefile.inc 2007-10-09 13:14:54 UTC (rev 1765) +++ trunk/complement/explore/lib/stem/Makefile.inc 2007-10-16 08:03:28 UTC (rev 1766) @@ -2,8 +2,8 @@ LIBNAME = stem MAJOR = 4 -MINOR = 6 -PATCH = 5 +MINOR = 7 +PATCH = 0 SRC_CC = _EventHandler.cc NetTransport.cc EvManager.cc EvPack.cc crc.cc \ Names.cc Cron.cc This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-09 13:14:59
|
Revision: 1765 http://complement.svn.sourceforge.net/complement/?rev=1765&view=rev Author: complement Date: 2007-10-09 06:14:54 -0700 (Tue, 09 Oct 2007) Log Message: ----------- removed debug print; use getline, to take line instead of word Modified Paths: -------------- trunk/complement/explore/lib/janus/samples/point1/point1.cc Modified: trunk/complement/explore/lib/janus/samples/point1/point1.cc =================================================================== --- trunk/complement/explore/lib/janus/samples/point1/point1.cc 2007-10-09 13:10:09 UTC (rev 1764) +++ trunk/complement/explore/lib/janus/samples/point1/point1.cc 2007-10-09 13:14:54 UTC (rev 1765) @@ -91,11 +91,11 @@ YaSample sample; - sample.manager()->settrf( stem::EvManager::tracenet | stem::EvManager::tracedispatch | stem::EvManager::tracefault ); - sample.manager()->settrs( &std::cerr ); + // sample.manager()->settrf( stem::EvManager::tracenet | stem::EvManager::tracedispatch | stem::EvManager::tracefault ); + // sample.manager()->settrs( &std::cerr ); - sample.vtdispatcher()->settrf( janus::Janus::tracenet | janus::Janus::tracedispatch | janus::Janus::tracefault | janus::Janus::tracedelayed | janus::Janus::tracegroup ); - sample.vtdispatcher()->settrs( &std::cerr ); + // sample.vtdispatcher()->settrf( janus::Janus::tracenet | janus::Janus::tracedispatch | janus::Janus::tracefault | janus::Janus::tracedelayed | janus::Janus::tracegroup ); + // sample.vtdispatcher()->settrs( &std::cerr ); sample.JoinGroup( janus::vs_base::first_user_group ); @@ -106,7 +106,7 @@ string line; while ( cin.good() ) { - cin >> line; + getline( cin, line ); if ( !cin.fail() ) { cerr << "local: " << line << endl; ev.value() = line; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-09 13:10:11
|
Revision: 1764 http://complement.svn.sourceforge.net/complement/?rev=1764&view=rev Author: complement Date: 2007-10-09 06:10:09 -0700 (Tue, 09 Oct 2007) Log Message: ----------- remove debug print, add comments Modified Paths: -------------- trunk/complement/explore/lib/janus/janus.cc Modified: trunk/complement/explore/lib/janus/janus.cc =================================================================== --- trunk/complement/explore/lib/janus/janus.cc 2007-10-09 12:55:14 UTC (rev 1763) +++ trunk/complement/explore/lib/janus/janus.cc 2007-10-09 13:10:09 UTC (rev 1764) @@ -204,13 +204,10 @@ vt.next( from, grp ); // my counter for ( gid_map_type::const_iterator g = range.first; g != range.second; ++g ) { - cerr << "A1\n"; vt_map_type::iterator k = vtmap.find( g->second ); if ( k == vtmap.end() || k->second.stem_addr() == m.src() ) { // not for nobody and not for self - cerr << "A2\n"; continue; } - cerr << "A3\n"; try { vt.delta( m.value().gvt, from, g->second, grp ); @@ -897,19 +894,20 @@ for ( ; range.first != range.second; ++range.first ) { vt_map_type::iterator i = vtmap.find( range.first->second ); if ( i != vtmap.end() ) { - if ( (i->second.stem_addr() & stem::extbit) == 0 ) { - e_rv.src( i->second.stem_addr() ); - Forward( e_rv ); + stem::addr_type vs_addr = i->second.stem_addr(); + if ( (vs_addr & stem::extbit) == 0 ) { + e_rv.src( vs_addr ); + Forward( e_rv ); // inform remote janus about group member if ( !sync ) { // i->second.get_gvt( gvt ); // if ( gvt_last < gvt ) { // swap( gvt_last, gvt ); // addr = i->second.stem_addr(); // } - e.dest( i->second.stem_addr() ); - Forward( e ); + e.dest( vs_addr ); + Forward( e ); // request local VS Handler about request VS_MERGE_GROUP // return; - sync = true; + sync = true; // only one object informed, no need more } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-09 12:55:15
|
Revision: 1763 http://complement.svn.sourceforge.net/complement/?rev=1763&view=rev Author: complement Date: 2007-10-09 05:55:14 -0700 (Tue, 09 Oct 2007) Log Message: ----------- notify remote janus about local group members from VSsync_group_time Modified Paths: -------------- trunk/complement/explore/lib/janus/janus.cc Modified: trunk/complement/explore/lib/janus/janus.cc =================================================================== --- trunk/complement/explore/lib/janus/janus.cc 2007-10-09 12:51:51 UTC (rev 1762) +++ trunk/complement/explore/lib/janus/janus.cc 2007-10-09 12:55:14 UTC (rev 1763) @@ -204,10 +204,13 @@ vt.next( from, grp ); // my counter for ( gid_map_type::const_iterator g = range.first; g != range.second; ++g ) { + cerr << "A1\n"; vt_map_type::iterator k = vtmap.find( g->second ); if ( k == vtmap.end() || k->second.stem_addr() == m.src() ) { // not for nobody and not for self + cerr << "A2\n"; continue; } + cerr << "A3\n"; try { vt.delta( m.value().gvt, from, g->second, grp ); @@ -868,8 +871,7 @@ #endif // __FIT_VS_TRACE pair<gid_map_type::const_iterator,gid_map_type::const_iterator> range = grmap.equal_range( grp ); if ( range.first != range.second ) { // we have local? member within this group - // const addr_type addr = e.src(); - // expected that addr correspond to remote Janus + const addr_type addr = e.src(); // expected that addr correspond to remote Janus // gaddr_type ga = manager()->reflect( addr ); // addr_type janus_addr = badaddr; @@ -887,7 +889,7 @@ // gvtime_type gvt_last; // stem::addr_type addr = stem::badaddr; stem::Event_base<VSsync_rq> e_rv( VS_OLD_MEMBER_RV ); - e_rv.dest( e.src() ); + e_rv.dest( /* janus_addr */ addr ); e_rv.value().grp = grp; bool sync = false; @@ -953,11 +955,31 @@ e.value().gvt.gvt = ev.value().gvt.gvt; e.value().mess = ev.value().mess; + // (stem) address of remote janus: + gaddr_type ga = manager()->reflect( addr ); + addr_type janus_addr = badaddr; + if ( ga != gaddr_type() ) { + ga.addr = stem::janus_addr; + janus_addr = manager()->reflect( ga ); + if ( janus_addr == badaddr ) { + janus_addr = manager()->SubscribeRemote( ga, "janus" ); + } + } + + stem::Event_base<VSsync_rq> e_rv( VS_OLD_MEMBER_RV ); + e_rv.dest( janus_addr ); + e_rv.value().grp = grp; + for ( ; range.first != range.second; ++range.first ) { vt_map_type::iterator i = vtmap.find( range.first->second ); - if ( i != vtmap.end() && ((i->second.stem_addr() & stem::extbit) == 0 )) { - e.dest( i->second.stem_addr() ); - Forward( e ); + if ( i != vtmap.end() ) { + stem::addr_type vs_addr = i->second.stem_addr(); + if ( (vs_addr & stem::extbit) == 0 ) { + e.dest( vs_addr ); + Forward( e ); // forward VS time from remote as VS_SYNC_TIME + e_rv.src( vs_addr ); + Forward( e_rv ); // inform remote janus about local group member + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-09 12:51:54
|
Revision: 1762 http://complement.svn.sourceforge.net/complement/?rev=1762&view=rev Author: complement Date: 2007-10-09 05:51:51 -0700 (Tue, 09 Oct 2007) Log Message: ----------- preserve and restore format flags during trace; libstem: library version 4.6.5. Modified Paths: -------------- trunk/complement/explore/include/stem/EventHandler.h trunk/complement/explore/lib/stem/ChangeLog trunk/complement/explore/lib/stem/Makefile.inc Modified: trunk/complement/explore/include/stem/EventHandler.h =================================================================== --- trunk/complement/explore/include/stem/EventHandler.h 2007-10-09 11:29:47 UTC (rev 1761) +++ trunk/complement/explore/include/stem/EventHandler.h 2007-10-09 12:51:51 UTC (rev 1762) @@ -472,15 +472,26 @@ } stem::code_type code = event.code(); __AnyPMFentry *entry; + int f = out.flags(); while ( first != last ) { if ( table.get( code, *first, entry ) ) { - out << "\tMessage 0x" << std::hex << code << std::dec << " catcher " + out << "\tMessage " << std::hex << std::showbase << code << std::dec << " catcher " << entry->pmf_name << " (state " << *first << ")"; +#ifdef STLPORT + out.flags( f ); +#else + out.flags( static_cast<std::_Ios_Fmtflags>(f) ); +#endif return true; } ++first; } - out << "\tCatcher not found for message 0x" << std::hex << code << std::dec; + out << "\tCatcher not found for message " << std::hex << std::showbase << code; +#ifdef STLPORT + out.flags( f ); +#else + out.flags( static_cast<std::_Ios_Fmtflags>(f) ); +#endif return false; } @@ -492,10 +503,11 @@ } __AnyPMFentry *entry; typename table_type::const_iterator1 i1 = table.begin(); + int f = out.flags(); while ( i1 != table.end() ) { stem::code_type key1 = table.key1st(*i1); typename table_type::const_iterator2 i2 = table.begin( i1 ); - out << "\tMessage: " << std::hex << key1 << std::dec << std::endl; + out << "\tMessage: " << std::hex << std::showbase << key1 << std::dec << std::endl; while ( i2 != table.end( i1 ) ) { state_type key2 = table.key2nd(*i2++); table.get( key1, key2, entry ); @@ -503,6 +515,11 @@ } ++i1; } +#ifdef STLPORT + out.flags( f ); +#else + out.flags( static_cast<std::_Ios_Fmtflags>(f) ); +#endif } typedef std::list<state_type> HistoryContainer; Modified: trunk/complement/explore/lib/stem/ChangeLog =================================================================== --- trunk/complement/explore/lib/stem/ChangeLog 2007-10-09 11:29:47 UTC (rev 1761) +++ trunk/complement/explore/lib/stem/ChangeLog 2007-10-09 12:51:51 UTC (rev 1762) @@ -1,3 +1,10 @@ +2007-10-09 Petr Ovtchenkov <pt...@is...> + + * EventHandler.h: preserve and restore format flags during + trace; + + * libstem: library version 4.6.5. + 2007-10-01 Petr Ovtchenkov <pt...@is...> * NetTransport.h, NetTransport.cc: comment NetTransportMP, Modified: trunk/complement/explore/lib/stem/Makefile.inc =================================================================== --- trunk/complement/explore/lib/stem/Makefile.inc 2007-10-09 11:29:47 UTC (rev 1761) +++ trunk/complement/explore/lib/stem/Makefile.inc 2007-10-09 12:51:51 UTC (rev 1762) @@ -3,7 +3,7 @@ LIBNAME = stem MAJOR = 4 MINOR = 6 -PATCH = 4 +PATCH = 5 SRC_CC = _EventHandler.cc NetTransport.cc EvManager.cc EvPack.cc crc.cc \ Names.cc Cron.cc This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-09 11:30:05
|
Revision: 1761 http://complement.svn.sourceforge.net/complement/?rev=1761&view=rev Author: complement Date: 2007-10-09 04:29:47 -0700 (Tue, 09 Oct 2007) Log Message: ----------- send notification about group members as response to VS_MERGE_GROUP event [via VS_OLD_MEMBER_RV]; libjanus: version 0.6.0. Modified Paths: -------------- trunk/complement/explore/include/janus/janus.h trunk/complement/explore/include/janus/vtime.h trunk/complement/explore/lib/janus/ChangeLog trunk/complement/explore/lib/janus/Makefile.inc trunk/complement/explore/lib/janus/janus.cc trunk/complement/explore/lib/janus/samples/point1/point1.cc Modified: trunk/complement/explore/include/janus/janus.h =================================================================== --- trunk/complement/explore/include/janus/janus.h 2007-10-08 13:04:57 UTC (rev 1760) +++ trunk/complement/explore/include/janus/janus.h 2007-10-09 11:29:47 UTC (rev 1761) @@ -148,6 +148,7 @@ void VSNewMember( const stem::Event_base<VSsync_rq>& e ); void VSNewRemoteMemberDirect( const stem::Event_base<VSsync_rq>& e ); void VSNewRemoteMemberRevert( const stem::Event_base<VSsync_rq>& e ); + void VSOldRemoteMemberRevert( const stem::Event_base<VSsync_rq>& e ); void VSOutMember( const stem::Event_base<VSsync_rq>& e ); void VSMergeRemoteGroup( const stem::Event_base<VSsync_rq>& e ); Modified: trunk/complement/explore/include/janus/vtime.h =================================================================== --- trunk/complement/explore/include/janus/vtime.h 2007-10-08 13:04:57 UTC (rev 1760) +++ trunk/complement/explore/include/janus/vtime.h 2007-10-09 11:29:47 UTC (rev 1761) @@ -402,9 +402,10 @@ #define VS_SYNC_TIME 0x303 #define VS_NEW_REMOTE_MEMBER 0x304 #define VS_NEW_MEMBER_RV 0x305 -#define VS_HOST_MGR_FINAL 0x306 -#define VS_MERGE_GROUP 0x307 -#define VS_SYNC_GROUP_TIME 0x308 +#define VS_OLD_MEMBER_RV 0x306 +#define VS_HOST_MGR_FINAL 0x307 +#define VS_MERGE_GROUP 0x308 +#define VS_SYNC_GROUP_TIME 0x309 #ifdef __USE_STLPORT_HASH # undef __USE_STLPORT_HASH Modified: trunk/complement/explore/lib/janus/ChangeLog =================================================================== --- trunk/complement/explore/lib/janus/ChangeLog 2007-10-08 13:04:57 UTC (rev 1760) +++ trunk/complement/explore/lib/janus/ChangeLog 2007-10-09 11:29:47 UTC (rev 1761) @@ -1,3 +1,11 @@ +2007-10-09 Petr Ovtchenkov <pt...@is...> + + * janus.h, janus.cc, vtime.h: send notification about + group members as response to VS_MERGE_GROUP event + [via VS_OLD_MEMBER_RV]; + + * libjanus: version 0.6.0. + 2007-10-05 Petr Ovtchenkov <pt...@is...> * janus.h, janus.cc, vtime.h, vtime.cc: cover use-case Modified: trunk/complement/explore/lib/janus/Makefile.inc =================================================================== --- trunk/complement/explore/lib/janus/Makefile.inc 2007-10-08 13:04:57 UTC (rev 1760) +++ trunk/complement/explore/lib/janus/Makefile.inc 2007-10-09 11:29:47 UTC (rev 1761) @@ -2,6 +2,6 @@ LIBNAME = janus MAJOR = 0 -MINOR = 5 +MINOR = 6 PATCH = 0 SRC_CC = vtime.cc janus.cc vshostmgr.cc Modified: trunk/complement/explore/lib/janus/janus.cc =================================================================== --- trunk/complement/explore/lib/janus/janus.cc 2007-10-08 13:04:57 UTC (rev 1760) +++ trunk/complement/explore/lib/janus/janus.cc 2007-10-09 11:29:47 UTC (rev 1761) @@ -886,17 +886,30 @@ // gvtime_type gvt; // gvtime_type gvt_last; // stem::addr_type addr = stem::badaddr; + stem::Event_base<VSsync_rq> e_rv( VS_OLD_MEMBER_RV ); + e_rv.dest( e.src() ); + e_rv.value().grp = grp; + + bool sync = false; + for ( ; range.first != range.second; ++range.first ) { vt_map_type::iterator i = vtmap.find( range.first->second ); - if ( i != vtmap.end() && ((i->second.stem_addr() & stem::extbit) == 0 )) { - // i->second.get_gvt( gvt ); - // if ( gvt_last < gvt ) { - // swap( gvt_last, gvt ); - // addr = i->second.stem_addr(); - // } - e.dest( i->second.stem_addr() ); - Forward( e ); - return; + if ( i != vtmap.end() ) { + if ( (i->second.stem_addr() & stem::extbit) == 0 ) { + e_rv.src( i->second.stem_addr() ); + Forward( e_rv ); + if ( !sync ) { + // i->second.get_gvt( gvt ); + // if ( gvt_last < gvt ) { + // swap( gvt_last, gvt ); + // addr = i->second.stem_addr(); + // } + e.dest( i->second.stem_addr() ); + Forward( e ); + // return; + sync = true; + } + } } } // e.dest( addr ); @@ -907,12 +920,14 @@ void Janus::VSsync_group_time( const stem::Event_base<VSsync>& ev ) { const group_type grp = ev.value().grp; + const addr_type addr = ev.src(); #ifdef __FIT_VS_TRACE try { scoped_lock lk(_lock_tr); if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) ) { int f = _trs->flags(); - *_trs << " VS sync remote group time G" << grp << endl; + *_trs << " VS sync group time from " << hex << showbase << addr + << dec << " G" << grp << endl; #ifdef STLPORT _trs->flags( f ); #else @@ -924,11 +939,17 @@ } #endif // __FIT_VS_TRACE + // const gaddr_type oid = manager()->reflect( addr ); // ???? oid == gaddr + + // add remote memer of group grp + // vtmap[oid].add( addr, grp ); + // grmap.insert( make_pair(grp,oid) ); + // find all local group members and forward data as VS_SYNC_TIME pair<gid_map_type::const_iterator,gid_map_type::const_iterator> range = grmap.equal_range( grp ); stem::Event_base<VSsync> e( VS_SYNC_TIME ); - e.src( ev.src() ); - e.value().grp = ev.value().grp; + e.src( addr ); + e.value().grp = grp; e.value().gvt.gvt = ev.value().gvt.gvt; e.value().mess = ev.value().mess; @@ -941,11 +962,41 @@ } } +void Janus::VSOldRemoteMemberRevert( const stem::Event_base<VSsync_rq>& ev ) +{ + const group_type grp = ev.value().grp; + const addr_type addr = ev.src(); + const gaddr_type oid = manager()->reflect( addr ); // ???? oid == gaddr +#ifdef __FIT_VS_TRACE + try { + scoped_lock lk(_lock_tr); + if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) ) { + int f = _trs->flags(); + *_trs << " VS remote " << hex << showbase << addr + << " (" << oid << ") " + << dec << " G" << grp << endl; +#ifdef STLPORT + _trs->flags( f ); +#else + _trs->flags( static_cast<std::_Ios_Fmtflags>(f) ); +#endif + } + } + catch ( ... ) { + } +#endif // __FIT_VS_TRACE + // add remote memer of group grp + vtmap[oid].add( addr, grp ); + grmap.insert( make_pair(grp,oid) ); +} + + DEFINE_RESPONSE_TABLE( Janus ) EV_Event_base_T_( ST_NULL, VS_MESS, JaDispatch, VSmess ) EV_Event_base_T_( ST_NULL, VS_NEW_MEMBER, VSNewMember, VSsync_rq ) EV_Event_base_T_( ST_NULL, VS_NEW_REMOTE_MEMBER, VSNewRemoteMemberDirect, VSsync_rq ) EV_Event_base_T_( ST_NULL, VS_NEW_MEMBER_RV, VSNewRemoteMemberRevert, VSsync_rq ) + EV_Event_base_T_( ST_NULL, VS_OLD_MEMBER_RV, VSOldRemoteMemberRevert, VSsync_rq ) EV_Event_base_T_( ST_NULL, VS_OUT_MEMBER, VSOutMember, VSsync_rq ) EV_Event_base_T_( ST_NULL, VS_MERGE_GROUP, VSMergeRemoteGroup, VSsync_rq ) EV_Event_base_T_( ST_NULL, VS_SYNC_GROUP_TIME, VSsync_group_time, VSsync ) Modified: trunk/complement/explore/lib/janus/samples/point1/point1.cc =================================================================== --- trunk/complement/explore/lib/janus/samples/point1/point1.cc 2007-10-08 13:04:57 UTC (rev 1760) +++ trunk/complement/explore/lib/janus/samples/point1/point1.cc 2007-10-09 11:29:47 UTC (rev 1761) @@ -108,8 +108,14 @@ while ( cin.good() ) { cin >> line; if ( !cin.fail() ) { + cerr << "local: " << line << endl; ev.value() = line; - sample.JaSend( ev ); + try { + sample.JaSend( ev ); + } + catch ( std::domain_error& err ) { + cerr << err.what() << endl; + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-08 13:05:01
|
Revision: 1760 http://complement.svn.sourceforge.net/complement/?rev=1760&view=rev Author: complement Date: 2007-10-08 06:04:57 -0700 (Mon, 08 Oct 2007) Log Message: ----------- fix typo:: != -> == for request VS_MERGE_GROUP Modified Paths: -------------- trunk/complement/explore/lib/janus/janus.cc Modified: trunk/complement/explore/lib/janus/janus.cc =================================================================== --- trunk/complement/explore/lib/janus/janus.cc 2007-10-08 11:06:51 UTC (rev 1759) +++ trunk/complement/explore/lib/janus/janus.cc 2007-10-08 13:04:57 UTC (rev 1760) @@ -752,7 +752,7 @@ for ( gid_map_type::const_iterator i = grmap.begin(); i != grmap.end(); ++i ) { // for all groups, except vshosts_group, // and only once for earch group - if ( (i->first != vshosts_group) && (gcache.find( i->first) != gcache.end()) ) { + if ( (i->first != vshosts_group) && (gcache.find( i->first ) == gcache.end()) ) { e.value().grp = i->first; Send( e ); gcache.insert( i->first ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-08 11:06:52
|
Revision: 1759 http://complement.svn.sourceforge.net/complement/?rev=1759&view=rev Author: complement Date: 2007-10-08 04:06:51 -0700 (Mon, 08 Oct 2007) Log Message: ----------- debug Modified Paths: -------------- trunk/complement/explore/lib/janus/samples/point1/point1.cc Modified: trunk/complement/explore/lib/janus/samples/point1/point1.cc =================================================================== --- trunk/complement/explore/lib/janus/samples/point1/point1.cc 2007-10-05 17:28:42 UTC (rev 1758) +++ trunk/complement/explore/lib/janus/samples/point1/point1.cc 2007-10-08 11:06:51 UTC (rev 1759) @@ -30,9 +30,11 @@ private: void vs_line( const stem::Event& ); - void VSNewMember( const stem::Event_base<VSsync_rq>& ); - void VSOutMember( const stem::Event_base<VSsync_rq>& ); + virtual void VSNewMember( const stem::Event_base<VSsync_rq>& ); + virtual void VSOutMember( const stem::Event_base<VSsync_rq>& ); + virtual void VSsync_time( const stem::Event_base<VSsync>& ); + DECLARE_RESPONSE_TABLE( YaSample, janus::VTHandler ); }; @@ -67,6 +69,12 @@ cerr << "member out" << endl; } +void YaSample::VSsync_time( const stem::Event_base<VSsync>& ev ) +{ + cout << "VSsync_time" << endl; + VTHandler::VSsync_time( ev ); +} + void YaSample::vs_line( const stem::Event& ev ) { cerr << "Line here: '" << ev.value() << "'" << endl; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-05 17:28:46
|
Revision: 1758 http://complement.svn.sourceforge.net/complement/?rev=1758&view=rev Author: complement Date: 2007-10-05 10:28:42 -0700 (Fri, 05 Oct 2007) Log Message: ----------- test may throw skip_exception to signal that it skipped Modified Paths: -------------- trunk/complement/explore/include/exam/suite.h trunk/complement/explore/lib/exam/ChangeLog trunk/complement/explore/lib/exam/Makefile.inc trunk/complement/explore/lib/exam/suite.cc trunk/complement/explore/lib/janus/ut/vt_operations.cc trunk/complement/explore/lib/janus/ut/vt_operations.h trunk/complement/explore/lib/janus/ut/vt_remote.cc Modified: trunk/complement/explore/include/exam/suite.h =================================================================== --- trunk/complement/explore/include/exam/suite.h 2007-10-05 10:01:09 UTC (rev 1757) +++ trunk/complement/explore/include/exam/suite.h 2007-10-05 17:28:42 UTC (rev 1758) @@ -159,6 +159,11 @@ { }; +class skip_exception : + public std::exception +{ +}; + class test_suite { private: Modified: trunk/complement/explore/lib/exam/ChangeLog =================================================================== --- trunk/complement/explore/lib/exam/ChangeLog 2007-10-05 10:01:09 UTC (rev 1757) +++ trunk/complement/explore/lib/exam/ChangeLog 2007-10-05 17:28:42 UTC (rev 1758) @@ -1,3 +1,10 @@ +2007-10-05 Petr Ovtchenkov <pt...@is...> + + * suite.h, suite.cc: test may throw skip_exception to signal + that it skipped. + + * libexam: version 0.4.0. + 2007-09-07 Petr Ovtchenkov <pt...@is...> * suite.h: added macro EXAM_CHECK_ASYNC_F, EXAM_ERROR_ASYNC_F Modified: trunk/complement/explore/lib/exam/Makefile.inc =================================================================== --- trunk/complement/explore/lib/exam/Makefile.inc 2007-10-05 10:01:09 UTC (rev 1757) +++ trunk/complement/explore/lib/exam/Makefile.inc 2007-10-05 17:28:42 UTC (rev 1758) @@ -2,6 +2,6 @@ LIBNAME = exam MAJOR = 0 -MINOR = 3 +MINOR = 4 PATCH = 0 SRC_CC = logger.cc suite.cc Modified: trunk/complement/explore/lib/exam/suite.cc =================================================================== --- trunk/complement/explore/lib/exam/suite.cc 2007-10-05 10:01:09 UTC (rev 1757) +++ trunk/complement/explore/lib/exam/suite.cc 2007-10-05 17:28:42 UTC (rev 1758) @@ -245,6 +245,14 @@ local_logger->tc( base_logger::skip, _test[v].name ); } } + catch ( skip_exception& ) { + _lock_ll.lock(); + local_logger->tc_break(); + _lock_ll.unlock(); + ++_stat.skipped; + scoped_lock lk( _lock_ll ); + local_logger->tc( base_logger::skip, _test[v].name ); + } catch ( init_exception& ) { _lock_ll.lock(); local_logger->tc_break(); Modified: trunk/complement/explore/lib/janus/ut/vt_operations.cc =================================================================== --- trunk/complement/explore/lib/janus/ut/vt_operations.cc 2007-10-05 10:01:09 UTC (rev 1757) +++ trunk/complement/explore/lib/janus/ut/vt_operations.cc 2007-10-05 17:28:42 UTC (rev 1758) @@ -9,6 +9,29 @@ using namespace std; +vtime_operations::vtime_operations() : + fname( "/tmp/yanus_test.shm" ) +{ + try { + seg.allocate( fname, 4*4096, xmt::shm_base::create | xmt::shm_base::exclusive, 0600 ); + b2 = new ( shm_b.allocate( 1 ) ) xmt::__barrier<true>(); + } + catch ( const xmt::shm_bad_alloc& err ) { + b2 = 0; + // err.what(); + } +} + +vtime_operations::~vtime_operations() +{ + if ( b2 ) { + b2->~__barrier<true>(); + shm_b.deallocate( b2, 1 ); + } + seg.deallocate(); + unlink( fname ); +} + int EXAM_IMPL(vtime_operations::vt_compare) { const oid_type t0(0); Modified: trunk/complement/explore/lib/janus/ut/vt_operations.h =================================================================== --- trunk/complement/explore/lib/janus/ut/vt_operations.h 2007-10-05 10:01:09 UTC (rev 1757) +++ trunk/complement/explore/lib/janus/ut/vt_operations.h 2007-10-05 17:28:42 UTC (rev 1758) @@ -4,36 +4,49 @@ #define __vt_operations_h #include <exam/suite.h> +#include <mt/xmt.h> +#include <mt/shm.h> namespace janus { -struct vtime_operations +class vtime_operations { - int EXAM_DECL(vt_compare); - int EXAM_DECL(vt_add); - int EXAM_DECL(vt_diff); - int EXAM_DECL(vt_max); + public: + vtime_operations(); + ~vtime_operations(); - int EXAM_DECL(gvt_add); + int EXAM_DECL(vt_compare); + int EXAM_DECL(vt_add); + int EXAM_DECL(vt_diff); + int EXAM_DECL(vt_max); - int EXAM_DECL(VTMess_core); + int EXAM_DECL(gvt_add); - int EXAM_DECL(vt_object); + int EXAM_DECL(VTMess_core); - int EXAM_DECL(VTDispatch1); - int EXAM_DECL(VTDispatch2); + int EXAM_DECL(vt_object); - int EXAM_DECL(VTHandler1); - int EXAM_DECL(VTHandler2); + int EXAM_DECL(VTDispatch1); + int EXAM_DECL(VTDispatch2); - int EXAM_DECL(VTSubscription); - int EXAM_DECL(VTEntryIntoGroup); - int EXAM_DECL(VTEntryIntoGroup2); - int EXAM_DECL(VTEntryIntoGroup3); + int EXAM_DECL(VTHandler1); + int EXAM_DECL(VTHandler2); - int EXAM_DECL(remote); - int EXAM_DECL(mgroups); - int EXAM_DECL(wellknownhost); + int EXAM_DECL(VTSubscription); + int EXAM_DECL(VTEntryIntoGroup); + int EXAM_DECL(VTEntryIntoGroup2); + int EXAM_DECL(VTEntryIntoGroup3); + + int EXAM_DECL(remote); + int EXAM_DECL(mgroups); + int EXAM_DECL(wellknownhost); + + private: + const char *fname; + xmt::shm_alloc<0> seg; + xmt::allocator_shm<xmt::__condition<true>,0> shm_cnd; + xmt::allocator_shm<xmt::__barrier<true>,0> shm_b; + xmt::__barrier<true> *b2; }; } // namespace janus Modified: trunk/complement/explore/lib/janus/ut/vt_remote.cc =================================================================== --- trunk/complement/explore/lib/janus/ut/vt_remote.cc 2007-10-05 10:01:09 UTC (rev 1757) +++ trunk/complement/explore/lib/janus/ut/vt_remote.cc 2007-10-05 17:28:42 UTC (rev 1758) @@ -179,21 +179,24 @@ int EXAM_IMPL(vtime_operations::remote) { - const char fname[] = "/tmp/yanus_test.shm"; - xmt::shm_alloc<0> seg; - xmt::allocator_shm<xmt::__condition<true>,0> shm_cnd; - xmt::allocator_shm<xmt::__barrier<true>,0> shm_b; + if ( b2 == 0 ) { + throw exam::skip_exception(); + } + // const char fname[] = "/tmp/yanus_test.shm"; + // xmt::shm_alloc<0> seg; + // xmt::allocator_shm<xmt::__condition<true>,0> shm_cnd; + // xmt::allocator_shm<xmt::__barrier<true>,0> shm_b; try { - seg.allocate( fname, 4*4096, xmt::shm_base::create | xmt::shm_base::exclusive, 0600 ); - xmt::__barrier<true>& b = *new ( shm_b.allocate( 1 ) ) xmt::__barrier<true>(); + // seg.allocate( fname, 4*4096, xmt::shm_base::create | xmt::shm_base::exclusive, 0600 ); + // xmt::__barrier<true>& b = *new ( shm_b.allocate( 1 ) ) xmt::__barrier<true>(); try { xmt::fork(); long res_flag = 0; - b.wait(); + b2->wait(); { VTHandler obj0; // this need to keep VSHostMgr after YaRemote exit @@ -264,7 +267,7 @@ obj1.JoinGroup( janus::vs_base::first_user_group ); - b.wait(); + b2->wait(); // while ( obj1.vtdispatcher()->vs_known_processes() < 2 ) { // xmt::delay( xmt::timespec( 0, 1000000 ) ); @@ -299,36 +302,39 @@ EXAM_CHECK( obj1.ocount == 1 ); } - (&b)->~__barrier<true>(); - shm_b.deallocate( &b, 1 ); + // (&b)->~__barrier<true>(); + // shm_b.deallocate( &b, 1 ); } catch ( const xmt::shm_bad_alloc& err ) { EXAM_ERROR( err.what() ); } - seg.deallocate(); - unlink( fname ); + // seg.deallocate(); + // unlink( fname ); return EXAM_RESULT; } int EXAM_IMPL(vtime_operations::mgroups) { - const char fname[] = "/tmp/yanus_test.shm"; - xmt::shm_alloc<0> seg; - xmt::allocator_shm<xmt::__condition<true>,0> shm_cnd; - xmt::allocator_shm<xmt::__barrier<true>,0> shm_b; + if ( b2 == 0 ) { + throw exam::skip_exception(); + } + // const char fname[] = "/tmp/yanus_test.shm"; + // xmt::shm_alloc<0> seg; + // xmt::allocator_shm<xmt::__condition<true>,0> shm_cnd; + // xmt::allocator_shm<xmt::__barrier<true>,0> shm_b; try { - seg.allocate( fname, 4*4096, xmt::shm_base::create | xmt::shm_base::exclusive, 0600 ); - xmt::__barrier<true>& b = *new ( shm_b.allocate( 1 ) ) xmt::__barrier<true>(); + // seg.allocate( fname, 4*4096, xmt::shm_base::create | xmt::shm_base::exclusive, 0600 ); + // xmt::__barrier<true>& b = *new ( shm_b.allocate( 1 ) ) xmt::__barrier<true>(); try { xmt::fork(); long res_flag = 0; - b.wait(); + b2->wait(); { VTHandler obj0; // this need to keep VSHostMgr after YaRemote exit @@ -379,7 +385,7 @@ obj1.JoinGroup( janus::vs_base::first_user_group ); obj1.JoinGroup( janus::vs_base::first_user_group + 1); - b.wait(); + b2->wait(); obj1.wait_greeting(); obj1.wait_greeting2(); @@ -414,29 +420,33 @@ cerr << obj1.ocount << endl; } - (&b)->~__barrier<true>(); - shm_b.deallocate( &b, 1 ); + // (&b)->~__barrier<true>(); + // shm_b.deallocate( &b, 1 ); } catch ( const xmt::shm_bad_alloc& err ) { EXAM_ERROR( err.what() ); } - seg.deallocate(); - unlink( fname ); + // seg.deallocate(); + // unlink( fname ); return EXAM_RESULT; } int EXAM_IMPL(vtime_operations::wellknownhost) { - const char fname[] = "/tmp/yanus_test.shm"; - xmt::shm_alloc<0> seg; - xmt::allocator_shm<xmt::__condition<true>,0> shm_cnd; - xmt::allocator_shm<xmt::__barrier<true>,0> shm_b; + if ( b2 == 0 ) { + throw exam::skip_exception(); + } + // const char fname[] = "/tmp/yanus_test.shm"; + // xmt::shm_alloc<0> seg; + // xmt::allocator_shm<xmt::__condition<true>,0> shm_cnd; + // xmt::allocator_shm<xmt::__barrier<true>,0> shm_b; + try { - seg.allocate( fname, 4*4096, xmt::shm_base::create | xmt::shm_base::exclusive, 0600 ); - xmt::__barrier<true>& b = *new ( shm_b.allocate( 1 ) ) xmt::__barrier<true>(); + // seg.allocate( fname, 4*4096, xmt::shm_base::create | xmt::shm_base::exclusive, 0600 ); + // xmt::__barrier<true>& b = *new ( shm_b.allocate( 1 ) ) xmt::__barrier<true>(); VSHostMgr::add_wellknown( "localhost:6980" ); VSHostMgr::add_srvport( 6980 ); @@ -446,7 +456,7 @@ long res_flag = 0; - b.wait(); + b2->wait(); { YaRemote obj1( "obj client" ); @@ -468,7 +478,7 @@ obj1.JoinGroup( janus::vs_base::first_user_group ); - b.wait(); + b2->wait(); // while ( obj1.vtdispatcher()->vs_known_processes() < 2 ) { // xmt::delay( xmt::timespec( 0, 1000000 ) ); @@ -502,15 +512,15 @@ // cerr << obj1.vtdispatcher()->vs_known_processes() << endl; } - (&b)->~__barrier<true>(); - shm_b.deallocate( &b, 1 ); + // (&b)->~__barrier<true>(); + // shm_b.deallocate( &b, 1 ); } catch ( const xmt::shm_bad_alloc& err ) { EXAM_ERROR( err.what() ); } - seg.deallocate(); - unlink( fname ); + // seg.deallocate(); + // unlink( fname ); return EXAM_RESULT; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-05 10:01:13
|
Revision: 1757 http://complement.svn.sourceforge.net/complement/?rev=1757&view=rev Author: complement Date: 2007-10-05 03:01:09 -0700 (Fri, 05 Oct 2007) Log Message: ----------- cover use-case with syncronization of same group in different VS nodes during connection [VS_MERGE_GROUP, VS_SYNC_GROUP_TIME]; Janus::VSRemoteMemberRevert hasn't send VS_NEW_MEMBER; fix test. version 0.5.0; Modified Paths: -------------- trunk/complement/explore/include/janus/janus.h trunk/complement/explore/include/janus/vtime.h trunk/complement/explore/lib/janus/ChangeLog trunk/complement/explore/lib/janus/Makefile.inc trunk/complement/explore/lib/janus/janus.cc trunk/complement/explore/lib/janus/ut/Makefile trunk/complement/explore/lib/janus/ut/Makefile.inc trunk/complement/explore/lib/janus/ut/vt_remote.cc trunk/complement/explore/lib/janus/vshostmgr.cc trunk/complement/explore/lib/janus/vtime.cc Modified: trunk/complement/explore/include/janus/janus.h =================================================================== --- trunk/complement/explore/include/janus/janus.h 2007-10-01 16:33:28 UTC (rev 1756) +++ trunk/complement/explore/include/janus/janus.h 2007-10-05 10:01:09 UTC (rev 1757) @@ -42,16 +42,19 @@ typedef std::hash_map<oid_type, detail::vtime_obj_rec> vt_map_type; typedef std::hash_multimap<group_type, oid_type> gid_map_type; typedef std::hash_set<stem::addr_type> addr_cache_t; + typedef std::hash_set<group_type> group_cache_t; #endif #ifdef __USE_STD_HASH typedef __gnu_cxx::hash_map<oid_type, detail::vtime_obj_rec> vt_map_type; typedef __gnu_cxx::hash_multimap<group_type, oid_type> gid_map_type; typedef __gnu_cxx::hash_set<stem::addr_type> addr_cache_t; + typedef __gnu_cxx::hash_set<group_type> group_cache_t; #endif #if defined(__USE_STLPORT_TR1) || defined(__USE_STD_TR1) typedef std::tr1::unordered_map<oid_type, detail::vtime_obj_rec> vt_map_type; typedef std::tr1::unordered_multimap<group_type, oid_type> gid_map_type; typedef std::tr1::unordered_set<stem::addr_type> addr_cache_t; + typedef std::tr1::unordered_set<group_type> group_cache_t; #endif public: @@ -104,8 +107,8 @@ unsigned trflags() const; void settrs( std::ostream * ); - void connect( const char *, int ); - void serve( int ); + int connect( const char *, int ); + int serve( int ); size_t vs_known_processes() const; difference_type group_size( group_type ) const; @@ -147,6 +150,9 @@ void VSNewRemoteMemberRevert( const stem::Event_base<VSsync_rq>& e ); void VSOutMember( const stem::Event_base<VSsync_rq>& e ); + void VSMergeRemoteGroup( const stem::Event_base<VSsync_rq>& e ); + void VSsync_group_time( const stem::Event_base<VSsync>& ev ); + DECLARE_RESPONSE_TABLE( Janus, stem::EventHandler ); }; Modified: trunk/complement/explore/include/janus/vtime.h =================================================================== --- trunk/complement/explore/include/janus/vtime.h 2007-10-01 16:33:28 UTC (rev 1756) +++ trunk/complement/explore/include/janus/vtime.h 2007-10-05 10:01:09 UTC (rev 1757) @@ -372,8 +372,8 @@ virtual void VSNewMember( const stem::Event_base<VSsync_rq>& e ); virtual void VSOutMember( const stem::Event_base<VSsync_rq>& e ); virtual void VSsync_time( const stem::Event_base<VSsync>& ); + virtual void VSMergeRemoteGroup( const stem::Event_base<VSsync_rq>& e ); - // template <class D> // void JaSend( const stem::Event_base<D>& e ) // { VTHandler::JaSend( stem::Event_convert<D>()( e ) ); } @@ -384,7 +384,9 @@ protected: void Unsubscribe(); void VSNewMember_data( const stem::Event_base<VSsync_rq>&, const std::string& data ); + void VSMergeRemoteGroup_data( const stem::Event_base<VSsync_rq>& e, const std::string& data ); + void get_gvtime( group_type g, gvtime_type& gvt ); private: @@ -401,6 +403,8 @@ #define VS_NEW_REMOTE_MEMBER 0x304 #define VS_NEW_MEMBER_RV 0x305 #define VS_HOST_MGR_FINAL 0x306 +#define VS_MERGE_GROUP 0x307 +#define VS_SYNC_GROUP_TIME 0x308 #ifdef __USE_STLPORT_HASH # undef __USE_STLPORT_HASH Modified: trunk/complement/explore/lib/janus/ChangeLog =================================================================== --- trunk/complement/explore/lib/janus/ChangeLog 2007-10-01 16:33:28 UTC (rev 1756) +++ trunk/complement/explore/lib/janus/ChangeLog 2007-10-05 10:01:09 UTC (rev 1757) @@ -1,3 +1,14 @@ +2007-10-05 Petr Ovtchenkov <pt...@is...> + + * janus.h, janus.cc, vtime.h, vtime.cc: cover use-case + with syncronization of same group in different VS nodes + during connection [VS_MERGE_GROUP, VS_SYNC_GROUP_TIME]; + Janus::VSRemoteMemberRevert hasn't send VS_NEW_MEMBER; + + * vt_remote.cc: fix test. + + * libjanus: version 0.5.0; + 2007-10-01 Petr Ovtchenkov <pt...@is...> * janus.cc, vshostmgr.cc: more trace prints; Modified: trunk/complement/explore/lib/janus/Makefile.inc =================================================================== --- trunk/complement/explore/lib/janus/Makefile.inc 2007-10-01 16:33:28 UTC (rev 1756) +++ trunk/complement/explore/lib/janus/Makefile.inc 2007-10-05 10:01:09 UTC (rev 1757) @@ -2,6 +2,6 @@ LIBNAME = janus MAJOR = 0 -MINOR = 4 +MINOR = 5 PATCH = 0 SRC_CC = vtime.cc janus.cc vshostmgr.cc Modified: trunk/complement/explore/lib/janus/janus.cc =================================================================== --- trunk/complement/explore/lib/janus/janus.cc 2007-10-01 16:33:28 UTC (rev 1756) +++ trunk/complement/explore/lib/janus/janus.cc 2007-10-05 10:01:09 UTC (rev 1757) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/08/26 12:44:25 ptr> +// -*- C++ -*- Time-stamp: <07/10/04 01:04:14 ptr> #include <janus/janus.h> #include <janus/vshostmgr.h> @@ -174,6 +174,8 @@ } while ( more ); } +// Send VS event within group grp: + void Janus::JaSend( const stem::Event& e, group_type grp ) { // This method not called from Dispatch, but work on the same level and in the same @@ -213,6 +215,7 @@ // if remote, forward it to foreign VTDispatcher? try { /* const transport tr = */ manager()->transport( k->second.stem_addr() ); + // remote delivery gaddr_type ga = manager()->reflect( k->second.stem_addr() ); if ( ga != gaddr_type() ) { ga.addr = stem::janus_addr; @@ -226,6 +229,7 @@ } } catch ( const range_error& ) { + // local delivery check_and_send( k->second, m ); vt.base_advance(g->second); // store last send VT to obj } @@ -538,13 +542,12 @@ void Janus::VSNewMember( const stem::Event_base<VSsync_rq>& ev ) { - if ( ev.value().grp == vshosts_group ) { - ev.dest( _hostmgr->self_id() ); + if ( ev.value().grp != vshosts_group ) { // shouldn't happens, only trace #ifdef __FIT_VS_TRACE try { scoped_lock lk(_lock_tr); - if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) ) { - *_trs << "<-> VS_NEW_MEMBER G" << vshosts_group << " " + if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) && (_trflags & tracefault) ) { + *_trs << "Unexpected VS_NEW_MEMBER on Janus: G" << ev.value().grp << " " << hex << showbase << ev.src() << " -> " << ev.dest() << dec << endl; } @@ -552,113 +555,121 @@ catch ( ... ) { } #endif // __FIT_VS_TRACE - Forward( ev ); - gaddr_type ga = manager()->reflect( ev.src() ); - addr_type janus_addr = badaddr; - if ( ga != gaddr_type() ) { - ga.addr = stem::janus_addr; - janus_addr = manager()->reflect( ga ); - if ( janus_addr == badaddr ) { - janus_addr = manager()->SubscribeRemote( ga, "janus" ); - } - } - stem::Event_base<VSsync_rq> evr( VS_NEW_MEMBER_RV ); - evr.dest( janus_addr ); - evr.value().grp = vshosts_group; + return; + } + // special group + // Forward info about remote VS node to VSHostMgr + ev.dest( _hostmgr->self_id() ); #ifdef __FIT_VS_TRACE - try { - scoped_lock lk(_lock_tr); - if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) ) { - *_trs << " -> VS_NEW_MEMBER_RV G" << vshosts_group << " " - << hex << showbase - << self_id() << " -> " << evr.dest() << dec << endl; - } + try { + scoped_lock lk(_lock_tr); + if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) ) { + *_trs << "<-> VS_NEW_MEMBER G" << vshosts_group << " " + << hex << showbase + << ev.src() << " -> " << ev.dest() << dec << endl; } - catch ( ... ) { + } + catch ( ... ) { + } +#endif // __FIT_VS_TRACE + Forward( ev ); + + // Return info about me (VS node) back to remote VS node + gaddr_type ga = manager()->reflect( ev.src() ); + addr_type janus_addr = badaddr; + if ( ga != gaddr_type() ) { + ga.addr = stem::janus_addr; + janus_addr = manager()->reflect( ga ); + if ( janus_addr == badaddr ) { + janus_addr = manager()->SubscribeRemote( ga, "janus" ); } -#endif // __FIT_VS_TRACE - Send( evr ); } + stem::Event_base<VSsync_rq> evr( VS_NEW_MEMBER_RV ); + evr.dest( janus_addr ); + evr.value().grp = vshosts_group; #ifdef __FIT_VS_TRACE - else { - try { - scoped_lock lk(_lock_tr); - if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) ) { - *_trs << "Unexpected VS_NEW_MEMBER on Janus: G" << ev.value().grp << " " - << hex << showbase - << ev.src() << " -> " << ev.dest() << dec << endl; - } + try { + scoped_lock lk(_lock_tr); + if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) ) { + *_trs << " -> VS_NEW_MEMBER_RV G" << vshosts_group << " " + << hex << showbase + << self_id() << " -> " << evr.dest() << dec << endl; } - catch ( ... ) { - } } + catch ( ... ) { + } #endif // __FIT_VS_TRACE + Send( evr ); } void Janus::VSNewRemoteMemberDirect( const stem::Event_base<VSsync_rq>& ev ) { - if ( ev.value().grp != vshosts_group ) { - group_type grp = ev.value().grp; - pair<gid_map_type::const_iterator,gid_map_type::const_iterator> range = grmap.equal_range( grp ); - if ( range.first != range.second ) { // we have local? member within this group - const addr_type addr = ev.src(); - gaddr_type ga = manager()->reflect( addr ); - addr_type janus_addr = badaddr; - if ( ga != gaddr_type() ) { - ga.addr = stem::janus_addr; - janus_addr = manager()->reflect( ga ); - if ( janus_addr == badaddr ) { - janus_addr = manager()->SubscribeRemote( ga, "janus" ); + if ( ev.value().grp == vshosts_group ) { // special group, and this shouldn't happens + return; + } + group_type grp = ev.value().grp; + pair<gid_map_type::const_iterator,gid_map_type::const_iterator> range = grmap.equal_range( grp ); + if ( range.first == range.second ) { // no local (?) member within this group + return; + } + + const addr_type addr = ev.src(); + gaddr_type ga = manager()->reflect( addr ); + addr_type janus_addr = badaddr; + if ( ga != gaddr_type() ) { + ga.addr = stem::janus_addr; + janus_addr = manager()->reflect( ga ); + if ( janus_addr == badaddr ) { + janus_addr = manager()->SubscribeRemote( ga, "janus" ); + } + } + for ( ; range.first != range.second; ++range.first ) { + vt_map_type::iterator i = vtmap.find( range.first->second ); + if ( i != vtmap.end() ) { + // Inform local (?) object about new remote group member + stem::Event_base<VSsync_rq> evs( VS_NEW_MEMBER ); + evs.dest( i->second.stem_addr() ); + evs.src( addr ); + evs.value().grp = grp; +#ifdef __FIT_VS_TRACE + try { + scoped_lock lk(_lock_tr); + if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) ) { + *_trs << " -> VS_NEW_MEMBER (remote) G" << grp << " " + << hex << showbase + << evs.src() << " -> " << evs.dest() << dec << endl; } } - for ( ; range.first != range.second; ++range.first ) { - vt_map_type::iterator i = vtmap.find( range.first->second ); - if ( i != vtmap.end() ) { - stem::Event_base<VSsync_rq> evs( VS_NEW_MEMBER ); - evs.dest( i->second.stem_addr() ); - evs.src( addr ); - evs.value().grp = grp; -#ifdef __FIT_VS_TRACE - try { - scoped_lock lk(_lock_tr); - if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) ) { - *_trs << " -> VS_NEW_MEMBER (remote) G" << grp << " " - << hex << showbase - << evs.src() << " -> " << evs.dest() << dec << endl; - } - } - catch ( ... ) { - } + catch ( ... ) { + } #endif // __FIT_VS_TRACE - Forward( evs ); - stem::Event_base<VSsync_rq> evr( VS_NEW_MEMBER_RV ); - evr.dest( janus_addr ); - evr.src( i->second.stem_addr() ); - evr.value().grp = grp; + Forward( evs ); + // Inform remote object about local (?) group member + stem::Event_base<VSsync_rq> evr( VS_NEW_MEMBER_RV ); + evr.dest( janus_addr ); + evr.src( i->second.stem_addr() ); + evr.value().grp = grp; #ifdef __FIT_VS_TRACE - try { - scoped_lock lk(_lock_tr); - if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) ) { - *_trs << " -> VS_NEW_MEMBER_RV G" << grp << " " - << hex << showbase - << evr.src() << " -> " << evr.dest() << dec << endl; - } - } - catch ( ... ) { - } -#endif // __FIT_VS_TRACE - Forward( evr ); + try { + scoped_lock lk(_lock_tr); + if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) ) { + *_trs << " -> VS_NEW_MEMBER_RV G" << grp << " " + << hex << showbase + << evr.src() << " -> " << evr.dest() << dec << endl; } } + catch ( ... ) { + } +#endif // __FIT_VS_TRACE + Forward( evr ); + } + } - const gaddr_type oid = manager()->reflect( addr ); // ???? oid == gaddr + const gaddr_type oid = manager()->reflect( addr ); // ???? oid == gaddr - vtmap[oid].add( addr, grp ); - grmap.insert( make_pair(grp,oid) ); - // cerr << "**** " << grp << " " << xmt::getpid() << endl; - } - } + vtmap[oid].add( addr, grp ); + grmap.insert( make_pair(grp,oid) ); } void Janus::VSNewRemoteMemberRevert( const stem::Event_base<VSsync_rq>& ev ) @@ -668,34 +679,48 @@ pair<gid_map_type::const_iterator,gid_map_type::const_iterator> range = grmap.equal_range( grp ); if ( range.first != range.second ) { // we have local? member within this group const addr_type addr = ev.src(); - for ( ; range.first != range.second; ++range.first ) { - vt_map_type::iterator i = vtmap.find( range.first->second ); - if ( i != vtmap.end() && ((i->second.stem_addr() & stem::extbit) == 0 )) { - stem::Event_base<VSsync_rq> evs( VS_NEW_MEMBER ); - evs.dest( i->second.stem_addr() ); - evs.src( addr ); - evs.value().grp = grp; + const gaddr_type oid = manager()->reflect( addr ); // ???? oid == gaddr #ifdef __FIT_VS_TRACE - try { - scoped_lock lk(_lock_tr); - if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) ) { - *_trs << " -> VS_NEW_MEMBER (remote revert) G" << grp << " " - << hex << showbase - << evs.src() << " -> " << evs.dest() << dec << endl; - } - } - catch ( ... ) { - } -#endif // __FIT_VS_TRACE - Forward( evs ); + try { + scoped_lock lk(_lock_tr); + if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) ) { + int f = _trs->flags(); + *_trs << " VS add remote object " << hex << showbase << oid + << dec << " G" << grp << endl; +#ifdef STLPORT + _trs->flags( f ); +#else + _trs->flags( static_cast<std::_Ios_Fmtflags>(f) ); +#endif } } - - const gaddr_type oid = manager()->reflect( addr ); // ???? oid == gaddr + catch ( ... ) { + } +#endif // __FIT_VS_TRACE + // add remote memer of group grp vtmap[oid].add( addr, grp ); grmap.insert( make_pair(grp,oid) ); - // cerr << "**** " << grp << " " << xmt::getpid() << endl; } +#ifdef __FIT_VS_TRACE + else { + // this VS node has no group grp, so do nothing + // except trace info + try { + scoped_lock lk(_lock_tr); + if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) && (_trflags & tracefault) ) { + int f = _trs->flags(); + *_trs << " VS node don't has such group, ignore G" << grp << endl; +#ifdef STLPORT + _trs->flags( f ); +#else + _trs->flags( static_cast<std::_Ios_Fmtflags>(f) ); +#endif + } + } + catch ( ... ) { + } + } +#endif // __FIT_VS_TRACE } else { const addr_type addr = ev.src(); const gaddr_type oid = manager()->reflect( ev.src() ); // ???? oid == gaddr @@ -719,7 +744,20 @@ vtmap[oid].add( addr, vshosts_group ); grmap.insert( make_pair(static_cast<group_type>(vshosts_group),oid) ); - // cerr << "**** " << vshosts_group << " " << xmt::getpid() << endl; + + // send request for sync all groups, that present in this VS node: + stem::Event_base<VSsync_rq> e( VS_MERGE_GROUP ); + e.dest( ev.src() ); + group_cache_t gcache; + for ( gid_map_type::const_iterator i = grmap.begin(); i != grmap.end(); ++i ) { + // for all groups, except vshosts_group, + // and only once for earch group + if ( (i->first != vshosts_group) && (gcache.find( i->first) != gcache.end()) ) { + e.value().grp = i->first; + Send( e ); + gcache.insert( i->first ); + } + } } } @@ -784,14 +822,14 @@ } } -void Janus::connect( const char *host, int port ) +int Janus::connect( const char *host, int port ) { - _hostmgr->connect( host, port ); + return _hostmgr->connect( host, port ); } -void Janus::serve( int port ) +int Janus::serve( int port ) { - _hostmgr->serve( port ); + return _hostmgr->serve( port ); } size_t Janus::vs_known_processes() const @@ -809,12 +847,108 @@ return distance( range.first, range.second ); } +void Janus::VSMergeRemoteGroup( const stem::Event_base<VSsync_rq>& e ) +{ + const group_type grp = e.value().grp; +#ifdef __FIT_VS_TRACE + try { + scoped_lock lk(_lock_tr); + if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) ) { + int f = _trs->flags(); + *_trs << " VS merge remote group request G" << grp << endl; +#ifdef STLPORT + _trs->flags( f ); +#else + _trs->flags( static_cast<std::_Ios_Fmtflags>(f) ); +#endif + } + } + catch ( ... ) { + } +#endif // __FIT_VS_TRACE + pair<gid_map_type::const_iterator,gid_map_type::const_iterator> range = grmap.equal_range( grp ); + if ( range.first != range.second ) { // we have local? member within this group + // const addr_type addr = e.src(); + // expected that addr correspond to remote Janus + + // gaddr_type ga = manager()->reflect( addr ); + // addr_type janus_addr = badaddr; + // if ( ga != gaddr_type() ) { + // ga.addr = stem::janus_addr; + // janus_addr = manager()->reflect( ga ); + // if ( janus_addr == badaddr ) { + // janus_addr = manager()->SubscribeRemote( ga, "janus" ); + // } + // } + + // select VS object with latest time, and forward request to it + + // gvtime_type gvt; + // gvtime_type gvt_last; + // stem::addr_type addr = stem::badaddr; + for ( ; range.first != range.second; ++range.first ) { + vt_map_type::iterator i = vtmap.find( range.first->second ); + if ( i != vtmap.end() && ((i->second.stem_addr() & stem::extbit) == 0 )) { + // i->second.get_gvt( gvt ); + // if ( gvt_last < gvt ) { + // swap( gvt_last, gvt ); + // addr = i->second.stem_addr(); + // } + e.dest( i->second.stem_addr() ); + Forward( e ); + return; + } + } + // e.dest( addr ); + // Forward( e ); + } +} + +void Janus::VSsync_group_time( const stem::Event_base<VSsync>& ev ) +{ + const group_type grp = ev.value().grp; +#ifdef __FIT_VS_TRACE + try { + scoped_lock lk(_lock_tr); + if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) ) { + int f = _trs->flags(); + *_trs << " VS sync remote group time G" << grp << endl; +#ifdef STLPORT + _trs->flags( f ); +#else + _trs->flags( static_cast<std::_Ios_Fmtflags>(f) ); +#endif + } + } + catch ( ... ) { + } +#endif // __FIT_VS_TRACE + + // find all local group members and forward data as VS_SYNC_TIME + pair<gid_map_type::const_iterator,gid_map_type::const_iterator> range = grmap.equal_range( grp ); + stem::Event_base<VSsync> e( VS_SYNC_TIME ); + e.src( ev.src() ); + e.value().grp = ev.value().grp; + e.value().gvt.gvt = ev.value().gvt.gvt; + e.value().mess = ev.value().mess; + + for ( ; range.first != range.second; ++range.first ) { + vt_map_type::iterator i = vtmap.find( range.first->second ); + if ( i != vtmap.end() && ((i->second.stem_addr() & stem::extbit) == 0 )) { + e.dest( i->second.stem_addr() ); + Forward( e ); + } + } +} + DEFINE_RESPONSE_TABLE( Janus ) EV_Event_base_T_( ST_NULL, VS_MESS, JaDispatch, VSmess ) EV_Event_base_T_( ST_NULL, VS_NEW_MEMBER, VSNewMember, VSsync_rq ) EV_Event_base_T_( ST_NULL, VS_NEW_REMOTE_MEMBER, VSNewRemoteMemberDirect, VSsync_rq ) EV_Event_base_T_( ST_NULL, VS_NEW_MEMBER_RV, VSNewRemoteMemberRevert, VSsync_rq ) EV_Event_base_T_( ST_NULL, VS_OUT_MEMBER, VSOutMember, VSsync_rq ) + EV_Event_base_T_( ST_NULL, VS_MERGE_GROUP, VSMergeRemoteGroup, VSsync_rq ) + EV_Event_base_T_( ST_NULL, VS_SYNC_GROUP_TIME, VSsync_group_time, VSsync ) END_RESPONSE_TABLE } // namespace janus Modified: trunk/complement/explore/lib/janus/ut/Makefile =================================================================== --- trunk/complement/explore/lib/janus/ut/Makefile 2007-10-01 16:33:28 UTC (rev 1756) +++ trunk/complement/explore/lib/janus/ut/Makefile 2007-10-05 10:01:09 UTC (rev 1757) @@ -16,23 +16,24 @@ LIBXMT_DIR = ${CoMT_DIR}/lib/mt LIBSOCKIOS_DIR = ${CoMT_DIR}/lib/sockios LIBSTEM_DIR = ${CoMT_DIR}/lib/stem +LIBJANUS_DIR = ${CoMT_DIR}/lib/janus ifeq ($(OSNAME),linux) -release-shared: LDSEARCH += -L${LIBEXAM_DIR}/${OUTPUT_DIR} -L$(LIBXMT_DIR)/${OUTPUT_DIR} -L$(LIBSOCKIOS_DIR)/${OUTPUT_DIR} -L$(LIBSTEM_DIR)/${OUTPUT_DIR} -Wl,--rpath=${LIBEXAM_DIR}/${OUTPUT_DIR}:$(LIBXMT_DIR)/${OUTPUT_DIR}:${LIBSOCKIOS_DIR}/${OUTPUT_DIR}:${LIBSTEM_DIR}/${OUTPUT_DIR}:${STLPORT_LIB_DIR} +release-shared: LDSEARCH += -L${LIBEXAM_DIR}/${OUTPUT_DIR} -L$(LIBXMT_DIR)/${OUTPUT_DIR} -L$(LIBSOCKIOS_DIR)/${OUTPUT_DIR} -L$(LIBSTEM_DIR)/${OUTPUT_DIR} -L$(LIBJANUS_DIR)/${OUTPUT_DIR} -Wl,--rpath=${LIBEXAM_DIR}/${OUTPUT_DIR}:$(LIBXMT_DIR)/${OUTPUT_DIR}:${LIBSOCKIOS_DIR}/${OUTPUT_DIR}:${LIBSTEM_DIR}/${OUTPUT_DIR}:${LIBJANUS_DIR}${OUTPUT_DIR}:${STLPORT_LIB_DIR} -dbg-shared: LDSEARCH += -L${LIBEXAM_DIR}/${OUTPUT_DIR_DBG} -L$(LIBXMT_DIR)/${OUTPUT_DIR_DBG} -L$(LIBSOCKIOS_DIR)/${OUTPUT_DIR_DBG} -L$(LIBSTEM_DIR)/${OUTPUT_DIR_DBG} -Wl,--rpath=${LIBEXAM_DIR}/${OUTPUT_DIR_DBG}:$(LIBXMT_DIR)/${OUTPUT_DIR_DBG}:${LIBSOCKIOS_DIR}/${OUTPUT_DIR_DBG}:${LIBSTEM_DIR}/${OUTPUT_DIR_DBG}:${STLPORT_LIB_DIR} +dbg-shared: LDSEARCH += -L${LIBEXAM_DIR}/${OUTPUT_DIR_DBG} -L$(LIBXMT_DIR)/${OUTPUT_DIR_DBG} -L$(LIBSOCKIOS_DIR)/${OUTPUT_DIR_DBG} -L$(LIBSTEM_DIR)/${OUTPUT_DIR_DBG} -L$(LIBJANUS_DIR)/${OUTPUT_DIR_DBG} -Wl,--rpath=${LIBEXAM_DIR}/${OUTPUT_DIR_DBG}:$(LIBXMT_DIR)/${OUTPUT_DIR_DBG}:${LIBSOCKIOS_DIR}/${OUTPUT_DIR_DBG}:${LIBSTEM_DIR}/${OUTPUT_DIR_DBG}:${LIBJANUS_DIR}/${OUTPUT_DIR_DBG}:${STLPORT_LIB_DIR} ifndef WITHOUT_STLPORT -stldbg-shared: LDSEARCH += -L${LIBEXAM_DIR}/${OUTPUT_DIR_STLDBG} -L$(LIBXMT_DIR)/${OUTPUT_DIR_STLDBG} -L$(LIBSOCKIOS_DIR)/${OUTPUT_DIR_STLDBG} -L$(LIBSTEM_DIR)/${OUTPUT_DIR_STLDBG} -Wl,--rpath=${LIBEXAM_DIR}/${OUTPUT_DIR_STLDBG}:$(LIBXMT_DIR)/${OUTPUT_DIR_STLDBG}:${LIBSOCKIOS_DIR}/${OUTPUT_DIR_STLDBG}:${LIBSTEM_DIR}/${OUTPUT_DIR_STLDBG}:${STLPORT_LIB_DIR} +stldbg-shared: LDSEARCH += -L${LIBEXAM_DIR}/${OUTPUT_DIR_STLDBG} -L$(LIBXMT_DIR)/${OUTPUT_DIR_STLDBG} -L$(LIBSOCKIOS_DIR)/${OUTPUT_DIR_STLDBG} -L$(LIBSTEM_DIR)/${OUTPUT_DIR_STLDBG} -L$(LIBJANUS_DIR)/${OUTPUT_DIR_STLDBG} -Wl,--rpath=${LIBEXAM_DIR}/${OUTPUT_DIR_STLDBG}:$(LIBXMT_DIR)/${OUTPUT_DIR_STLDBG}:${LIBSOCKIOS_DIR}/${OUTPUT_DIR_STLDBG}:${LIBSTEM_DIR}/${OUTPUT_DIR_STLDBG}:${LIBJANUS_DIR}/${OUTPUT_DIR_STLDBG}:${STLPORT_LIB_DIR} endif endif -release-shared: PROJECT_LIBS = -lxmt -lsockios -lstem -lexam -dbg-shared: PROJECT_LIBS = -lxmtg -lsockiosg -lstemg -lexamg +release-shared: PROJECT_LIBS = -lxmt -lsockios -lstem -lexam -ljanus +dbg-shared: PROJECT_LIBS = -lxmtg -lsockiosg -lstemg -lexamg -ljanusg ifndef WITHOUT_STLPORT -stldbg-shared: PROJECT_LIBS = -lxmtstlg -lsockiosstlg -lstemstlg -lexamstlg +stldbg-shared: PROJECT_LIBS = -lxmtstlg -lsockiosstlg -lstemstlg -lexamstlg -ljanusstlg endif dbg-shared: DEFS += -D__FIT_VS_TRACE Modified: trunk/complement/explore/lib/janus/ut/Makefile.inc =================================================================== --- trunk/complement/explore/lib/janus/ut/Makefile.inc 2007-10-01 16:33:28 UTC (rev 1756) +++ trunk/complement/explore/lib/janus/ut/Makefile.inc 2007-10-05 10:01:09 UTC (rev 1757) @@ -2,10 +2,7 @@ PRGNAME = ut_vtime -SRC_CC = ../vtime.cc \ - ../janus.cc \ - ../vshostmgr.cc \ - unit_test.cc \ +SRC_CC = unit_test.cc \ vt_operations.cc \ VTmess_core.cc \ vt_object.cc \ Modified: trunk/complement/explore/lib/janus/ut/vt_remote.cc =================================================================== --- trunk/complement/explore/lib/janus/ut/vt_remote.cc 2007-10-01 16:33:28 UTC (rev 1756) +++ trunk/complement/explore/lib/janus/ut/vt_remote.cc 2007-10-05 10:01:09 UTC (rev 1757) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/08/26 12:54:05 ptr> +// -*- C++ -*- Time-stamp: <07/10/04 10:11:26 ptr> #include "vt_operations.h" @@ -28,9 +28,7 @@ using namespace xmt; #define VS_DUMMY_MESS 0x1203 -#define VS_DUMMY_GREETING 0x1204 -#define VS_DUMMY_GREETING2 0x1205 -#define VS_DUMMY_MESS2 0x1206 +#define VS_DUMMY_MESS2 0x1204 class YaRemote : public janus::VTHandler @@ -43,11 +41,10 @@ void handler( const stem::Event& ); void handler2( const stem::Event& ); - void VSNewMember( const stem::Event_base<VSsync_rq>& ); - void VSOutMember( const stem::Event_base<VSsync_rq>& ); - void greeting(); - void greeting2(); + virtual void VSNewMember( const stem::Event_base<VSsync_rq>& ); + virtual void VSOutMember( const stem::Event_base<VSsync_rq>& ); + virtual void VSsync_time( const stem::Event_base<VSsync>& ); void wait(); void wait2(); @@ -131,20 +128,16 @@ void YaRemote::VSNewMember( const stem::Event_base<VSsync_rq>& ev ) { - // cerr << "Hello " << xmt::getpid() << endl; + // cerr << "VSNewMember " << xmt::getpid() << endl; ++count; // VTNewMember_data( ev, "" ); VTHandler::VSNewMember( ev ); if ( ev.value().grp == janus::vs_base::first_user_group ) { - stem::EventVoid gr_ev( VS_DUMMY_GREETING ); - gr_ev.dest( ev.src() ); - Send( gr_ev ); + gr.set( true ); } else if ( ev.value().grp == (janus::vs_base::first_user_group + 1) ) { - stem::EventVoid gr_ev( VS_DUMMY_GREETING2 ); - gr_ev.dest( ev.src() ); - Send( gr_ev ); + gr2.set( true ); } } @@ -153,6 +146,18 @@ ++ocount; } +void YaRemote::VSsync_time( const stem::Event_base<VSsync>& ev ) +{ + // cerr << "VSsync_time " << xmt::getpid() << endl; + ++count; + VTHandler::VSsync_time( ev ); + if ( ev.value().grp == janus::vs_base::first_user_group ) { + gr.set( true ); + } else if ( ev.value().grp == (janus::vs_base::first_user_group + 1) ) { + gr2.set( true ); + } +} + void YaRemote::wait() { cnd.try_wait(); @@ -167,21 +172,9 @@ cnd2.set( false ); } -void YaRemote::greeting() -{ - gr.set( true ); -} - -void YaRemote::greeting2() -{ - gr2.set( true ); -} - DEFINE_RESPONSE_TABLE( YaRemote ) EV_EDS( ST_NULL, VS_DUMMY_MESS, handler ) EV_EDS( ST_NULL, VS_DUMMY_MESS2, handler2 ) - EV_VOID( ST_NULL, VS_DUMMY_GREETING, greeting ) - EV_VOID( ST_NULL, VS_DUMMY_GREETING2, greeting2 ) END_RESPONSE_TABLE int EXAM_IMPL(vtime_operations::remote) @@ -239,7 +232,7 @@ // cerr << obj1.vtdispatcher()->vs_known_processes() << endl; - EXAM_CHECK_ASYNC_F( obj1.vtdispatcher()->group_size(janus::vs_base::vshosts_group) == 2, res_flag ); + // EXAM_CHECK_ASYNC_F( obj1.vtdispatcher()->group_size(janus::vs_base::vshosts_group) == 2, res_flag ); // cerr << obj1.vtdispatcher()->group_size(janus::vs_base::vshosts_group) << endl; obj1.JoinGroup( janus::vs_base::first_user_group ); @@ -248,7 +241,7 @@ EXAM_CHECK_ASYNC_F( obj1.vtdispatcher()->group_size(janus::vs_base::first_user_group) == 2, res_flag ); EXAM_CHECK_ASYNC_F( obj1.count == 1, res_flag ); - // cerr << "* " << obj1.vtdispatcher()->group_size(janus::vs_base::first_user_group) << endl; + // cerr << "* " << obj1.vtdispatcher()->group_size(janus::vs_base::first_user_group) << " " << obj1.count << " " << xmt::getpid() << endl; obj1.wait(); // obj1.manager()->settrf( stem::EvManager::tracenet | stem::EvManager::tracedispatch ); @@ -303,6 +296,7 @@ EXAM_CHECK( obj1.vtdispatcher()->group_size(janus::vs_base::vshosts_group) == 1 ); // cerr << obj1.vtdispatcher()->vs_known_processes() << endl; + EXAM_CHECK( obj1.ocount == 1 ); } (&b)->~__barrier<true>(); @@ -410,11 +404,14 @@ EXAM_ERROR( "child interrupted" ); } - EXAM_CHECK( obj1.vtdispatcher()->group_size(janus::vs_base::first_user_group) == 1 ); - EXAM_CHECK( obj1.vtdispatcher()->group_size(janus::vs_base::first_user_group + 1) == 1 ); - // cerr << obj1.vtdispatcher()->group_size(janus::vs_base::first_user_group + 1) << endl; + // EXAM_CHECK( obj1.vtdispatcher()->group_size(janus::vs_base::first_user_group) == 1 ); + // EXAM_CHECK( obj1.vtdispatcher()->group_size(janus::vs_base::first_user_group + 1) == 1 ); + cerr << obj1.vtdispatcher()->group_size(janus::vs_base::first_user_group) << endl; + cerr << obj1.vtdispatcher()->group_size(janus::vs_base::first_user_group + 1) << endl; - EXAM_CHECK( obj1.vtdispatcher()->group_size(janus::vs_base::vshosts_group) == 1 ); + // EXAM_CHECK( obj1.vtdispatcher()->group_size(janus::vs_base::vshosts_group) == 1 ); + // EXAM_CHECK( obj1.ocount == 2 ); + cerr << obj1.ocount << endl; } (&b)->~__barrier<true>(); Modified: trunk/complement/explore/lib/janus/vshostmgr.cc =================================================================== --- trunk/complement/explore/lib/janus/vshostmgr.cc 2007-10-01 16:33:28 UTC (rev 1756) +++ trunk/complement/explore/lib/janus/vshostmgr.cc 2007-10-05 10:01:09 UTC (rev 1757) @@ -222,6 +222,8 @@ } #endif // __FIT_VS_TRACE Send( ev ); + + // conn_cnd.try_wait_delay( timeout ); return 0; } #ifdef __FIT_VS_TRACE Modified: trunk/complement/explore/lib/janus/vtime.cc =================================================================== --- trunk/complement/explore/lib/janus/vtime.cc 2007-10-01 16:33:28 UTC (rev 1756) +++ trunk/complement/explore/lib/janus/vtime.cc 2007-10-05 10:01:09 UTC (rev 1757) @@ -727,10 +727,55 @@ } } +void VTHandler::VSMergeRemoteGroup( const stem::Event_base<VSsync_rq>& e ) +{ + stem::Event_base<VSsync> out_ev( VS_SYNC_GROUP_TIME ); + out_ev.dest( e.src() ); + out_ev.value().grp = e.value().grp; + get_gvtime( e.value().grp, out_ev.value().gvt.gvt ); +#ifdef __FIT_VS_TRACE + try { + scoped_lock lk(_vtdsp->_lock_tr); + if ( _vtdsp->_trs != 0 && _vtdsp->_trs->good() && (_vtdsp->_trflags & Janus::tracegroup) ) { + *_vtdsp->_trs << " -> VS_SYNC_GROUP_TIME G" << e.value().grp << " " + << hex << showbase + << self_id() << " -> " << out_ev.dest() << dec << endl; + } + } + catch ( ... ) { + } +#endif // __FIT_VS_TRACE + Send( out_ev ); +} + +void VTHandler::VSMergeRemoteGroup_data( const stem::Event_base<VSsync_rq>& e, const string& data ) +{ + stem::Event_base<VSsync> out_ev( VS_SYNC_GROUP_TIME ); + out_ev.dest( e.src() ); + out_ev.value().grp = e.value().grp; + get_gvtime( e.value().grp, out_ev.value().gvt.gvt ); + out_ev.value().mess = data; +#ifdef __FIT_VS_TRACE + try { + scoped_lock lk(_vtdsp->_lock_tr); + if ( _vtdsp->_trs != 0 && _vtdsp->_trs->good() && (_vtdsp->_trflags & Janus::tracegroup) ) { + *_vtdsp->_trs << " -> VS_SYNC_GROUP_TIME (data) G" << e.value().grp << " " + << hex << showbase + << self_id() << " -> " << out_ev.dest() << dec << endl; + } + } + catch ( ... ) { + } +#endif // __FIT_VS_TRACE + Send( out_ev ); +} + + DEFINE_RESPONSE_TABLE( VTHandler ) EV_Event_base_T_( ST_NULL, VS_NEW_MEMBER, VSNewMember, VSsync_rq ) EV_Event_base_T_( ST_NULL, VS_OUT_MEMBER, VSOutMember, VSsync_rq ) EV_Event_base_T_( ST_NULL, VS_SYNC_TIME, VSsync_time, VSsync ) + EV_Event_base_T_( ST_NULL, VS_MERGE_GROUP, VSMergeRemoteGroup, VSsync_rq ) END_RESPONSE_TABLE } // namespace vt This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-01 16:33:31
|
Revision: 1756 http://complement.svn.sourceforge.net/complement/?rev=1756&view=rev Author: complement Date: 2007-10-01 09:33:28 -0700 (Mon, 01 Oct 2007) Log Message: ----------- more traces Modified Paths: -------------- trunk/complement/explore/lib/janus/janus.cc trunk/complement/explore/lib/janus/vshostmgr.cc Modified: trunk/complement/explore/lib/janus/janus.cc =================================================================== --- trunk/complement/explore/lib/janus/janus.cc 2007-10-01 15:55:37 UTC (rev 1755) +++ trunk/complement/explore/lib/janus/janus.cc 2007-10-01 16:33:28 UTC (rev 1756) @@ -318,6 +318,16 @@ // cerr << "**** " << grp << " " << xmt::getpid() << endl; if ( /* (grp != vshosts_group) && */ (_hostmgr != 0) ) { +#ifdef __FIT_VS_TRACE + try { + scoped_lock lk(_lock_tr); + if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) ) { + *_trs << " ????? " << __FILE__ << ":" << __LINE__ << endl; + } + } + catch ( ... ) { + } +#endif // __FIT_VS_TRACE _hostmgr->Subscribe( addr, grp ); } } Modified: trunk/complement/explore/lib/janus/vshostmgr.cc =================================================================== --- trunk/complement/explore/lib/janus/vshostmgr.cc 2007-10-01 15:55:37 UTC (rev 1755) +++ trunk/complement/explore/lib/janus/vshostmgr.cc 2007-10-01 16:33:28 UTC (rev 1756) @@ -120,6 +120,16 @@ ga.addr = stem::janus_addr; } +#ifdef __FIT_VS_TRACE + try { + scoped_lock lk(vtdispatcher()->_lock_tr); + if ( vtdispatcher()->_trs != 0 && vtdispatcher()->_trs->good() && (vtdispatcher()->_trflags & Janus::tracenet) ) { + *vtdispatcher()->_trs << "VSHostMgr sync (add) " << ga << endl; + } + } + catch ( ... ) { + } +#endif // __FIT_VS_TRACE vshost.insert( ga ); // address of remote Janus stem::__pack_base::__net_pack( s, static_cast<uint32_t>(vshost.size()) ); @@ -163,7 +173,7 @@ try { scoped_lock lk(vtdispatcher()->_lock_tr); if ( vtdispatcher()->_trs != 0 && vtdispatcher()->_trs->good() && (vtdispatcher()->_trflags & Janus::tracenet) ) { - *vtdispatcher()->_trs << "VS see node " << ga << endl; + *vtdispatcher()->_trs << "VSHostMgr sync " << ga << endl; } } catch ( ... ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-01 15:57:21
|
Revision: 1755 http://complement.svn.sourceforge.net/complement/?rev=1755&view=rev Author: complement Date: 2007-10-01 08:55:37 -0700 (Mon, 01 Oct 2007) Log Message: ----------- trace enhansements Modified Paths: -------------- trunk/complement/explore/lib/janus/ChangeLog trunk/complement/explore/lib/janus/janus.cc trunk/complement/explore/lib/janus/vshostmgr.cc trunk/complement/explore/lib/janus/vtime.cc Modified: trunk/complement/explore/lib/janus/ChangeLog =================================================================== --- trunk/complement/explore/lib/janus/ChangeLog 2007-10-01 13:12:40 UTC (rev 1754) +++ trunk/complement/explore/lib/janus/ChangeLog 2007-10-01 15:55:37 UTC (rev 1755) @@ -1,3 +1,9 @@ +2007-10-01 Petr Ovtchenkov <pt...@is...> + + * janus.cc, vshostmgr.cc: more trace prints; + + * vtime.cc: trace before Send call. + 2007-09-27 Petr Ovtchenkov <pt...@is...> * vshostmgr.cc, janus.cc, vtime.cc: print trace info before Modified: trunk/complement/explore/lib/janus/janus.cc =================================================================== --- trunk/complement/explore/lib/janus/janus.cc 2007-10-01 13:12:40 UTC (rev 1754) +++ trunk/complement/explore/lib/janus/janus.cc 2007-10-01 15:55:37 UTC (rev 1755) @@ -269,6 +269,26 @@ pair<gid_map_type::const_iterator,gid_map_type::const_iterator> range = grmap.equal_range( grp ); +#ifdef __FIT_VS_TRACE + try { + scoped_lock lk(_lock_tr); + if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) ) { + int f = _trs->flags(); + *_trs << " VS subscribe G" << grp << " " + << hex << showbase + << addr << " " << oid << dec << ", group size before " + << distance( range.first, range.second ) << endl; +#ifdef STLPORT + _trs->flags( f ); +#else + _trs->flags( static_cast<std::_Ios_Fmtflags>(f) ); +#endif + } + } + catch ( ... ) { + } +#endif // __FIT_VS_TRACE + for ( ; range.first != range.second; ++range.first ) { vt_map_type::iterator i = vtmap.find( range.first->second ); if ( i != vtmap.end() ) { @@ -670,6 +690,23 @@ const addr_type addr = ev.src(); const gaddr_type oid = manager()->reflect( ev.src() ); // ???? oid == gaddr +#ifdef __FIT_VS_TRACE + try { + scoped_lock lk(_lock_tr); + if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) ) { + int f = _trs->flags(); + *_trs << " VS see node " << hex << showbase << oid << endl; +#ifdef STLPORT + _trs->flags( f ); +#else + _trs->flags( static_cast<std::_Ios_Fmtflags>(f) ); +#endif + } + } + catch ( ... ) { + } +#endif // __FIT_VS_TRACE + vtmap[oid].add( addr, vshosts_group ); grmap.insert( make_pair(static_cast<group_type>(vshosts_group),oid) ); // cerr << "**** " << vshosts_group << " " << xmt::getpid() << endl; Modified: trunk/complement/explore/lib/janus/vshostmgr.cc =================================================================== --- trunk/complement/explore/lib/janus/vshostmgr.cc 2007-10-01 13:12:40 UTC (rev 1754) +++ trunk/complement/explore/lib/janus/vshostmgr.cc 2007-10-01 15:55:37 UTC (rev 1755) @@ -159,6 +159,16 @@ while ( sz-- > 0 ) { ga.net_unpack( s ); // vshost.push_back( ga ); +#ifdef __FIT_VS_TRACE + try { + scoped_lock lk(vtdispatcher()->_lock_tr); + if ( vtdispatcher()->_trs != 0 && vtdispatcher()->_trs->good() && (vtdispatcher()->_trflags & Janus::tracenet) ) { + *vtdispatcher()->_trs << "VS see node " << ga << endl; + } + } + catch ( ... ) { + } +#endif // __FIT_VS_TRACE vshost.insert( ga ); } Modified: trunk/complement/explore/lib/janus/vtime.cc =================================================================== --- trunk/complement/explore/lib/janus/vtime.cc 2007-10-01 13:12:40 UTC (rev 1754) +++ trunk/complement/explore/lib/janus/vtime.cc 2007-10-01 15:55:37 UTC (rev 1755) @@ -647,9 +647,6 @@ out_ev.dest( ev.src() ); out_ev.value().grp = ev.value().grp; get_gvtime( ev.value().grp, out_ev.value().gvt.gvt ); - - Send( out_ev ); - #ifdef __FIT_VS_TRACE try { scoped_lock lk(_vtdsp->_lock_tr); @@ -662,6 +659,7 @@ catch ( ... ) { } #endif // __FIT_VS_TRACE + Send( out_ev ); } void VTHandler::VSNewMember_data( const stem::Event_base<VSsync_rq>& ev, const string& data ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-10-01 13:12:42
|
Revision: 1754 http://complement.svn.sourceforge.net/complement/?rev=1754&view=rev Author: complement Date: 2007-10-01 06:12:40 -0700 (Mon, 01 Oct 2007) Log Message: ----------- bogus libstdc++ use std::IosFlags for ios_base::flags( flags ) Modified Paths: -------------- trunk/complement/explore/lib/stem/ChangeLog trunk/complement/explore/lib/stem/NetTransport.cc Modified: trunk/complement/explore/lib/stem/ChangeLog =================================================================== --- trunk/complement/explore/lib/stem/ChangeLog 2007-10-01 13:06:18 UTC (rev 1753) +++ trunk/complement/explore/lib/stem/ChangeLog 2007-10-01 13:12:40 UTC (rev 1754) @@ -5,6 +5,9 @@ * NetTransport.cc: add more trace to NetTransport_base; + * NetTransport.cc: bogus libstdc++ use std::IosFlags for + ios_base::flags( flags ); + * libstem: library version 4.6.4 2007-09-05 Petr Ovtchenkov <pt...@is...> Modified: trunk/complement/explore/lib/stem/NetTransport.cc =================================================================== --- trunk/complement/explore/lib/stem/NetTransport.cc 2007-10-01 13:06:18 UTC (rev 1753) +++ trunk/complement/explore/lib/stem/NetTransport.cc 2007-10-01 13:12:40 UTC (rev 1754) @@ -186,7 +186,11 @@ int flags = manager()->_trs->flags(); *manager()->_trs << "\tMessage from remote " << hex << showbase << _rs.code() << " " << src << " -> " << dst << endl; +#ifdef STLPORT manager()->_trs->flags( flags ); +#else + manager()->_trs->flags( static_cast<std::_Ios_Fmtflags>(flags) ); +#endif } } catch ( ... ) { @@ -207,7 +211,11 @@ int flags = manager()->_trs->flags(); *manager()->_trs << "\tMessage to remote " << hex << showbase << _rs.code() << " " << src << " -> " << dst << endl; +#ifdef STLPORT manager()->_trs->flags( flags ); +#else + manager()->_trs->flags( static_cast<std::_Ios_Fmtflags>(flags) ); +#endif } } catch ( ... ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |