XMPP for Ruby (xmpp4r)
-
Upload
harisankar-ps -
Category
Technology
-
view
562 -
download
0
description
Transcript of XMPP for Ruby (xmpp4r)
![Page 1: XMPP for Ruby (xmpp4r)](https://reader034.fdocuments.us/reader034/viewer/2022042518/55941b161a28abf72b8b4667/html5/thumbnails/1.jpg)
XMPP4RXMPP/Jabber library for Ruby
Harisankar P S@coder_hsps
http://xmpp4r.github.iohttp://github.com/xmpp4r/xmpp4r
![Page 2: XMPP for Ruby (xmpp4r)](https://reader034.fdocuments.us/reader034/viewer/2022042518/55941b161a28abf72b8b4667/html5/thumbnails/2.jpg)
XMPP
● Exchange Message and Presence Protocol used in communications
● Its a collection of standards that specify how a near real time communication system can be build
● Its an open standard ● Popular companies that provide xmpp services are
google, facebook, microsoft, AOL, CISCO (they own Jabber Inc.)
![Page 3: XMPP for Ruby (xmpp4r)](https://reader034.fdocuments.us/reader034/viewer/2022042518/55941b161a28abf72b8b4667/html5/thumbnails/3.jpg)
● Thus you can use it to build network and cross network chat system
● You can use it to build a notification system for your site, which is accessible even outside your site.
● You can use it to build twitter :)
![Page 4: XMPP for Ruby (xmpp4r)](https://reader034.fdocuments.us/reader034/viewer/2022042518/55941b161a28abf72b8b4667/html5/thumbnails/4.jpg)
My experience with XMPP
One day a client of ours asked us, can we build a chat system for his CRM.
● I said yes, it sounds simple. I can build one using web sockets.
![Page 5: XMPP for Ruby (xmpp4r)](https://reader034.fdocuments.us/reader034/viewer/2022042518/55941b161a28abf72b8b4667/html5/thumbnails/5.jpg)
Then he asked ”can you build it using Jabber so that I can add my clients directly into it rather than make them register again”.
● Jabber. Hmm, I have never used them, but I have heard about them. It might be possible, but let me do a bit of research and get back to you.
![Page 6: XMPP for Ruby (xmpp4r)](https://reader034.fdocuments.us/reader034/viewer/2022042518/55941b161a28abf72b8b4667/html5/thumbnails/6.jpg)
I went to google
And it said?
![Page 7: XMPP for Ruby (xmpp4r)](https://reader034.fdocuments.us/reader034/viewer/2022042518/55941b161a28abf72b8b4667/html5/thumbnails/7.jpg)
● There is Jabber4R– Last released August 14, 2005
● There is XMPP4r– Last released July 15, 2009
● Bunch of gems that implemented parts of the protocol were rubybosh, bosh4r, etc but not the entire protocol
– Well what I wanted was BOSH as well.
![Page 8: XMPP for Ruby (xmpp4r)](https://reader034.fdocuments.us/reader034/viewer/2022042518/55941b161a28abf72b8b4667/html5/thumbnails/8.jpg)
I asked other Ruby Developers how they worked with jabber, and there response
was like....
![Page 9: XMPP for Ruby (xmpp4r)](https://reader034.fdocuments.us/reader034/viewer/2022042518/55941b161a28abf72b8b4667/html5/thumbnails/9.jpg)
Jabber!!! Not again...
![Page 10: XMPP for Ruby (xmpp4r)](https://reader034.fdocuments.us/reader034/viewer/2022042518/55941b161a28abf72b8b4667/html5/thumbnails/10.jpg)
● Better not use jabber its hard to work with.● Almost all responded. We used, xmpp4r, but it
doesn't work much any more. So we hacked what we wanted.
● Not a complete solution, we just used what we could get.
![Page 11: XMPP for Ruby (xmpp4r)](https://reader034.fdocuments.us/reader034/viewer/2022042518/55941b161a28abf72b8b4667/html5/thumbnails/11.jpg)
Well hearing all this I decide to build a solution, of our own. (Reinvent the wheel)
![Page 12: XMPP for Ruby (xmpp4r)](https://reader034.fdocuments.us/reader034/viewer/2022042518/55941b161a28abf72b8b4667/html5/thumbnails/12.jpg)
● But as I started it made me realize
I have this problem, people before me had this problem and people after will continue to have these problems.
Why not fix it for everyone!!!.
![Page 13: XMPP for Ruby (xmpp4r)](https://reader034.fdocuments.us/reader034/viewer/2022042518/55941b161a28abf72b8b4667/html5/thumbnails/13.jpg)
History of XMPP4R
● Initial release was in early 2005● It implemented the standard, and did nothing more
than what the standard demanded● Despite being unmaintained, all the things it did do.
It did them well.● Original author: Lucas Nussbaum
![Page 14: XMPP for Ruby (xmpp4r)](https://reader034.fdocuments.us/reader034/viewer/2022042518/55941b161a28abf72b8b4667/html5/thumbnails/14.jpg)
So what we did?● Started to update xmpp4r.● Got in touch with Lucas, who transferred the
ownership of the gem at rubygems to me● Created a new website● updated the readme and documentation● Started looking around at various forks of xmpp4r.
– Every forked tried to fix one part of the system
– Those we felt were good fixes, we asked them to send a pull request
– Asked them if they could help updating the original gem :)
![Page 15: XMPP for Ruby (xmpp4r)](https://reader034.fdocuments.us/reader034/viewer/2022042518/55941b161a28abf72b8b4667/html5/thumbnails/15.jpg)
RoadMap XMPP4R
● Update the test Spec (Make Travis Green)● Update the gem to work well with ruby 1.9 and 2.0● Initial support for ruby 2.1 (not a priority) ● Update the examples
Expected release of the next major release by, End of October, 2013
![Page 16: XMPP for Ruby (xmpp4r)](https://reader034.fdocuments.us/reader034/viewer/2022042518/55941b161a28abf72b8b4667/html5/thumbnails/16.jpg)
Point of the presentation?
● So the idea I which to share is, rather than releasing new gems, restarting old un-maintained projects is also a form of contribution to opensource so:
– Take up old unmaintained open source projects
– Because in opensource no projects are really dead.
– And if are interested, fork and start contributing to xmpp4r :)
![Page 17: XMPP for Ruby (xmpp4r)](https://reader034.fdocuments.us/reader034/viewer/2022042518/55941b161a28abf72b8b4667/html5/thumbnails/17.jpg)
Thank you