<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

<?rfc toc="yes"?>

<rfc ipr="full2026">

	<front>
		<title>Jabber Architechture</title>

		<author initials="J." surname="Miller" fullname="Jeremie Miller">
			<organization>The Jabber.org Project</organization>
			<address>
				<postal>
					<street>414 DeLong St.</street>
					<city>Cascade</city> <region>IA</region>
					<code>52033</code>
					<country>US</country>
				</postal>
				<phone>319-852-3464</phone>
				<email>jeremie@jabber.org</email>
			</address>
		</author>

		<date month="June" year="2000"/>
		<area>Internet</area>

		<!-- tons of keywords.. we don't *have* to have any though -->
		<keyword>Jabber</keyword>
		<keyword>IM</keyword>
		<keyword>Instant</keyword>
		<keyword>Messaging</keyword>
		<keyword>Presence</keyword>
		<keyword>XML</keyword>
		<keyword>Extensible Markup Language</keyword>

		<abstract><t>
			Fill in abstract here... This describes an Instant Messaging and Presence architecture as implemented by the Jabber.org Project.
		</t></abstract>

	</front>

	<middle>

		<section title="Introduction">
			<t>
				Insert Jabber introduction and background here...
				Define new medium that can carry any IM/P data converted from any protocol real-time to simple clients
			</t>
			<section title="Memo Goals">
				<t>(reword) This memo is intended to provide a structured document describing the Jabber architecture as implemented by the open-source Jabber.org Project.
				</t>
			</section>
			<section title="Jabber Goals">
				<t>The goals of Jabber Architecture include:
					<list>
						<t>Instant Messaging</t>
						<t>Presence</t>
						<t>Minimal implementation reqirements</t>
						<t>Utilize XML as the payload format</t>
						<t>Flexibility</t>
						<t>Extensibility</t>
					</list>
				</t>
			</section>
		</section>

		<section title="Entity Identification">
			<section title="Three Tier">
				<t>
					All entities are one of three types, a host, node, or resource.
				</t>
			</section>
			<section title="Host (server)">
				<t>
					The basic required component of every ID is a Host.  The Host is a standard DNS hostname and not case sensitive.
				</t>
			</section>
			<section title="Node (user)">
				<t>
					Each Host can be addressed with individual Nodes, or users.  Each user is specific to the Host it is associated with,
					similiar to email.  Usernames are restricted to 255 characters, and the following ASCII characters are invalid: any less than 33 or in the following set [:@&lt;&gt;'"&amp;].
					Case is preserved, but not used when comparing/matching.  A Node address looks similiar to email: node@host.  Node addresses are intended
					to be human readable/usable.
				</t>
			</section>
			<section title="Resource">
				<t>
					Resources are specific to a Node.  All characters are allowed and there are no restrictions.  Resource addresses are similiar
					to the path part of a URL.  (Resources are used to address specific connections, devices, or inboxes) An example Resource address: node@host/resource.
					Resource addresses are intended to be hidden from a user and only used at the software/protocol level.
				</t>
			</section>
		</section>

		<section title="Client-Server">
			<section title="Transport Layer">
				<t>
					XML Streams are used for all connections within Jabber.
				</t>
			</section>
			<section title="Clients">
				<t>
					Clients connect with an XML Stream on port 5222 of the server.  The default namespace for this stream is "jabber:client".
					The connection from the client to the server is persistent and maintains the presence state of the client after authentication.
					The server delivers all data to the client via this XML Stream.
				</t>
			</section>
			<section title="Servers">
				<t>
					Servers connect to each other with an XML Stream on port 5269.  The default namespace for this stream is "jabber:server".
					The server connections are one-way stateless streams, only used to deliver data from one server to another.
					If the connection to the host fails, servers attempt a DNS MX record lookup, and utilize the MX records in reverse priority (highest number first), attempting to connect to each MX record.
				</t>
			</section>
		</section>

		<section title="Protocol">
			<section title="Authentication">
				<t>
					The client initially sends an IQ packet over the XML Stream to the server with the jabber:iq:auth namespace.
					This provides the credentials to access the server, which are either returned with an error or accepted.
					After accepting the credentials, the XML Stream is then authorized to send data via those credentials and will
					receive data from the server over the XML Stream.
				</t>
			</section>
			<section title="Messages">
				<t>
					The client sends a message with a valid to attribute.  The server processes the to address
					and adds a from address, then attempts to deliver to the recipient.  Messages that fail for
					any reason are returned as an error.  Messages may be delivered to the client from the server at any time.
				</t>
			</section>
			<section title="Roster">
				<t>
					The client can send an IQ get with the jabber:iq:roster namespace at any time, and will receive
					a result containing all the items that the server has stored for that user.  Changes to any one item
					can be made by submitting that changed item via an IQ set in the same namespace.  At any time,
					the server may do a "Roster Push" by sending an IQ set to the client containing the new/updated item[s].
				</t>
			</section>
			<section title="Presence">
				<t>
					The current presence for the client is updated by sending presence to the server without a to attribute.
					The server delivers this to the authorized recipients based on the subscription status as stored in the roster.
					The client will not receive presence from other entities until it has provided some form of available presence.
				</t>
			</section>
			<section title="Presence Subscriptions">
				<t>
					Fill in here, describing the subscribe/unsubscribe/subscribed/unsubscribed exchange.
				</t>
			</section>
			<section title="Server to Server">
				<t>
					Servers exchange all protocol data to another server with a qualified to and from attribute.  There is no
					specific server state or exchange held, all data is simply routed to another server.
				</t>
			</section>
		</section>
			
		<section title="Security Considerations">
			<section title="SSL">
				<t>
					Servers can optionally support normal SSL connections on port 5223 for added security for client connections.
				</t>
			</section>
			<section title="Client-Client">
				<t>
					Clients may optionally support signing and encrypting messages and presence by using PGP/GPG.
				</t>
			</section>
			<section title="Client Connections">
				<t>
					The IP address of clients is never made available, nor are any connections other than the original client->server XML Stream required.
					This protects the client hosts from direct attack or identification by third parties, and allows
					the service provider to utilize an alternate protocol or provide another method of access to its clients.
				</t>
			</section>
			<section title="Presence">
				<t>
					Presence subscriptions are enforced by the user's server.  Only the approved entities are
					able to discover a user's presence.
				</t>
			</section>
		</section>

		<section title="Extended Functionality">
			<section title="Services (Agents/Transports)">
				<t>
					... real-time generating/converting XML to/from alternate protocols or data formats.
					IQ for obtaining list of services from entities, IQ for registration/search with services.
				</t>
			</section>
			<section title="File Transfers (OOB)">
				<t>
					... oob URI for all non-xml data.  HTTP URL's for all file transfers.  iq for live file xfer, message attachments...
				</t>
			</section>
			<section title="XML Medium">
				<t>
					Any XML can be inserted for any additional functionality at any point anywhere in the protocol.
					... x:delay for showing delays in delivery, vCard, iq:private for a server, any custom application.
				</t>
			</section>
		</section>

		<section title="Examples">
			<section title="Minimalistic Client">
				<t>
				</t>
			</section>
			<section title="Basic Client">
				<t>
				</t>
			</section>
			<section title="Extending">
				<t>
				</t>
			</section>
		</section>

		<section title="Future">
			<section title="Server Filtering">
				<t>
				</t>
			</section>
			<section title="Devices and Presence">
				<t>
				</t>
			</section>
			<section title="Services">
				<t>
					... real-time data services formatted in xml pushed to clients, calendars, alerts, news, collab tools, etc.
				</t>
			</section>
			<section title="HTTP">
				<t>
					... HTTP methods for Jabber protocol, 3rd party http file xfers
				</t>
			</section>
		</section>

	</middle>

	<back>

		<references>

			<reference anchor="XML" target="http://www.w3.org/TR/1998/REC-xml-19980210">
				<front>
					<title>Extensible Markup Language (XML) 1.0</title>
					<author>
						<organization abbrev="W3C">World Wide Web Consortium</organization>
					</author>
					<date month="February" year="1998"/>
				</front>
				<seriesInfo name="W3C" value="xml"/>
			</reference>
		
		</references>

	</back>

</rfc>


