Friday, November 26, 2010

Instant Messaging in Java - The Jabber Protocols













contents
preface xiii
about this book xv
author online xxi
acknowledgments xxii
about the cover illustration xxiii
P
ART
I I
NSTANT
MESSAGING
PRIMER
. . . . . . . . . . . . . . . . 1
1
Introduction to IM concepts 3
1.1 Background on messaging 4
A brief history of Jabber 11

Goals of the Jabber project 12
1.2 What is Jabber? 13
Jabber’s XML-based data formats 14

Jabber’s simple
architecture 18

Jabber’s four core concepts 21
1.3 Benefits of the Jabber protocols 27
1.4 Drawbacks of the Jabber protocols 28
1.5 Conclusion 29
2
Jabber technical fundamentals 31
2.1 The Jabber messaging model 32
Benefits 35

Drawbacks 36

Relying on distributed
servers 38

How Jabber packet routing works 39
Step-by-step: a message’s path through Jabber 44
2.2 The core Jabber protocols 45
Message: Delivering data 45

Presence: updating user
online status 45

Info/Query: handling everything else 45
2.3 Jabber session example 47
2.4 Conclusions 56
P
ART
II P
ROTOCOLS
,
CODE
,
AND
ADVANCED
IM . . . . . . 57
3
IM concepts and Jabber protocols 59
3.1 A basic Java Jabber server 60
Goals for our server 60

Our server software 61
The basic server design 62
3.2 The session pool maintains client connections 63
The Session class represents a connection 64
The SessionIndex class provides session lookup 66
3.3 XML parsing subsystem 69
Representing Jabber packets 69

The PacketQueue class as
server focal point 77

SAX parsing in Java 80
3.4 Packet handling and server threads 87
Packet handling in QueueThread 90

Parsing XML in the
ProcessThread 95

The main application Server class 97
3.5 Testing the server 98
3.6 Conclusion 100
4
The Jabber message protocols 101
4.1 Messaging is the heart of IM 102
4.2 The message protocol 103
Normal messages 104

Chat messages 105
Groupchat messages 106

Headline messages 108
Error messages 109

Out-of-band messages 110

Reality check:
one message, many user interfaces 112
4.3 Java Jabber client 113
Goals 114

The client design 115

The client
model 116

Using the client model 123

Results 131
4.4 Conclusions 132
5
The presence protocols 133
5.1
The need for presence 134
5.2
The presence protocol 134
5.3 Adding groupchat support 138
Groupchat protocols 138

Server modifications 144
Client modifications 157
5.4 Shortcomings of our server and basic groupchat 161
5.5 Conclusions 162
6
Info/Query and client registration 163
6.1 Info/Query: the catch-all protocol 164
The IQ protocol 165

IQ extensions 167
6.2 Registration creates and manages accounts 169
User accounts 170

The register protocol 171
6.3 The Jabber server modifications 175
Adding user accounts 175

Adding registration support 183
6.4 Conclusions 186
7
Client authentication 189
7.1 Authentication controls account access 190
The authentication protocol 191
7.2 The Jabber server modifications 199
7.3 The Jabber client modifications 205
Modifying the JabberModel 206

The client IQ packet
handlers 211
7.4 Conclusions 215
8
Roster and user presence 217
8.1 Roster protocol: presence’s missing piece 218
The roster protocol 221
8.2 The Jabber server modifications 224
Representing user presence 224

Adding a roster
subsystem 226

The roster packet handlers 233
8.3 The Jabber client modifications 236
Adding minimal roster support 236

Testing the server 238
8.4 Conclusions 241
9
Creating a complete Jabber system 243
9.1 Creating Jabber-compliant implementations 244
Setting standards: the Jabber Software Foundation 245
Enforcing standards: Jabber Powered applications 245
Organizing standards: Jabber environments 246
Today’s options for achieving server compliance 247
9.2 Server missing pieces 248
Server-to-server communications: federating Jabber domains 248
Dialback authentication: S2S security 250

Transports:
integrating with other IM systems 257

Deployment of Jabber servers
and components 260

Server security: creating protected Jabber
services 262

Jabber server management 264

Adding reliability
and availability 265
9.3 Client missing pieces 266
9.4 User agent clients 266
Enhancing existing applications 268

Chatbots:
creating IM services 268
9.5 Conclusions 270
10
Enterprise Jabber 271
10.1 What is needed to support enterprise messaging 273
Enhancing Jabber security 273

Guaranteed quality
of service 278

Creating system administration tools
an techniques 279
10.2 The promise of MOM 280
Jabber as middleware 281

Jabber and the J2EE Java
Messaging Service 282

Jabber, .NET, and SOAP 290
10.3 Examples of Jabber applications 292
Jabber groupware 292 Jabber network
services 293 Applications enhanced by Jabber 293
10.4 Distributed application alternatives to Jabbers 296
RPCs: oldies but goodies 296 P2P systems:
the new challenger 298 Hybrid systems:
a better compromise 299
10.5 Conclusions 300
Jabber reference 301
references 369
index 373

Download
Another Java Books
Another Network Books

2 comments:

  1. Java may be the main choice for enterprise development now, but it’s days are numbered as the only stalwart option to go with.

    Let’s face it, many of these so called “enterprise applications” could easily have been written much faster and with less overhead using technologies like Python, PHP, et al.




    ruby training

    ReplyDelete

Related Posts with Thumbnails

Put Your Ads Here!