libraryh3lp logo

LibraryH3lp is software used by libraries, educators, and non-profits for better customer service.

Sunday, February 24, 2008

Queues and Routing!

Recently, we released for testing one of the most unique components of libraryh3lp: Queues and Routing. This is where we begin to crack one of the tougher nuts in the library chat puzzle, that of one public identity being served by multiple librarians. Solving this problem begins to allow a library a lot of flexibility in their staffing model. Want to have librarians working in their individual offices, coming and going in shifts? No problem, and no worries over disconnects or interrupted patron chats at shift change time. Want to have two (or more) chat computers at a service desk, with incoming chats appearing on both, so that you can easily have two librarians handling the service? That works too, and only one of them will become actually connected to the patron. You can also have a whole gaggle of librarians, distributed around campus or elsewhere, simultaneously watching your service. They'll all see each incoming chat, but again, only one of them will wind up talking with the patron. The others will get a message that someone else took that chat, and they'll become disconnected from the patron.

Let's talk about how this might work to grow a chat service. Think of a Queue as a public entry point. Right now, you're probably just testing and experimenting, but some day, you might want a queue for Reference and one for Circulation. You might want one for each library, if you're in a big system. You might even some day want one for various areas of subject expertise, if you have several specialist librarians who will be online at various times during the day. Then, patrons could expect to connect immediately with an expert in their field (maybe you'll put a link to this queue in your more advanced subject guides).

But I digress. Let's walk through a basic setup. Our hypothetical situation will be for one library with a Reference and Circulation queue and several librarians.

How to set this up? Here is a conceptual overview:
  1. Visit http://libraryh3lp.com/ and register for a new account. Think of this as your "admin" account.
  2. Use this admin account to create your Queues: MyLibRef and MyLibCirc. Note that libraryh3lp will give you the URL for the queue, and you can use that to make your chat widget.
  3. Now, create some users. These will be your librarian "operator" accounts. Let's hypothetically create sally-mylib, ed-mylib, jane-mylib, and eric-mylib.
  4. You need to assign your users to their queues. Sally and Ed are reference librarians, so you'll assign them to the MyLibRef queue. Jane and Eric work in circulation, so you'll assign them to MyLibCirc. Sally is cross-trained to work in circulation, so you'll also assign her to MyLibCirc in addition to MyLibRef.
  5. Note that when you're creating these accounts, libraryh3lp is offering randomly-generated passwords, but you don't have to accept them. You can fill in whatever password you would like. Operators can change their passwords using their Jabber client; later, they'll also be able to change their passwords through the web administration tool.
  6. You'll probably want to spend some time working on your web chat widget and figuring out what you want to do with your Presence. The queues will assume offline presence if there are no associated librarians online. You could hide your chat widget entirely when offline, or you could have it offer an e-mail form, or whatever you'd like. In our example, if Sally is the only librarian online, both the MyLibRef and MyLibCirc queues will appear online. If only Jane is online, MyLibCirc will appear online and MyLibRef will appear offline.
  7. Your librarians will need to sign into their accounts with a suitable Jabber client, and you'll want to spend some time making sure you get it set up as best suits your needs. Pay particular attention to how it is set for Away status. If your librarians are signed in, but keyboard inactivity is making them appear Away, your patrons will see whatever you have setup for your offline presence.
Note about naming your queues and users: Libraryh3lp has typing notification built-in everywhere, and so the names do, in fact, matter a bit, since patrons will see them. For a queue, the patron will see "queue-name is typing," regardless of what librarian operator is actually working on the chat. For an individual's chat widget, the patron will see the individual's account name. So, it might be nicer for your patron to see typing notification from something like MyLibRef or pam-mylib than queue1 or user23. Your individual librarian account names will not really matter unless you plan to actually have entry points for individuals (as opposed to queues) in your system. For instance, perhaps your librarians will have their own staff pages, and they might want their own personal, non-queue, widget there, and having something recognizable in the typing notification is a nice touch. As an aside, the chat widget on this blog page is a queue that Eric and I both monitor, and its Presence is available if either one or both of us are online. If we are both online, we'll both see your message, but only the first one to type will be connected with you.

Another note that becomes important during testing: each patron can have only one active libraryh3lp widget chat per browser instance, even if using different queues. For this reason, if you wish to simulate more than one patron, use separate browsers (such as Firefox and IE) on one computer, or use multiple computers and multiple browsers to simulate many patrons. This is an HTTP restriction that Eric has explained to me repeatedly, and I can only nod my head. Librarian operators can have multiple patrons.

That's it in a nutshell. The wiki has a lot more detail. The administration interface, as you'll see, is very basic and bare bones right now. That will get fancier in the future. Currently, we are not storing any transcripts, but it will be possible to opt into that in the future.

Next major development milestone: gateways for external IM networks, like AIM. Coming soon. We're already running test gateways internally and will release this for public testing within two weeks.

9 comments:

Eric Sessoms said...

For the gearheads:

Section 8.1.4 of RFC 2616 recommends that a client (i.e., browser) should not maintain more than two connections to any one server.

The chat widget is implemented in compliance with XEP-0206 which uses two connections to the server.

So, more than one simultaneous chat in a single browser is not going to work. A future release will handle failure more gracefully, however.

Unknown said...

ok - just to make sure i'm doing this right...

My libraryh3lp is called UCFLibChat

I created a queue called UCFLibRef
which included the user MelindaUCF

Now - when i go to Pidgin...
I add the account UCFLibChat@libraryh3lp.com

Or should I add the account UCFLibRef?

where does the MelindaUCF and password come into play?

Pam Sessoms said...

Melinda, you're getting there!

UCFLibChat is your "admin" type account. Is that right? You used it to create the UCFLibRef queue and MelindaUCF user?

MelindaUCF is one of your user (librarian operator) accounts.

In Pidgin, you'll want to use MelindaUCF or other user accounts.

The queue (UCFLibRef) isn't really an account and doesn't have a password. Users assigned to that queue will make it appear online when they sign in with Pidgin.

Does that make sense? :)

Unknown said...

see - this is one of those times where people are like "YOU went to Harvard?" :-P

so MelindaUCF signs into Pidgin and adds the account UCFLibChat@libraryh3lp.com

UCFLibRef is working "behind the scenes", notices MelindaUCF is signed on, and routes things accordingly.

The Dense,
==Melinda

Pam Sessoms said...

Ha! You are most certainly not dense. There is a certain amount of brain twisting involved.

The above is correct, except that MelindaUCF@libraryh3lp.com doesn't need to do anything with UCFLibChat@libraryh3lp.com.

BUT - I just discovered that there seems to be a problem with the server at the moment. Eric's working away from home today, but hopefully, it'll be fixed soon. I'll drop you a line when it's better. Until then, it's going to be hard to experiment with. :(

Unknown said...

yeah - i noticed it was down earlier this afternoon - i must have crashed it :)

so if my queue is called UCFLibRef

in Pidgin, MelindaUCF is the username for the domain:

libraryh3lp.com

no need to denote UCFLibChat or UCFLibRef - it will automatically know where to route the user MelindaUCF too without specifying an account (UCFLibChat) or queue (UCFLibRef)?

Pam Sessoms said...

Melinda,

Correct! (on the domain name and also the overall picture). This assumes that in the web admin interface, you've assigned that user to that queue.

Your so-called "admin" user (UCFLibChat)can also be assigned to queues if you'd like, and then you could use that account in Pidgin on another computer to watch the queue along with MelindaUCF.

And, it's back up now. Of course, the first time anything tweaks out, Eric is out of town. We'll work on it auto-restarting in the future.

Oh, before I forget, I posted some detailed Pidgin setup stuff on the Wiki over the weekend:

http://code.google.com/p/libraryh3lp/wiki/ClientSetupPidgin

Unknown said...

I got it to work fine when I was testing it last week as an individual - but can't get it to work now as a Group/Queue.

My Queue is called UCFLibRef so to test it I went to:
http://libraryh3lp.com/chat/UCFLibRef@chat.libraryh3lp.com

I was logged into Pidgin as MelindaUCFLib, who is assigned to the queue UCFLibRef, with the domain librarh3lp.com

what am i doing wrong?

I am surprised that MelindaUCFLib only needs to sign into the domain libraryh3lp.com -- What if another school also had a user named MelindaUCFLib (University of California, Fresno :-P ) - how would the system know which MelindaUCFLib it was?

Pam Sessoms said...

Hey Melinda,

Great question! The system shouldn't let duplicate account name exist. So, you'd be the only MelindaUCFLib on libraryh3lp. :)