Your SlideShare is downloading. ×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Building Social IRC Bots with Node.js and MongoDB

1,835
views

Published on

Improve your team's productivity and encourage participation with social IRC bots! Find out how to create scoreboards, encourage positive communication by awarding points, and bring your bot to life …

Improve your team's productivity and encourage participation with social IRC bots! Find out how to create scoreboards, encourage positive communication by awarding points, and bring your bot to life using OpenShift, Red Hat's free auto-scaling Platform as a Service. We'll power our bot using an OpenShift "gear", then add a MongoDB for memory, and teach it to speak using a javascript-based IRC library for node.js.

Published in: Technology

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,835
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
7
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Social IRC bots in the cloud with Node.js and MongoDB Marek Jelen PaaS Evangelist, Red Hat MongoLondon, 20131
  • 2. My expectations i. basic understanding what cloud is and what it is not ii. you are a developer and you know what Node.js iii. basic knowledge of MongoDB iv. questions are good! v. questions are awesome! vi. discussion is preferred to my monologue2
  • 3. What is IRC? • Communication protocol • Open (RFC1459) & Simple • Text based • Realtime-communication • Group chat & One-to-One chat • Users => #channels <= Bots • Clients, Bouncers, Bots3
  • 4. Basic IRC commands • /join #openshif • /msg mjelen This is awesome • /me is presenting in London • /topic Dont be afraid to ask questions.4
  • 5. Is it any good? • Basic communication channel of tech companies • Community building environment • Support channel for users • etc. etc. etc. • OpenSource servers & clients (standalone, web)5
  • 6. What is OpenShift? Red Hats free, auto-scaling Platform as a Service (PaaS) for applications in the cloud.6
  • 7. 7
  • 8. Looks great, but what’s the catch?• OpenShif is free-as-in-beer & free-as-in-freedom• Three times 0.5GB RAM/1GB storage• Need more resources, just ask!• We are in Developer Preview• Sign up at openshift.com• Promo code: MongoLodon8
  • 9. Three flavours • OpenSource project => OpenShif Origin • Enterprise ready product => OpenShif Enterprise • Service by Red Hat => OpenShif Online9
  • 10. And now, lets build some bots10
  • 11. My bots on OpenShift (1) • Create new deployment environment • rhc app create ircbot nodejs-0.6 • clones a git repository locally • setups node.js environment • allows you ssh access • provides logs tailing • sets public DNS records11
  • 12. My bots on OpenShift (2) • Enter the directory • cd ircbot • Install dependencies • npm install irc -s • Write the code12
  • 13. My bots on OpenShift (3) • Record changes (when needed) • git add package.json server.js • Commit the changes • git commit -m “My first commit” • And deploy • git push [origin [master]]13
  • 14. My bots on OpenShift (4) • Add MongoDB to the mix • rhc cartridge add mongodb-2.2 -a ircbot • Add RockMongo to inspect MongoDB • rhc cartridge add rockmongo-1.1 -a ircbot • Install dependencies • npm install -S mongojs • Write the code • Connect to MongoDB from application14
  • 15. My bots on OpenShift (5) • Record changes (when needed) • git add package.json server.js • Commit the changes • git commit -m “My first commit” • And deploy • git push (origin (master))15
  • 16. Conclusion • Three flavors of OpenShif • Origin, Enterprise, Online • Sign up for Online for free • Promo code: MongoLondon • IRC is fun • Open, Simple, Feature-full • Node.js makes it simple to write apps • MongoDB helps with data persistence16
  • 17. Thanks mjelen@redhat.com @marek_jelen http://openshift.redhat.com17