Upgrade to Pro — share decks privately, control downloads, hide ads and more …

OpenChatOps: Programming Language Agnostic ChatOps

OpenChatOps: Programming Language Agnostic ChatOps

Today the community and plugin ecosystems for the major chat bot frameworks are somewhat divided by language. This presentation explores a possible approach for bringing them together with a common API and communications protocol.

Recording: https://www.youtu.be/watch?v=-UL_7IjyOdU

8893e2e206c0377ff776d2535887d23f?s=128

Jimmy Cuadra

October 08, 2015
Tweet

Transcript

  1. OPENCHATOPS Programming language agnostic ChatOps @jimmycuadra

  2. WARNING

  3. THIS IS ALL VAPORWARE

  4. SOME BACKGROUND

  5. None
  6. None
  7. None
  8. None
  9. None
  10. IRC

  11. IRC

  12. None
  13. None
  14. BUT HOW?

  15. ADAPTER | ROBOT / \ PLUGIN PLUGIN

  16. ROBOT ADAPTER PLUGIN PLUGIN

  17. ROBOT PLUGIN

  18. ROBOT PLUGIN NETWORK

  19. ROBOT PLUGIN RPC NETWORK

  20. Remote Procedure Call

  21. REST (Representational State Transfer)

  22. RPC REST GET /posts/1 HTTP/1.1 Host: www.example.com getPost(1) 01101001

  23. • CORBA • JSON-RPC • SOAP • XML-RPC • Thrift

    • DRb • WCF • Protocol Buffers • Avro • Transit • D-Bus • AMF • Finagle • Cap’n Proto • ASN.1 • FlatBuffers • EDN • Fressian
  24. THE DETAILS

  25. gRPC

  26. Protocol Buffers v3

  27. None
  28. syntax = "proto3"; package helloworld; // The greeter service definition.

    service Greeter { // Sends a greeting rpc SayHello (HelloRequest) returns (HelloReply) {} } // The request message containing the user's name. message HelloRequest { string name = 1; } // The response message containing the greetings message HelloReply { string message = 1; }
  29. class GreeterServer < Helloworld::Greeter::Service def sayhello(helloreq) Helloworld::HelloReply.new( message: "Hello #{hello_req.name}”

    ) end end Server (Ruby)
  30. def main s = GRPC::RpcServer.new s.add_http2_port('0.0.0.0:50051') s.handle(GreeterServer) s.run end

  31. var client = new hello_proto.Greeter(‘localhost:50051'); client.sayHello({name: user}, function(err, response) {

    console.log('Greeting:', response.message); }); Client (JavaScript)
  32. // The RPC service that controls the chat bot. service

    Robot { // Instructs the bot to join a room. rpc Join (JoinRequest) returns (JoinResponse); // Listens to a stream of incoming events. rpc Listen (ListenRequest) returns (stream Event); // Instructs the bot to part from a room. rpc Part (PartRequest) returns (PartResponse); // Sends one or more messages to a user or room. rpc SendMessages (SendMessagesRequest) returns (SendMessagesResponse); }
  33. TRADE OFFS

  34. None
  35. ADAPTER | ROBOT / \ PLUGIN PLUGIN

  36. ROBOT ADAPTER PLUGIN PLUGIN

  37. https://github.com/openchatops

  38. THANK YOU @jimmycuadra

  39. QUESTIONS? @jimmycuadra