[jdev] Architecture of a Jabber Server
Chris Mullins
chris.mullins at coversant.net
Fri Apr 14 00:49:56 CDT 2006
There are a number of ways to build Jabber servers (and clients), and
there are probably (semi) functional servers based on all of the various
architectures.
The quickest, and probably the most common, architecture is a flat (and
mostly procedural) model with lots of XML parsing. Get data from a
socket, parse up the xml, and act on it, send a response. This
architecture tends to have lots of XPath in it, and not a whole lot of
Object Oriented stuff.
Another approach is to go with a heavily OO approach - xml comes in from
a socket, it's parsed up and put into objects that represent the various
xmpp stanzas. An entire OO infrastructure is then built on top of these
classes and operations happen from there.
Actual implementations usually seem to fall somewhere between these two
approaches.
Another aspect to server development is the concurrency problem - how
are you going to handle simultaneous requests? Are you going to have a
thread per socket (a common model that is easy to write, but has a
number of drawbacks) a pool of threads handling input, or something in
between?
Next up you need a state mechanism - be it a database, an xml file, or
something in between.
Good luck - developing a server, even a simple one, is a fair bit of
work and not for the faint of heart...
--
Chris Mullins
-----Original Message-----
From: jdev-bounces at jabber.org [mailto:jdev-bounces at jabber.org] On Behalf
Of Lv Hongliang
Sent: Thursday, April 13, 2006 8:48 PM
To: jdev at jabber.org
Subject: [jdev] Architecture of a Jabber Server
Hello list,
I am a newer to Jabber. But I must develop a new IM Server (using
XMPP
protocols) for our project, and I do not know very clearly of the
architecture of a IM Server. At present, I just need to implement the
functions as follows:
Register, authentication, add and remove contact, two users
chatting
with each other. In one word, I just need to implement the most
fundamental
function (two users can chat with each other).
Can anyone tell me the architecture? Please tell me which modules
this
Server is composed of and the general function of each module.(Just in
high
level) If you can give me a picture ,it would be better. Thank you in
advance!
Thanks!
Lv Hongliang
April 14, 2006
More information about the JDev
mailing list