TCUP / Fastmessaging / NetObject Protocol Documentation
by Sam Baskinger
Original: June 21, 2004
Updated: January 14, 2006
Writing an FMService
How TCUP Calls Work
Short Guide to the FM GUI
The problem with information today is that it is on your PC and only your
PC. Users want to communicate both their thoughts as well as their files, but
we can't do it simply! To send my friend my 500K picture collection from our
barbeque or an MPG of a wedding or a PDF of a novel that my friend has
been working on I need Webspace. Email fails in a multitude of ways to
deliver much more than messages, despite the rather successful efforts to
transform it into a pack mule for our files. Still, why should a user be
burdened with downloading 50 megabytes of files just to get the message
attached to it. Wouldn't it be nice if everyone could run a small P2P server?
One that doesn't need a big corporation managing it? Something that doesn't
have to be fast or perfect or super secret; It just has to be yours.
This is a gap in P2P work that boggles my mind: Why are we making giant
universal networks when I only want to share with my friends? There is
the obvious excitement with surfing around digital communities and picking
up randome files folks choose to share, but at the expense of intimate
little P2P communities is simply not the way I had envisioned this phenomena
The goal of these protocols is to allow the end user, be they
tech-savy or not, to set up reasonably sized peer-to-peer networks for the
purpose of live communication, managed time delayed communication, and
data sharing. The user may note that the protocols are fairly simple and
do not scale terribly well in extreme cases without some intentional
design. However, massivly peer-to-peer overlay networking is not the
focus. If this protocol can keep 200 users connected and communicating
without any significant shaping of the overlay network, then the job is
A brief description of each protocol is included here. TCUP is the
Trivial Call Up Protocol. TCUP must use a connection based protocol as its
transport, in all cases currently that is TCP. TCUP has two major
means of communication. The first is by its 200k sized message which is
sent over all links and relayed over all but the incoming link by the remote
nodes. A TTL guarantees that a message will eventually die. For
transfering data larger than 200k or a host of other resons a call
can be established between two nodes, x and y. All the nodes in the path
from x to y must maintain some state to take x's traffic and send it along the
path back to y. Nodes do timeout when there is no activity over calls or
connections so programmers beware. The resources required by a call are very
small. Traffic sent over a call only goes out on a single link. There is
no automatic redundancy built into TCUP calls. If a node on the path from
x to y crashes or is shutdown, the call is broken and will eventually fail
when TCP fails to deliever data.
Fast Messaging is a very very simple protocol that uses a custom encoding
for name value pairs which are sent over TCUP. The messages sent contain
a service name which serves as an ID, a name and a value. The name and value
are agregated with other name-value pairs under the ID. The agregated
information is used to establish calls from one node to another. When a call
is established the name of the desired service is first set followed by the
name of the calling service. Both of these values are NetObject strings.
Currently the name of the strings is not checked, only that they are there.
Once this is done, the call is handed off to an FMService to be managed for
the duration of the Call's lifetime.
NetObjects are equally simple protocols. They consist of a very basic PDU
type that allows named, typed objects to be sent over streams safely.
The details of this protocol as well as those of the others are covered in more
detail in their respective chapters. We hope the user and developer enjoy this
simple protocol for small and fast P2P networking.
There is also an implimentation of all this which, when finished, will
hopefully offer users:
Now here is the caveat. There is no neat way to identify yourself on this
network. TCUP tries to be ignorant of network-layer addressing as much as
possible, pushing the redundant connecting to the application layer. TCUP
and FastMessaging cannot prove who you are speaking to! At some point
calls will have to have some certificate encryption added to them to make this
a rough and tough real world application. However, since this is a small
little network-capable API, users can use this under the radar of most baddies
and still have some fun on it.
- Personal Messaging - similar to AIM.
- Channel Messaging - similar to IRC.
- Blogging - post your thoughts!
- Messaging - Like email with some added permissions.
- Message boards - A public place for posting dicussions.
- File Posting - Move large documents and files around.