Computing Pages

by Francesc Hervada-Sala


Text Server

A Universal Text Database Server

The Text Server is a Text Repository with a client-server architecture. A server can be reached via a network or the Internet by many clients concurrently.

The Text Server has an own protocol for serving text. It can serve also web pages over http.

Last update on Sun Jun 5, 2011.

Universal Text Server

The UText Server defines its own protocol, Universal Text Protocol — UTXP, for exchanging text units between computers.

Transport: TCP, a standard port number could be 10, currently by IANA unasigned.

The UTXP Protocol is a character based protocol to send UTL strings between a client and a server computer.. It can upload and download binary data, too. The protocol is similar to HTTP but UTXP is stateful.

Sample Request:

UTXP/1.0 GET
Host: u-tx.net
User-Agent: Mozilla/5.0 (compatible)
If-Modified-Since: Tue, 15 Mar 2011 01:49:38 GMT
(empty line)
[UTL/2.0 Script
foreach website.webpage do ln out "- [v title]"
]

Sample Response:

UTXP/1.0 200 OK
Server: UTextServer/1.0
Date: Sat, 14 May 2011 04:10:40 GMT.
Content-Length: 312
Content-Type: text/plain
(empty line)
- The Genealogy Site
- Contact

Sample Request:

UTXP/1.0 GET
Host: u-tx.net
User-Agent: Mozilla/5.0 (compatible)
If-Modified-Since: Tue, 12 May 2009 07:03:22 GMT
(empty line)
[UTL/2.0 Script
foreach website.webpage do yield title
]

Sample Response:

UTXP/1.0 200 OK
Server: UTextServer/1.0
Date: Sat, 14 May 2011 04:10:58 GMT
Content-Length: 430
Content-Type: text/utl
(empty line)
[UTL/2.0 Simple
~webpage {
	~title The Genealogy Site
}
~webpage {
	~title Contact
}
]

Http Server

The server listens to port 80 for HTTP requests and serves them.

A request generates a call to the text transformation ”HTTP“ with a parameter that contains the request data.

=863856 ~http-request
	~method GET
	~ressource /test
	~protocol HTTP/1.1
	~headers
		~Host u-tx.net
		~Accept-Language en
		~User-Agent Mozilla/5.0 [...]
		[...]
==(HTTP 863856)

The Webserver performs the above call and gets a text unit, it serializes it as html and serves it.

The returned text unit has the type :HTML, defined as:

=HTML {
	^headers {
		^Content-Type : string
		^Server : string
		[...]
	}
	^html {
		^head {
			^title : string
			[...]
		}
		^body {
			^tag : string
			^emptytag : string
			^p : html.tag
			^h : html.tag
			^h1 : h
			^h2 : h
			^h3 : h
			^hr : html.emptytag
			^div : html.tag
			^code : string
			^pre : html.tag
			[...]
		}
	}
}

The text retrieved by the HTTP transformation looks for example this way:

~HTML
	~headers
		~Date Thu, 01 Oct 2009 04:44:15 GMT
		~Server UText-Server/1.0
		~Last-Modified Wed, 01 Sep 2004 13:24:52 GMT
		~Content-Type text/html; charset=iso-8859-1
	~html
		~head
			~title Test Page
		~body
			~h1 Test Page
			~p Welcome to the test page!

The serialization can be parametrized to produce a particular flavor of html such as HTML/3.2 or HTML/5 compliant code.

Print Contact

Text Server

Universal Text Server

Http Server

Project Universal Text

Forerunner

UText/1

Milestones

Text Engine

Text Repository

Text Server

Text Workbench

Text OS

Design Documents

Concepts

Universal Text Language

UTL Syntax

UTL Name System

Architecture

Glossary

Discussion

On Text Structure