Alfresco Rumors: XMPP Enable Alfresco nodes (POC)

5,385 views

Published on

Alfresco Summit. A proof of concept on how to XMPP (Messaging and Presence) Alfresco nodes. Via IM: Send notifications of changes, Comments on nodes are persisted to Alfresco, Comments added via web client are sent to subscribed users, Update Content in Alfresco from IM Client file transfer, Download content from IM client

Published in: Technology
  • Be the first to comment

Alfresco Rumors: XMPP Enable Alfresco nodes (POC)

  1. 1. Alfresco Rumors: What is your content saying? 7 Nov 2013 / 15 Nov 2013 Jared Ottley / Alfresco Software #SummitNow
  2. 2. Agenda What is XMPP? Alfresco Rumors • Demo Lagniappe Q&A #SummitNow #SummitNow
  3. 3. What is XMPP? #SummitNow #SummitNow
  4. 4. XMPP – History+ Jeremie Miller • Jabberd/XMPP (1998) XMPP • Extensible Messaging & Presence Protocol • Communication & Message Middleware • Extensible: • Pub/Sub, VoIP, Video, Gaming, IoT, File Transfer #SummitNow #SummitNow
  5. 5. XMPP example <stream:stream> <presence/> … <message from=“alfresco@xmpp.alfresco.com” to=“jared.ottley@xmpp.alfresco.com.com”> <body>XMPP is cool!</body> </message> … <presence type=“unavailable” /> </stream:stream> #SummitNow #SummitNow
  6. 6. XMPP – Where can you get it? Servers: http://xmpp.org/xmpp-software/servers/ Clients: http://xmpp.org/xmpp-software/clients/ Libraries: http://xmpp.org/xmpp-software/libraries/ #SummitNow #SummitNow
  7. 7. Alfresco Rumors Goal: Enable Alfresco nodes to talk and listen to XMPP events #SummitNow #SummitNow
  8. 8. Alfresco Rumors Initial Features • Notification of Changes • Comment • File Upload • Commands #SummitNow #SummitNow
  9. 9. Alfresco Rumors Client Client Client #SummitNow #SummitNow
  10. 10. Alfresco Rumors 0..n Clients Client Client Client #SummitNow #SummitNow
  11. 11. Alfresco Rumors Built using: • Alfresco 4.2 • Openfire 3.8.2 • Smack 3.3.1 • Adium 1.5.8 #SummitNow #SummitNow
  12. 12. Alfresco Rumors Demo #SummitNow #SummitNow
  13. 13. Alfresco Rumors xmpp:user cm:perso n xmpp:username #SummitNow #SummitNow
  14. 14. Alfresco Rumors xmpp:node xmpp:password cm:content xmpp:roster {…} xmpp:owner #SummitNow #SummitNow
  15. 15. Alfresco Rumors Client Client Client #SummitNow #SummitNow
  16. 16. Alfresco Rumors /rooster/add /disable XMPPNodePolicy XMPPService /enable /message #SummitNow #SummitNow
  17. 17. Alfresco Rumors Openfire Client User Plugin XMPPService #SummitNow #SummitNow
  18. 18. Alfresco Rumors Connection XMPPClient File Transfer Manager #SummitNow #SummitNow
  19. 19. #Todo • • • • • • • Roster web script CRUD Notification property list Simplify adding commands Test Scaling Message web script broadcast, excludes Add pub/sub Rework User Service to be more RESTful #SummitNow #SummitNow
  20. 20. Jingle An extension that adds peer-to-peer (P2P) session control (signaling) for multimedia interactions such as in Voice over IP (VoIP) or videoconferencing communications. • • • • • Voice Video Application Sharing Collaborative Editing Whiteboarding #SummitNow #SummitNow
  21. 21. Forms An extension for data forms that can be used in workflows such as service configuration as well as for applicationspecific data description and reporting. • Property Update • Workflow • Content Creation #SummitNow #SummitNow
  22. 22. Forms #SummitNow #SummitNow
  23. 23. Multi-User Chat An extension for multi-user text chat, whereby multiple XMPP users can exchange messages in the context of a room or channel, similar to Internet Relay Chat (IRC). In addition to standard chatroom features such as room topics and invitations, the protocol defines a strong room control model, including the ability to kick and ban users, to name room moderators and administrators, to require membership or passwords in order to join the room, etc. #SummitNow #SummitNow
  24. 24. Presence Update user lists of sites/share to provide online/offline notification. • Desktop Client • Mobile Client • Browser #SummitNow #SummitNow
  25. 25. Messaging • PubSub / Activity Feeds • RTC • Cross Application Messaging • Inbound Messaging • Server Status #SummitNow #SummitNow
  26. 26. Lagniappe la•gniappe | lan yap | noun Something given as a bonus or extra gift ORIGIN Louisiana French, from Spanish la ñapa. #SummitNow #SummitNow
  27. 27. GetNodesWithAspectCannedQueryFactory Requirement: • Start XMPP node clients on start up #SummitNow #SummitNow
  28. 28. GetNodesWithAspectCannedQueryFactory #SummitNow #SummitNow
  29. 29. GetNodesWithAspectCannedQueryFactory #SummitNow #SummitNow
  30. 30. GetNodesWithAspectCannedQueryFactory public org.alfresco.query.CannedQuery getCannedQuery(org.alfresco.service.cmr.repository.Store Ref storeRef, java.util.Set aspectQNames, org.alfresco.query.PagingRequest pagingRequest) • If run at init, the query maybe run before the schema is created – Solution: subsystem. #SummitNow #SummitNow
  31. 31. Custom User Profile • Override SlingshotUserFactory class • constructUser • saveUser • Custom userprofile.get* web script • Custom profile.js These must be verified for changes with each new version of Alfresco. #SummitNow #SummitNow
  32. 32. Custom User Profile custom-slingshot-*-context.xml <bean id="webframework.factory.xmpp.user” class="org.alfresco.integrations.xmpp.share.XMPPUserFactory” parent="webframework.factory.base" /> share-config-custom.xml <config evaluator="string-compare" condition="WebFramework"> <web-framework> <defaults> <user-factory>webframework.factory.xmpp.user</user-factory> </defaults> </web-framework> </config> #SummitNow #SummitNow
  33. 33. Alfresco Rumors Q && A #SummitNow #SummitNow
  34. 34. Resources Alfresco Rumors https://github.com/jottley/alfresco-rumors Openfire, Smack, Spark http://www.igniterealtime.org/ #SummitNow #SummitNow
  35. 35. #SummitNow

×