Advertisement
Advertisement

More Related Content

Advertisement

Rapid development & integration of real time communication in websites

  1.  Rapid Development & Integration of Real Time Communication in Websites PyCon Kiwi’13 Chetan Giridhar
  2. Facts  Website developers focus  Core functionality, Design  User Interface, Performance  Statistics  About 38% customers agree that they made their deals from the website due to engagement itself  56% of the people prefer live engagement over email or social media as preferred communication method Could we make websites better? Can Python help?
  3. Demo
  4. Development Considerations  Asynchronous  Real time exchange  Full duplex communication  Store chat information  Easy to use APIs – think reuse  Free and Open Source
  5. Pure Python  ws4py – python client library for web sockets  tornado.websocket.WebSocketHandler class Socket(tornado.websocket.WebSocketHandler): def on_message(self, message): self.write_message(“Msg is” + message) from ws4py.client.threadedclient import WebSocketCient class Client(WebSocketClient) def opened(self): self.send(“Hello”) def received_message(self, message): print “From server:” + message open() on_close() closed()
  6. Framework Tornado Web Server End User asyncmongo/r edis Web Sockets / Ajax Store Chat Messages Analyze and generate patterns feedback HTML/CS S
  7. Live Chat – Ajax function newMessage(form) { $.postJSON("/a/message/new", message, function(response) { updater.showMessage(response); }); } class MessageNewHandler: def post(self): message = { "id": str(uuid.uuid4()), "from": self.current_user["first_name"], "body": self.get_argument("body"), } message["html"] = self.render_string ("message.html", message=message)
  8. Live Chat -Websockets var url = "ws://" + location.host + "/chatsocket"; updater.socket = new WebSocket(url); function newMessage(form) { updater.socket.send(JSON.stringify(message)); } class ChatSocketHandler: def on_message(self, message): chat = { "id": str(uuid.uuid4()), "body": parsed["body"], } chat["html"] = self.render_string ("message.html", message=chat)
  9. Demo
  10. Development  Considerations:  Ease of use  Availability of service  Point to point  Tools  Web Server: Tornado  JavaScript: webrtc
  11. What it means to Business?  Better Marketing demonstrations  Increased Product up sales  Improved Customer Satisfaction Score  Convert customer pain points to profits  Competitive Edge  Reduced Expenses – customer support time/telephone  Did someone say more revenue? 
  12. How can developers help?  Commercially available  Used off the shelf? – Often not  Data in the desired format?  To analyze and identify patterns  Looks like I can develop it myself??!  When are you building yours? 
  13. References  Market research: Forrester Research and Boldchat  Demos hosted on http://heroku.com  eAssistance Pro video on youtube.com  webrtc-plugin http://freshtilledsoil.com/  Free website templates from http://WebsiteTemplatesOnline.com  Tornado web server http://tornadoweb.org  MongoDB www.mongodb.org
  14. Questions? Source Code https://github.com/cjgiridhar Blog http://technobeans.com Contact cjgiridhar@gmail.com
  15. Live chat demo -Tourism Chat Window
  16. Demo… User login with gmail (openid) Cross selling with Chat
  17. Video Chat – Interior Design
Advertisement