SlideShare ist ein Scribd-Unternehmen logo
1 von 64
Downloaden Sie, um offline zu lesen
NullMQ
 ZEROMQ SEMANTICS IN THE BROWSER




Jeff Lindsay      Bulat Shakirzyanov
@progrium             @avalanche123
libzmq
High-level patterns

      libzmq
Philosophy

High-level patterns

      libzmq
Philosophy

High-level patterns




      libzmq
Philosophy

High-level patterns

 API / Semantics

      libzmq
Toolkit for building messaging systems...
Toolkit for building messaging systems...
        ...behind your firewall
Toolkit for building messaging systems...
        ...behind your firewall
        ...not for customers
Toolkit for building messaging systems...
        ...behind your firewall
        ...not for customers
        ...certainly not with the browser
WITH VOICE

  MAKE & RECEIVE
  PHONE CALLS


  SEND & RECEIVE
  TEXT MESSAGES


  INSTANTLY BUY
  PHONE NUMBERS


  ADD VOICE TO
  WEB & MOBILE APPS
Browser   Browser
ZeroMQ in the
    browser?
ZeroMQ in the
    browser?
   • libzmq is a C++ library
ZeroMQ in the
    browser?
   • libzmq is a C++ library
   • Browser extension not viable
ZeroMQ in the
    browser?
   • libzmq is a C++ library
   • Browser extension not viable
   • ZMTP is not valuable by itself
Let’s say we did...
Let’s say we did...
 • Security?
Let’s say we did...
 • Security?
  • Skip existing auth infrastructure
Let’s say we did...
 • Security?
  • Skip existing auth infrastructure
  • Need to make something up
Let’s say we did...
 • Security?
  • Skip existing auth infrastructure
  • Need to make something up
 • Direct connections?
Let’s say we did...
 • Security?
  • Skip existing auth infrastructure
  • Need to make something up
 • Direct connections?
  • Lots of open connections, open ports
Let’s say we did...
 • Security?
  • Skip existing auth infrastructure
  • Need to make something up
 • Direct connections?
  • Lots of open connections, open ports
 • Just not “web friendly”
Philosophy

High-level patterns

 API / Semantics

      libzmq
Philosophy

High-level patterns

 API / Semantics

      libzmq
What do we want?
What do we want?
•   Near feature/semantic parity with ZeroMQ
What do we want?
•   Near feature/semantic parity with ZeroMQ

•   Throughput performance not as important
What do we want?
•   Near feature/semantic parity with ZeroMQ

•   Throughput performance not as important

•   Embrace nature of the web in design
What do we want?
•   Near feature/semantic parity with ZeroMQ

•   Throughput performance not as important

•   Embrace nature of the web in design

•   Single connection, service multiplexing
What do we want?
•   Near feature/semantic parity with ZeroMQ

•   Throughput performance not as important

•   Embrace nature of the web in design

•   Single connection, service multiplexing

•   Use existing transports, protocols, etc
NullMQ
      What do we want?
•   Near feature/semantic parity with ZeroMQ

•   Throughput performance not as important

•   Embrace nature of the web in design

•   Single connection, service multiplexing

•   Use existing transports, protocols, etc
What do we have?
WebSocket
WebSocket
•   ZMTP over WebSocket?
WebSocket
•   ZMTP over WebSocket?

    •   Connection inefficient
WebSocket
•   ZMTP over WebSocket?

    •   Connection inefficient

    •   Not extensible
WebSocket
•   ZMTP over WebSocket?

    •   Connection inefficient

    •   Not extensible

    •   No easy parsers
WebSocket
WebSocket
•   STOMP over WebSocket?
WebSocket
•   STOMP over WebSocket?

    •   Existing parsers, easy to write
WebSocket
•   STOMP over WebSocket?

    •   Existing parsers, easy to write

    •   Very much like HTTP
WebSocket
•   STOMP over WebSocket?

    •   Existing parsers, easy to write

    •   Very much like HTTP

    •   Used primarily to multiplex
NullMQ
var url = "ws://hostname/gateway";
var ctx = new nullmq.Context(url);
socket = ctx.socket(nullmq.REP);
socket.bind("nullmq://echo");
socket.recvall(function(request) {
    socket.send("Got: "+request);
});
var url = "ws://hostname/gateway";
var ctx = new nullmq.Context(url);
socket = ctx.socket(nullmq.REQ);
socket.connect("nullmq://echo");
socket.send("Hello world!");
socket.recv(function(reply) {
    console.log(reply);
    // "Got: Hello world!"
});
Browser         Server

Application      Application

     NullMQ     NullMQ

     STOMP      STOMP

   WebSocket   WebSocket
Browser      Gateway     Backend

Application    Bridge     ZMQ Socket

 NullMQ        NullMQ     ZMQ Socket

 STOMP         STOMP      ZMQ Socket

WebSocket     WebSocket
Presence Demo
NullMQ
 http://github.com/progrium/nullmq
http://groups.google.com/group/nullmq

           @progrium
         @avalanche123
STOMP
STOMP
•   Simple and human-readable like HTTP
STOMP
•   Simple and human-readable like HTTP

•   Extensible via headers
STOMP
•   Simple and human-readable like HTTP

•   Extensible via headers

•   Library and server support
STOMP
•   Simple and human-readable like HTTP

•   Extensible via headers

•   Library and server support

•   An easy WebSocket subprotocol
STOMP
•   Simple and human-readable like HTTP

•   Extensible via headers

•   Library and server support

•   An easy WebSocket subprotocol

•   Can be used to model “virtual connections”
STOMP
•   Simple and human-readable like HTTP

•   Extensible via headers

•   Library and server support

•   An easy WebSocket subprotocol

•   Can be used to model “virtual connections”

•   Transactions for multipart messages
STOMP “Extensions”

1. Frames include socket type header
2. Header for “connect” or “bind” in SUBSCRIBE
3. Req-Rep messages use “reply-to” header

Weitere ähnliche Inhalte

Was ist angesagt?

XMPP & AMQP
XMPP & AMQPXMPP & AMQP
XMPP & AMQP
voluntas
 
High powered messaging with RabbitMQ
High powered messaging with RabbitMQHigh powered messaging with RabbitMQ
High powered messaging with RabbitMQ
James Carr
 
The Future of Messaging: RabbitMQ and AMQP
The Future of Messaging: RabbitMQ and AMQP The Future of Messaging: RabbitMQ and AMQP
The Future of Messaging: RabbitMQ and AMQP
Eberhard Wolff
 

Was ist angesagt? (20)

Scala and ZeroMQ: Events beyond the JVM
Scala and ZeroMQ: Events beyond the JVMScala and ZeroMQ: Events beyond the JVM
Scala and ZeroMQ: Events beyond the JVM
 
Zero mq logs
Zero mq logsZero mq logs
Zero mq logs
 
Practical Message Queuing Using RabbitMQ (PHPem, 3rd July 2014)
Practical Message Queuing Using RabbitMQ (PHPem, 3rd July 2014)Practical Message Queuing Using RabbitMQ (PHPem, 3rd July 2014)
Practical Message Queuing Using RabbitMQ (PHPem, 3rd July 2014)
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
 
Rabbit MQ
Rabbit MQRabbit MQ
Rabbit MQ
 
RabbitMQ fairly-indepth
RabbitMQ fairly-indepthRabbitMQ fairly-indepth
RabbitMQ fairly-indepth
 
Rabbit mq, amqp and php
Rabbit mq, amqp and phpRabbit mq, amqp and php
Rabbit mq, amqp and php
 
XMPP & AMQP
XMPP & AMQPXMPP & AMQP
XMPP & AMQP
 
High powered messaging with RabbitMQ
High powered messaging with RabbitMQHigh powered messaging with RabbitMQ
High powered messaging with RabbitMQ
 
AMQP with RabbitMQ
AMQP with RabbitMQAMQP with RabbitMQ
AMQP with RabbitMQ
 
RabbitMQ
RabbitMQRabbitMQ
RabbitMQ
 
XMPP & AMQP in Ruby
XMPP & AMQP in RubyXMPP & AMQP in Ruby
XMPP & AMQP in Ruby
 
Alvaro Videla, Building a Distributed Data Ingestion System with RabbitMQ
Alvaro Videla, Building a Distributed Data Ingestion System with RabbitMQAlvaro Videla, Building a Distributed Data Ingestion System with RabbitMQ
Alvaro Videla, Building a Distributed Data Ingestion System with RabbitMQ
 
The Future of Messaging: RabbitMQ and AMQP
The Future of Messaging: RabbitMQ and AMQP The Future of Messaging: RabbitMQ and AMQP
The Future of Messaging: RabbitMQ and AMQP
 
Think beyond http
Think beyond httpThink beyond http
Think beyond http
 
RabbitMQ and AMQP Model
RabbitMQ and AMQP ModelRabbitMQ and AMQP Model
RabbitMQ and AMQP Model
 
RabbitMQ & Hutch
RabbitMQ & HutchRabbitMQ & Hutch
RabbitMQ & Hutch
 
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
 
gen_udp and gen_tcp in Elixir
gen_udp and gen_tcp in Elixirgen_udp and gen_tcp in Elixir
gen_udp and gen_tcp in Elixir
 
Spring RabbitMQ
Spring RabbitMQSpring RabbitMQ
Spring RabbitMQ
 

Andere mochten auch

Presentacion generalintia englishweb
Presentacion generalintia englishwebPresentacion generalintia englishweb
Presentacion generalintia englishweb
slintiasa
 
Guia dejar fumar
Guia dejar fumarGuia dejar fumar
Guia dejar fumar
Ana Martín
 
Amigo Duende Sponsorship Proposal - Official
Amigo Duende Sponsorship Proposal  - OfficialAmigo Duende Sponsorship Proposal  - Official
Amigo Duende Sponsorship Proposal - Official
revolucionlatina
 

Andere mochten auch (20)

ZeroMQ Is The Answer
ZeroMQ Is The AnswerZeroMQ Is The Answer
ZeroMQ Is The Answer
 
ZeroMQ with NodeJS
ZeroMQ with NodeJSZeroMQ with NodeJS
ZeroMQ with NodeJS
 
Tekniske specifikationer VIEW
Tekniske specifikationer VIEWTekniske specifikationer VIEW
Tekniske specifikationer VIEW
 
Create a Future Education Model - K-Graduate Programs
Create a Future Education Model - K-Graduate ProgramsCreate a Future Education Model - K-Graduate Programs
Create a Future Education Model - K-Graduate Programs
 
Dilo 04 web
Dilo 04 webDilo 04 web
Dilo 04 web
 
Notas Tricaster
Notas TricasterNotas Tricaster
Notas Tricaster
 
Introducción al m-learning
Introducción al m-learningIntroducción al m-learning
Introducción al m-learning
 
Diana rojas astrofoto cp
Diana rojas   astrofoto cpDiana rojas   astrofoto cp
Diana rojas astrofoto cp
 
Presentacion generalintia englishweb
Presentacion generalintia englishwebPresentacion generalintia englishweb
Presentacion generalintia englishweb
 
Guia dejar fumar
Guia dejar fumarGuia dejar fumar
Guia dejar fumar
 
La Electrónica
La Electrónica La Electrónica
La Electrónica
 
PresentacióN Comercial Intelligent Tech
PresentacióN Comercial Intelligent TechPresentacióN Comercial Intelligent Tech
PresentacióN Comercial Intelligent Tech
 
Hellmann Worldwide Logistics Image Presentation 2011 englisch
Hellmann Worldwide Logistics Image Presentation 2011 englischHellmann Worldwide Logistics Image Presentation 2011 englisch
Hellmann Worldwide Logistics Image Presentation 2011 englisch
 
Amigo Duende Sponsorship Proposal - Official
Amigo Duende Sponsorship Proposal  - OfficialAmigo Duende Sponsorship Proposal  - Official
Amigo Duende Sponsorship Proposal - Official
 
Presentation B2B Galaxy
Presentation B2B GalaxyPresentation B2B Galaxy
Presentation B2B Galaxy
 
Bridging Cultures "Entenderse es más que hablar"
Bridging Cultures "Entenderse es más que hablar"Bridging Cultures "Entenderse es más que hablar"
Bridging Cultures "Entenderse es más que hablar"
 
Inducción agm 2015
Inducción agm 2015Inducción agm 2015
Inducción agm 2015
 
Finn brochure istituzionale
Finn brochure istituzionaleFinn brochure istituzionale
Finn brochure istituzionale
 
Digital storytelling en el aula de Primaria y Secundaria
Digital storytelling en el aula de Primaria y SecundariaDigital storytelling en el aula de Primaria y Secundaria
Digital storytelling en el aula de Primaria y Secundaria
 
Biotecno enzimas[1]1
Biotecno enzimas[1]1Biotecno enzimas[1]1
Biotecno enzimas[1]1
 

Ähnlich wie NullMQ @ PDX

Message:Passing - lpw 2012
Message:Passing - lpw 2012Message:Passing - lpw 2012
Message:Passing - lpw 2012
Tomas Doran
 
Messaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new frameworkMessaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new framework
Tomas Doran
 
DefCamp 2013 - Http header analysis
DefCamp 2013 - Http header analysisDefCamp 2013 - Http header analysis
DefCamp 2013 - Http header analysis
DefCamp
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_php
Jeanho Chu
 

Ähnlich wie NullMQ @ PDX (20)

Scaling with swagger
Scaling with swaggerScaling with swagger
Scaling with swagger
 
About Clack
About ClackAbout Clack
About Clack
 
A web app in pure Clojure
A web app in pure ClojureA web app in pure Clojure
A web app in pure Clojure
 
Build your own analytics power tools
Build your own analytics power toolsBuild your own analytics power tools
Build your own analytics power tools
 
Html5 web sockets - Brad Drysdale - London Web 2011-10-20
Html5 web sockets - Brad Drysdale - London Web 2011-10-20Html5 web sockets - Brad Drysdale - London Web 2011-10-20
Html5 web sockets - Brad Drysdale - London Web 2011-10-20
 
My Little Webap - DevOpsSec is Magic
My Little Webap - DevOpsSec is MagicMy Little Webap - DevOpsSec is Magic
My Little Webap - DevOpsSec is Magic
 
Message:Passing - lpw 2012
Message:Passing - lpw 2012Message:Passing - lpw 2012
Message:Passing - lpw 2012
 
Prometheus lightning talk (Devops Dublin March 2015)
Prometheus lightning talk (Devops Dublin March 2015)Prometheus lightning talk (Devops Dublin March 2015)
Prometheus lightning talk (Devops Dublin March 2015)
 
WHIP and Janus @ IIT-RTC 2021
WHIP and Janus @ IIT-RTC 2021WHIP and Janus @ IIT-RTC 2021
WHIP and Janus @ IIT-RTC 2021
 
WebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! FrameworkWebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! Framework
 
Streams API (Web Engines Hackfest 2015)
Streams API (Web Engines Hackfest 2015)Streams API (Web Engines Hackfest 2015)
Streams API (Web Engines Hackfest 2015)
 
Increasing velocity via serless semantics
Increasing velocity via serless semanticsIncreasing velocity via serless semantics
Increasing velocity via serless semantics
 
Realtime web2012
Realtime web2012Realtime web2012
Realtime web2012
 
Kubernetes and AWS Lambda can play nicely together
Kubernetes and AWS Lambda can play nicely togetherKubernetes and AWS Lambda can play nicely together
Kubernetes and AWS Lambda can play nicely together
 
Messaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new frameworkMessaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new framework
 
DefCamp 2013 - Http header analysis
DefCamp 2013 - Http header analysisDefCamp 2013 - Http header analysis
DefCamp 2013 - Http header analysis
 
Scaling Machine Learning Systems up to Billions of Predictions per Day
Scaling Machine Learning Systems up to Billions of Predictions per DayScaling Machine Learning Systems up to Billions of Predictions per Day
Scaling Machine Learning Systems up to Billions of Predictions per Day
 
Web sockets - Pentesting
Web sockets - Pentesting Web sockets - Pentesting
Web sockets - Pentesting
 
Kuby, ActiveDeployment for Rails Apps
Kuby, ActiveDeployment for Rails AppsKuby, ActiveDeployment for Rails Apps
Kuby, ActiveDeployment for Rails Apps
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_php
 

Mehr von Jeff Lindsay

Hack Party SHDH Lightning Talk
Hack Party SHDH Lightning TalkHack Party SHDH Lightning Talk
Hack Party SHDH Lightning Talk
Jeff Lindsay
 

Mehr von Jeff Lindsay (19)

Hack Party SHDH Lightning Talk
Hack Party SHDH Lightning TalkHack Party SHDH Lightning Talk
Hack Party SHDH Lightning Talk
 
Building an Event-driven Web @ Impact
Building an Event-driven Web @ ImpactBuilding an Event-driven Web @ Impact
Building an Event-driven Web @ Impact
 
Evented Web @ Ignite
Evented Web @ IgniteEvented Web @ Ignite
Evented Web @ Ignite
 
Hacker Dojo Origins
Hacker Dojo OriginsHacker Dojo Origins
Hacker Dojo Origins
 
Dinos
DinosDinos
Dinos
 
APIs That Make Things Happen
APIs That Make Things HappenAPIs That Make Things Happen
APIs That Make Things Happen
 
WebHooks in 10 Minutes
WebHooks in 10 MinutesWebHooks in 10 Minutes
WebHooks in 10 Minutes
 
Hacker Dojo @ Google
Hacker Dojo @ GoogleHacker Dojo @ Google
Hacker Dojo @ Google
 
How WebHooks Will Make Us All Programmers
How WebHooks Will Make Us All ProgrammersHow WebHooks Will Make Us All Programmers
How WebHooks Will Make Us All Programmers
 
Creating + Nurturing Your Indie Game Community
Creating + Nurturing Your Indie Game CommunityCreating + Nurturing Your Indie Game Community
Creating + Nurturing Your Indie Game Community
 
Dissolving Problems
Dissolving ProblemsDissolving Problems
Dissolving Problems
 
SHDH Retrospective, Part 2
SHDH Retrospective, Part 2SHDH Retrospective, Part 2
SHDH Retrospective, Part 2
 
SHDH Retrospective, Part 1
SHDH Retrospective, Part 1SHDH Retrospective, Part 1
SHDH Retrospective, Part 1
 
Superglue: Web Hooks and the Future of the Web
Superglue: Web Hooks and the Future of the WebSuperglue: Web Hooks and the Future of the Web
Superglue: Web Hooks and the Future of the Web
 
Using Web Hooks
Using Web HooksUsing Web Hooks
Using Web Hooks
 
Web Hooks Google Tech Talk
Web Hooks Google Tech TalkWeb Hooks Google Tech Talk
Web Hooks Google Tech Talk
 
Beyond Mashups: Service Integration and More
Beyond Mashups: Service Integration and MoreBeyond Mashups: Service Integration and More
Beyond Mashups: Service Integration and More
 
Web Hooks and the Programmable World of Tomorrow
Web Hooks and the Programmable World of TomorrowWeb Hooks and the Programmable World of Tomorrow
Web Hooks and the Programmable World of Tomorrow
 
Web Hooks
Web HooksWeb Hooks
Web Hooks
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

NullMQ @ PDX

  • 1. NullMQ ZEROMQ SEMANTICS IN THE BROWSER Jeff Lindsay Bulat Shakirzyanov @progrium @avalanche123
  • 2.
  • 3.
  • 9. Toolkit for building messaging systems...
  • 10. Toolkit for building messaging systems... ...behind your firewall
  • 11. Toolkit for building messaging systems... ...behind your firewall ...not for customers
  • 12. Toolkit for building messaging systems... ...behind your firewall ...not for customers ...certainly not with the browser
  • 13. WITH VOICE MAKE & RECEIVE PHONE CALLS SEND & RECEIVE TEXT MESSAGES INSTANTLY BUY PHONE NUMBERS ADD VOICE TO WEB & MOBILE APPS
  • 14.
  • 15.
  • 16.
  • 17. Browser Browser
  • 18. ZeroMQ in the browser?
  • 19. ZeroMQ in the browser? • libzmq is a C++ library
  • 20. ZeroMQ in the browser? • libzmq is a C++ library • Browser extension not viable
  • 21. ZeroMQ in the browser? • libzmq is a C++ library • Browser extension not viable • ZMTP is not valuable by itself
  • 22. Let’s say we did...
  • 23. Let’s say we did... • Security?
  • 24. Let’s say we did... • Security? • Skip existing auth infrastructure
  • 25. Let’s say we did... • Security? • Skip existing auth infrastructure • Need to make something up
  • 26. Let’s say we did... • Security? • Skip existing auth infrastructure • Need to make something up • Direct connections?
  • 27. Let’s say we did... • Security? • Skip existing auth infrastructure • Need to make something up • Direct connections? • Lots of open connections, open ports
  • 28. Let’s say we did... • Security? • Skip existing auth infrastructure • Need to make something up • Direct connections? • Lots of open connections, open ports • Just not “web friendly”
  • 31. What do we want?
  • 32. What do we want? • Near feature/semantic parity with ZeroMQ
  • 33. What do we want? • Near feature/semantic parity with ZeroMQ • Throughput performance not as important
  • 34. What do we want? • Near feature/semantic parity with ZeroMQ • Throughput performance not as important • Embrace nature of the web in design
  • 35. What do we want? • Near feature/semantic parity with ZeroMQ • Throughput performance not as important • Embrace nature of the web in design • Single connection, service multiplexing
  • 36. What do we want? • Near feature/semantic parity with ZeroMQ • Throughput performance not as important • Embrace nature of the web in design • Single connection, service multiplexing • Use existing transports, protocols, etc
  • 37. NullMQ What do we want? • Near feature/semantic parity with ZeroMQ • Throughput performance not as important • Embrace nature of the web in design • Single connection, service multiplexing • Use existing transports, protocols, etc
  • 38. What do we have?
  • 40. WebSocket • ZMTP over WebSocket?
  • 41. WebSocket • ZMTP over WebSocket? • Connection inefficient
  • 42. WebSocket • ZMTP over WebSocket? • Connection inefficient • Not extensible
  • 43. WebSocket • ZMTP over WebSocket? • Connection inefficient • Not extensible • No easy parsers
  • 45. WebSocket • STOMP over WebSocket?
  • 46. WebSocket • STOMP over WebSocket? • Existing parsers, easy to write
  • 47. WebSocket • STOMP over WebSocket? • Existing parsers, easy to write • Very much like HTTP
  • 48. WebSocket • STOMP over WebSocket? • Existing parsers, easy to write • Very much like HTTP • Used primarily to multiplex
  • 50. var url = "ws://hostname/gateway"; var ctx = new nullmq.Context(url); socket = ctx.socket(nullmq.REP); socket.bind("nullmq://echo"); socket.recvall(function(request) { socket.send("Got: "+request); });
  • 51. var url = "ws://hostname/gateway"; var ctx = new nullmq.Context(url); socket = ctx.socket(nullmq.REQ); socket.connect("nullmq://echo"); socket.send("Hello world!"); socket.recv(function(reply) { console.log(reply); // "Got: Hello world!" });
  • 52. Browser Server Application Application NullMQ NullMQ STOMP STOMP WebSocket WebSocket
  • 53. Browser Gateway Backend Application Bridge ZMQ Socket NullMQ NullMQ ZMQ Socket STOMP STOMP ZMQ Socket WebSocket WebSocket
  • 56.
  • 57. STOMP
  • 58. STOMP • Simple and human-readable like HTTP
  • 59. STOMP • Simple and human-readable like HTTP • Extensible via headers
  • 60. STOMP • Simple and human-readable like HTTP • Extensible via headers • Library and server support
  • 61. STOMP • Simple and human-readable like HTTP • Extensible via headers • Library and server support • An easy WebSocket subprotocol
  • 62. STOMP • Simple and human-readable like HTTP • Extensible via headers • Library and server support • An easy WebSocket subprotocol • Can be used to model “virtual connections”
  • 63. STOMP • Simple and human-readable like HTTP • Extensible via headers • Library and server support • An easy WebSocket subprotocol • Can be used to model “virtual connections” • Transactions for multipart messages
  • 64. STOMP “Extensions” 1. Frames include socket type header 2. Header for “connect” or “bind” in SUBSCRIBE 3. Req-Rep messages use “reply-to” header