Hi Fabio, This is cool. Couple remarks below
On Tue, Apr 3, 2012 at 12:50 AM, Fabio Mancinelli <[email protected]> wrote: > Hi Everybody, > > as promised here it is a more detailed mail about the work I did on XWiki > chat. > > First of all I committed the code of the current prototype here: > https://github.com/xwiki-contrib/xwiki-platform-chat > > Now some technical details: > > 1) The system uses an embedded Vysper XMPP server > (http://mina.apache.org/vysper/) with the Multi User Chat extension. > > 2) The communication is done using the BOSH protocol > (http://en.wikipedia.org/wiki/BOSH). The BOSH endpoint is in the > application context path, which means that the BOSH servlet will > receive all the cookies as the other servlets (important for > authentication, see after) Why not directly go for WebSocket ? BOSH looks like a "patch" for something that wasn't supported by the browsers up until recently, but support is here or close to here for WebSocket now (see http://caniuse.com/websockets). If you are interested you can look for example into Atmosphere for cross-container websocket support : https://github.com/jfarcand/atmosphere > > 3) The whole UI of the chat system is contained in the > XWiki.XWikiChatSkin. I've setup some tricky XSL transformations for > bundling all the needed resources into this skin (see > https://github.com/xwiki-contrib/xwiki-platform-chat/blob/master/xwiki-platform-chat-ui/src/main/build/transformations/xwiki-chat-skin.xsl) > The result is that all javascript files, VM overrides, and CSS files > are added to the skin as properties. > > 4) The Javascript, VM overrides and templates are available as > separate file in > https://github.com/xwiki-contrib/xwiki-platform-chat/tree/master/xwiki-platform-chat-ui/src/main. > In order to hack it I use https://github.com/xwiki/xwiki-debug-eclipse > and make symbolic links through the Eclipse interface so that those > resources are available as if they were on the file system. > > 5) The current authentication is dummy (see > https://github.com/xwiki-contrib/xwiki-platform-chat/blob/master/xwiki-platform-chat-server/src/main/java/org/xwiki/chat/server/NullUserAuthorization.java) > What is needed to do is to process the data coming from the cookies > and use the XWiki authentication subsystem to check the credentials > coming at the beginning of an XMPP session. This could be quite tricky > and will need some work for modifying the BoshServlet in order to make > these credentials available to the code that will need them. > > 6) When the page is loaded a connection is established and several > chat rooms are automatically joined: wiki, space and page. This of > course is temporary. The idea is that on page load the user will joing > the chatroom for the current wiki, the current space and the current > page, depending on what she is looking at. This means that there will > potentially be a chat room for every page in the wiki, for every space > and, in a multi-wiki environment, for every wiki. The number of users > in these chatroom will depend on what the users are actually working > on. > > 7) Chatrooms are left on page unload. This means that looking at the > chatrooms population we might be able to understand how many users are > currently connected and where. > > 8) Since XWiki has a feature for defining a social network (i.e., > following/followers) this data can be used to show in the chat the > users that I am following that are online, so that I might be able to > send them private messages. > > 9) Currently no the XMPP server is not backed by any storage, but it > is possible to write a storage system that stores all the discussions > in some wiki object (e.g., a page) so that a trace is kept. > > 10) The XMPP server also supports a Publish/Subscribe module. This > could be used to implement a live notification system. But even > without using pubsub, a special chatroom can be used to send these > messages that will be displayed, for example, using a special UI à la > growl (http://growl.info/screenshots) or equivalent. Could "Server-sent events" standards be of use for this feature ? See http://en.wikipedia.org/wiki/Server-sent_events That's all Jerome > > There is currently a limitation with the Vysper BOSH servlet... It > seems that it doesn't like too much Tomcat which can be a problem. The > thread where the problem is explained is here: > http://mail-archives.apache.org/mod_mbox/tomcat-users/201201.mbox/%[email protected]%3E > > I haven't yet investigated the problem, but a possible solution (or a > roadmap towards a solution) should be found as soon as possible > because if we start to integrate the authorization system and the > storage system, it would be difficult to port it to another system [1] > > I think that's all for the moment. > > Of course comments are welcome. > > -Fabio > > [1] I've looked at other XMPP servers, but I chose Vysper because it > is part of a well established Apache project, it's very simple to use, > supports all that we need (embeddable server, multi user chat, etc.) > and has a quite active community. Other solutions were either GPLv3, > or not showing a clear situation wrt the community and the features. > > On Sat, Mar 31, 2012 at 1:46 AM, Fabio Mancinelli > <[email protected]> wrote: >> Hi everybody, >> >> one of the research projects we are involved in is about realtime >> collaboration. One of the aspects we wanted to investigate was the >> integration of a chat system within XWiki. >> I've been working on this lately and I've built a prototype that uses >> an embedded XMPP server for handling all the communication. >> >> I still have to cleanup a bit the code before committing it, but I >> took a video of how things work. >> You can find it here: http://youtu.be/0Gwtpu3iVwo (it's FullHD, so >> make sure to change the video quality and to switch to fullscreen) >> >> There are several things we need to address (authentication is one of >> them), but I think we could have a functional extension pretty soon. >> >> It's 1:30am right now, so I will give you more details in a next mail :) >> >> Enjoy. >> >> Thanks, >> Fabio > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs -- Jérôme Velociter Winesquare http://www.winesquare.net/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

