Chapter 12. Getting Attached: Bootstrapping BOSH
WHAT'S IN THIS CHAPTER?
How BOSH keeps track of sessions
Using Strophe to attach to sessions
Improving performance with attachment
Using attachment for persistence
Increasing security with attachment
One of the more advanced uses of Strophe is session attachment. Instead of initiating a fresh XMPP connection when the application starts, a connection is provided that is already set up along with a little extra information that Strophe can use to attach to it. The connection may have been set up by server-side logic or by a previous page in the application.
Session attachment can solve a variety of problems relating to security, session persistence, and performance. Most of the time you probably won't need session attachment, but when your application does need it, it really comes in handy.
Although session attachment can provide faster application startup times or enhanced security, it comes with the cost of doing more work to prepare and manage the connection.
Knowing when to use session attachment is as important as knowing how to use it. In this chapter you are introduced to the common use cases and mechanics of attaching to already-established sessions.
Session attachment is one of ...