Real time activity and message stream on Open Atrium
Yesterday I saw this post with a video on the new P2 theme for Wordpress and how Automattic* is using that as a real time microblog like tool for status updates in their company. And it got me thinking...
For some time now we've been using Open Atrium in Pronovix for project management. But until today all of our real time communication takes place through Skype. At some point we tried to replace Skype with XMPP (because Skype didn't properly work on Linux) but once Skype worked again for all the colleagues Jabber got abandoned.
One of the reasons why we were interested in Jabber was to integrate activity updates into our communication tool (e.g. posting comment, case, commit messages). So that we would be able to have a discussion and have a bot post newly created cases into our chat channel.
Right now our workflow is as follows:
- while in a Skype chat realize there is a new issue
- go to Open Atrium
- open a case submission form
- fill it out and submit it
- copy the created url
- post it in Skype
Wouldn't it be cool if you could have 1 interface with the activity/chat river of your team where you could create new cases without having to go into another context and then have that case submitted into the activity stream where your colleagues can react on it, either through inline comments (if you want it to be stored in the ticket history) or just chat messages?
Today we did a short brainstorm on that in the office. We examined the following issues:
- scalability: using nodes for each submitted message is not going to work for big groups (unless you throw hardware at it of course). Doing a pull system with a full Drupal bootstrap for every user's request, every second or so will eat even a decent server if you have enough users.
- immediacy: Drupal bootstrap time and network latency will slow down the interaction.
- security: you want to be able to make sure only people with the right permissions can see your content.
The schema below explains how we are now thinking of solving these questions:
- For scalability we want to make a hybrid Drupal/XMPP system: this way it doesn't matter how many users are subscribed to a certain group.
- The XMPP server has channels for all groups in the Open Atrium install.
- Users with the permission to view content of certain groups get subscribed to the respective channels.
- The client for the XMPP messages is a webpage in Drupal.
- The page has a submit box for posting chat messages that get sent to the appropriate channel on the XMPP server.
- Node submission forms are loaded in an overlay with the node form (this could be implemented using the modal frame API as it's done in Drupal 7).
- A prominent context box (that's always visible) displays the last group context you viewed a message from (possibly other context too). Using prepopulate this context gets transfered to new forms you open.
- Upon submission Drupal sends a message with the new information to a Jabber channel (this would probably be JSON)
- XMPP messages get parsed and displayed on the webpage (comments on nodes could be displayed in a threaded way).
- A set of filters lets you filter for streams from only certain groups.
- A message that hasn't been selected yet, is coloured differently to indicate that it hasn't been read yet.
This is a first draft of the specification, there are still a couple of things that need to be worked out and tested. For example:
- We still need to figure out how we will archive the stream so that users can go back in time and see messages/activities that got posted before they opened the stream page.
- We also need to do a thorough security review of the whole system.
- We'll also be able to add add private messaging to the interface...
PS: one thing that is getting me even more excited about this feature is the possibility to display activity streams from groups on other Open Atrium sites: with this system we could make it possible to have federated activity streams from all the Open Atrium sites you are registered on...
PPS: This model will of course also work for non-Open Atrium Drupal sites