\documentclass[]{article}
\usepackage{amsmath,graphicx,supertabular,hyperref,tabularx,ifthen}
\title{TIP \#13: Web Service for Drafting and Archiving TIPs}
\date{November 21, 2000}
\author{Don Porter, Donal K. Fellows}
\urlstyle{sf}
\setlength{\parskip}{1ex}
\setlength{\parindent}{0pt}
\def\tipversion$#1${\texttt{\$#1\$}}
\def\tiplangle#1{\ensuremath{<}}
\def\tiprangle#1{\ensuremath{>}}
\def\tipbar#1{\ensuremath{|}}
\def\tipmail#1#2{\(\langle\){\small\expandafter\url{#1@#2}}\(\rangle\)}
\ifx\pdfoutput\undefined
\newcommand{\tipimage}[2]{\typeout{Make sure you download #1.eps}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.eps}}{\includegraphics[width=0.8\textwidth]{#1.eps}}}
\newcommand{\tipxref}[1]{}
\newcommand{\tipxrefend}{}
\else
\newcommand{\tipimage}[2]{\typeout{Make sure you create #1.pdf}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.pdf}}{\includegraphics[width=0.8\textwidth]{#1.pdf}}}
\pdfcatalog{/PageMode /UseOutlines}
\newcommand{\tipxref}[1]{\pdfannotlink attr {/C [0.5 0.5 1.0] /Border [0 0 1]} goto name {#1}}
\newcommand{\tipxrefend}{\pdfendlink}
\fi
\newenvironment{tipabstract}{\begin{abstract}}{\end{abstract}}
\begin{document}\maketitle
\begin{center}\begin{tabularx}{\linewidth}{|r@{: }X|}\hline
\textbf{TIP \#13}&\textbf{Web Service for Drafting and Archiving TIPs}\\\hline
Author&

Don Porter \tipmail{dgp}{users.sourceforge.net}
\par
Donal K. Fellows \tipmail{fellowsd}{cs.man.ac.uk}
\\
Created&Tuesday, \(\text{21}^{\text{st}}\) November 2000\\
Type&Process\\
State&Accepted\\
Vote&Done\\
Version&\tipversion$Revision: 1.26 $\\
Post History&\\
\hline\end{tabularx}\end{center}
\thispagestyle{empty}\pagestyle{empty}
\begin{tipabstract}

This document proposes the TCT provide a service on the World Wide Web for drafting and archiving TIPs and for providing TIPs in a variety of formats. A reference implementation is provided, and its server requirements are outlined.
\end{tipabstract}
\tableofcontents\setcounter{page}{0}\clearpage\pagestyle{plain}

\section{Background}

It has been proposed (see \cite{tip2}) that the TCT manage its projects and procedures through a set of public documents known as Tcl Improvement Proposals, or TIPs. A format for TIPs has been approved (see \cite{tip3}), and although final approval of \cite{tip2} is still pending, several TIPs have been submitted, discussed, and revised, and a few have been approved, so acceptance of TIPs in some form seems likely.

A prototype system has been provided by Donal Fellows \tipmail{fellowsd}{cs.man.ac.uk} [\url{http://www.cs.man.ac.uk/fellowsd-bin/TIP/}] that delivers TIPs to visitors in a variety of formats. However, that system lacks archiving of each revision of each TIP, and offers no interface (through the web or otherwise) for making revisions to TIPs. 

The TIP format was inspired by the format used by the Tcl'ers Wiki [\url{http://www.purl.org/thecliff/tcl/wiki/}]. The true power of the Tcl'ers Wiki, though, is not in the particular format it uses, but in the fact that it empowers the whole Tcl community to contribute to a common set of resources. The Tcl'ers Wiki shows that valuable resources can arise out of the unrestricted efforts of volunteers from the community.

\section{Problems with Current TIP Infrastructure.}

The Fellows web interface to the TIP Document Collection [\url{http://www.cs.man.ac.uk/fellowsd-bin/TIP/}] offers valuable browsing access to TIPs in a variety of formats. It accomplishes the important goal of making TIPs public. However, it suffers from two significant shortcomings:
\begin{itemize}
\item{}
Revisions are only possible through the TIP Editor:

Currently the only way to revise a TIP is to e-mail a new revision to the TIP Editor and wait for it to replace the old revision. As more TIPs are submitted, and as each TIP is more frequently revised, this bottleneck will not be tolerable.

Discussion about TIPs currently takes place in Usenet newsgroups and on mailing lists, but because there is no easy access to revising the TIPs themselves, the new information and viewpoints arising in these discussions are not being folded back into the TIPs. This means the TIPs are failing in their intended role to present a full history of an issue to later readers. It also means newcomers to a TIP cannot receive a full briefing in one place, but must chase down discussions in mailing list and Usenet archives. Few people do that, but instead repeat points already made. The discussions about \cite{tip6} reflect this problem.
\item{}
An archive of each revision of each TIP is not maintained:

Although \cite{tip2} refers to TIPs as being stored in a revision control system, probably a CVS repository, the Fellows TIP collection is not maintained in such a system. Since a TIP is an archive of a public discussion of an issue, it is important to be able to access the history of changes to each TIP.

The ability to retrieve and restore earlier revisions of a TIP will be especially important if public revision is permitted, so that any TIP contents that are incorrectly removed, whether by accident or malice, can be restored.
\end{itemize}

\section{Proposal}

An improved system for archiving and revising TIPs is proposed:
\begin{enumerate}
\item{}
TIPs will be archived in a CVS repository.
\item{}
Anyone with the power to call a TYANNOTT vote will have commit access to this repository through either :pserver: or ssh access. With this access, they will be able to revise any part (header or body) of any TIP (whether in \textit{State: Draft} or not). Everyone having this access will be trusted to modify TIPs only in conformance with the TIP format and the TCT procedures.
\item{}
An enhanced version of the Fellows TIP rendering engine will display an [Edit] link at the bottom of each TIP eligible for web-editing when that TIP is rendered in HTML.
\item{}
For any TIP in state Draft, and for which a vote is still pending, the [Edit] link will lead to an HTML form for submitting a revised TIP. For other TIPs, no [Edit] link will appear, and an attempt to directly access web-editing of such a TIP will lead to a message stating that the TIP may not be edited through the web interface.
\item{}
The HTML editing form will display the TIP header, but will not make it available for editing. The HTML form will require that an e-mail address be entered, and will allow a name to be entered as well. A \tiplangle{}TEXTAREA\tiprangle{} will be initialized to hold the current TIP abstract. A second \tiplangle{}TEXTAREA\tiprangle{} will be initialized to hold the current TIP body. Users of the form will revise the abstract and the body, then submit the form.
\item{}
The TIP rendering engine will receive the revisions, and will use CVS client commands to merge the revisions with other revisions and commit the revised TIP to the TIP CVS repository. If a conflict occurs during a merge, the TIP body including the conflicts will be returned to the user in another HTML form to resolve the conflict.

Note that the CVS commit function of the TIP rendering engine implies that the CGI process in which the TIP rendering engine runs must have a user ID with commit access to the TIP CVS repository.
\item{}
In the revised TIP checked in to CVS the submitter of the revision will be added as an Author in the header of that TIP.
\end{enumerate}

\section{Reference Implementation}

The modifications to the Fellows TIP rendering engine that add the capabilities proposed above are now merged in. The TIP rendering engine is maintained and publically available [\url{http://sourceforge.net/projects/tiprender/}]. To enable the web-editing features, set the Tcl variable FEATURE(EDIT) to 1 in the file config.tcl. A working version of the proposed web service is available at \url{http://purl.org/tcl/tip/}

For what it's worth, this TIP was created primarily within a web browser, making revisions through the web interface provided by the reference implementation.

One remaining shortcoming of the reference implementation is that it provides no mechanism for uploading images to the TIP repository. Images still need to be submitted through the TIP Editor, or someone else with commit access to the TIP CVS repository.

\section{Server Requirements}

The reference implementation imposes the following requirements on a server:
\begin{enumerate}
\item{}
The server provides an HTTP server that serves the public Internet, and supports the CGI interface.
\item{}
CVS client software must be installed on the server.
\item{}
The CVS repository containing TIPs must be on the server itself. This is due to a CVS limitation that \textit{loginfo} scripts run on the machine housing the CVS repository, and the reference implementation uses a \textit{loginfo} script to keep the TIPs presented through the web up to date with the commits to the repository.
\item{}
The CVS repository must offer commit access over the Internet using either :pserver: or ssh to everyone with authority to call a TYANNOTT vote.
\item{}
The user under which the HTTP server runs its CGI processes must have commit access to the TIP CVS repository. This may have security implications.
\end{enumerate}

\section{Future Improvements}

Once the TIPs are housed in a CVS repository, other services should be easier to implement. Another browsing interface could be provided using cvsweb [\url{http://stud.fh-heilbronn.de/~zeller/cgi/cvsweb.cgi/}] to allow anyone in the community to browse TIP history. Another \textit{loginfo} script could provide e-mail notices when a TIP is revised to users who registered their interest in that TIP.

\section{Acknowledgments}

Thanks to Donal Fellows for the original TIP rendering engine and his assistance merging in the changes. Thanks to Brent Welch for providing the server and his assistance getting it configured for use. Thanks to Mark Harrison for his assistance with managing browser caching issues.

\vspace{3ex}\hrule\vspace{1.5ex}

\section{Comments from the TCT}

\begin{quote}
It might be a good idea to make the Abstract into a seperate \tiplangle{}textarea\tiprangle{} and treat that specially; I've been applying the rule that a TIP's abstract should be a single paragraph (it is implicit in the way I generate XML for instance) and that would be much easier to enforce through this route. It would also have the advantage of discouraging people from placing their whole rationale in the abstract --- which I've seen in several first drafts by people who shall remain nameless --- and prompting the creation of TIPs more in keeping with the general concept of publishable documents.
\end{quote}

\begin{quote}
It would also be nice if each page had a way of viewing the TIP's revision history (by a link to a suitably setup CVSweb URL?) The way that SourceForge does its CVS-over-the-web is very nice indeed...
\end{quote}

\begin{quote}
\textit{Donal K. Fellows \tipmail{fellowsd}{cs.man.ac.uk}}
\end{quote}

\section{Author replies to comments}

Some comments I see above, or received in e-mail:
\begin{itemize}
\item{}
\textit{Add a link to \cite{tip3} on the edit page. Display \cite{tip3} in a new window.}

Link added. I don't believe in deciding to open new browser windows for the user. If the user wants to open the link in a new window, she knows how to do that.
\item{}
\textit{Add an interface to create a new TIP}

For now, I'm trying to stick with the TIP procedures proposed in \cite{tip2}, where only the TIP Editor gets to create a new TIP, so all TIPs should still be originally submitted to him. If the TCT rejects this proposal and adopts a different policy, we can revisit this question.
\item{}
\textit{Browser caching makes it look like the edits were not made}

Based on advice from Mark Harrison and others, I've added HTTP headers that should prevent caching. Please try it again.
\item{}
\textit{I had the server time out on me}

That's troubling. Can anyone seeing this problem provide any more information. What were the circumstances, in detail?
\item{}
\textit{Add links to an interface showing revision history}

Check out the [History] links at the bottom of the HTML rendered pages. Thanks to Donal Fellows for coding that up. (OK, so we *did* reinvent CVSWeb.)
\item{}
\textit{A separate \tiplangle{}TEXTAREA\tiprangle{} for the Abstract}

This is now implemented. Please give it a try.
\end{itemize}

\section{Copyright}

This document has been placed in the public domain.

\section{Colophon}

\textit{TIP AutoGenerator --- written by Donal K. Fellows}
\begin{thebibliography}{TIP \#3}
\addcontentsline{toc}{section}{References}
\bibitem[TIP \#2]{tip2}
Andreas Kupries,
Donal K. Fellows,
Don Porter,
Mo DeJong,
Larry W. Virden,
Kevin Kenny,
\emph{TIP Guidelines},
on-line at \url{http://purl.org/tcl/tip/2.html}
\bibitem[TIP \#3]{tip3}
Andreas Kupries,
Donal K. Fellows,
\emph{TIP Format},
on-line at \url{http://purl.org/tcl/tip/3.html}
\bibitem[TIP \#6]{tip6}
Mark Harrison,
\emph{Include [Incr Tcl] in the Core Tcl distribution},
on-line at \url{http://purl.org/tcl/tip/6.html}
\end{thebibliography}
\end{document}
