SlideShare a Scribd company logo
1 of 22
Download to read offline
Normation – CC-BY-SA
normation.com 1
Scala and ZeroMQ
Events beyond the JVM
Scala and ZeroMQ 
Events beyond the JVM
François ARMAND
Directeur R&D - Normation
far@normation.com
Normation – CC-BY-SA
normation.com 2
Qui suis-je ?
Scalaist since...
q mid-2006 for personnal projects
q Rudder : full time Scala since mid-2009
q Projet LaFoSec : sécurité des langages fonctionnels (in French)
– Scala from the point of view of IT security
– 2010 paper for the Agence Nationnal de la Sécurité de SI (ANSSI)
– http://www.ssi.gouv.fr/fr/anssi/publications/publications-scientifiques/autres-publicati
ons/lafosec-securite-et-langages-fonctionnels.html
Co-founder
Lead-architect
far@normation.com @fanf42
François ARMAND
Normation – CC-BY-SA
normation.com 3
De quoi va-t-on parler ?
q ZeroMQ presentation
q Integration with Scala
q Code, code, code, code...
Normation – CC-BY-SA
normation.com 4
Scala and ZeroMQ
Events beyond the JVM
ZeroMQ :
Ounce upon a time,
the quest for the GrailMOM
François ARMAND
Directeur R&D - Normation
far@normation.com
Normation – CC-BY-SA
normation.com 5
MOM : Grail of IT integration
q Message Oriented Middleware (and Architecture)
q Grails of IT integration
Normation – CC-BY-SA
normation.com 6
ZeroMQ : history and presentation
q In the '90s, messaging middlewares :
q Banks / trading places:
q Need for hight speed Events interchange queues
q 2003 : Advanced Message Queuing Protocol
« Toward a commodity (message oriented) middleware »
– Message orientation
– Queuing
– Routing (including point-to-point and publish-and-subscribe),
– Reliability
– Security.
Normation – CC-BY-SA
normation.com 7
From AMQP to Nano
q AMQP version 1.0 : October 2011 (!!!)
q AMQP : Oasis Standard : October 2012
q RabbitMQ still refuses to implements v1.0
q 2004: iMatix, initiator of the project resigned and starts ZeroMQ
Hi Folks,
Here at iMatix we've participated since 2004 in AMQP but today we've
decided to end that. We're going to be killing support for OpenAMQ
and migrating our users to ZeroMQ, which is simpler, faster, and in
our view a better bet for our users.
We have serious, long lived, and unaddressed concerns with the AMQP
development process and today our worst predictions seem to have come
true: AMQP is a game for large firms, and ignores the needs of the
majority of users and vendors. For us, that means failure.
q 2012: iMatix, iniator of the ZeroMQ project and starts
Crossroads.io
q But it's dead because...
q 2013: Martin Sustrik, original author of ZeroMQ and
Crossroads.io, leaves to build Nano...
Normation – CC-BY-SA
normation.com 8
From AMQP to Nano
q AMQP version 1.0 : October 2011 (!!!)
q AMQP : Oasis Standard : October 2012
q RabbitMQ still refuses to implements v1.0
q 2004 : iMatix, initiator of the project resigned and starts ZeroMQ
Hi Folks,
Here at iMatix we've participated since 2004 in AMQP but today we've
decided to end that. We're going to be killing support for OpenAMQ
and migrating our users to ZeroMQ, which is simpler, faster, and in
our view a better bet for our users.
We have serious, long lived, and unaddressed concerns with the AMQP
development process and today our worst predictions seem to have come
true: AMQP is a game for large firms, and ignores the needs of the
majority of users and vendors. For us, that means failure.
q 2012 : iMatix, iniator of the ZeroMQ project and starts
crossroads.io
q But that dead because...
q 2013 : Martin Sustrik, original author of ZeroMQ and
Crossroads.io, leaves to build Nano...
Normation – CC-BY-SA
normation.com 9
ZeroMQ
Ø Not a MOM (no broker, no queues, etc)   
Ø Socket library that acts as a concurrency framework. 
Ø Carries messages across inproc, IPC, TCP, and multicast. 
Ø Connect N-to-N via fanout, pubsub, pipeline, request-reply. 
Ø Asynch I/O for scalable multicore message-passing apps. 
Ø 40+ languages including C, C++, Java, .NET, Python. 
Ø http://zguide.zeromq.org/
Normation – CC-BY-SA
normation.com 10
Scala and ZeroMQ
Events beyond the JVM
Sockets for this millenium
François ARMAND
Directeur R&D - Normation
far@normation.com
Normation – CC-BY-SA
normation.com 11
ZeroMQ sockets
q « It's sockets on steroids. It's like mailboxes with routing. It's fast! »
q ZeroMQ patterns (and sockets) :
q Request-reply
– Connects a set of clients to a set of services.
– This is a remote procedure call and task distribution pattern.
q Pub-sub
– Connects a set of publishers to a set of subscribers.
– This is a data distribution pattern.
q Pipelines
– Connects nodes in a fan-out/fan-in pattern that can have multiple steps and loops.
– This is a parallel task distribution and collection pattern.
q Exclusive pair
– Connects two sockets exclusively.
– This is a pattern for connecting two threads in a process
– Not to be confused with "normal" pairs of sockets.
Normation – CC-BY-SA
normation.com 12
ZeroMQ sockets
q « It's sockets on steroids. It's like mailboxes with routing. It's fast! »
q ZeroMQ patterns (and sockets) :
q Request-reply
– Connects a set of clients to a set of services.
– This is a remote procedure call and task distribution pattern.
q Pub-sub
– Connects a set of publishers to a set of subscribers.
– This is a data distribution pattern.
q Pipelines
– Connects nodes in a fan-out/fan-in pattern that can have multiple steps and loops.
– This is a parallel task distribution and collection pattern.
q Exclusive pair
– Connects two sockets exclusively.
– This is a pattern for connecting two threads in a process
– Not to be confused with "normal" pairs of sockets.
Normation – CC-BY-SA
normation.com 13
Scala and ZeroMQ
Events beyond the JVM
Scala and ZeroMQ
François ARMAND
Directeur R&D - Normation
far@normation.com
Normation – CC-BY-SA
normation.com 14
Scala and ZeroMQ
q C-Scala native binding
q http://zeromq.org/bindings:scala-binding
q Uses JNA
q Only supports libzmq v2.1
q Akka integration
q Akka-zeromq module
q http://doc.akka.io/docs/akka/2.2.0/scala/zeromq.html
q Documentation and example are sparses
Normation – CC-BY-SA
normation.com 15
Scala and ZeroMQ - remarks
q I'm still believing AKKA is Scala killer-app
q It went a looooooooooooooooooong way since my last try 3 years ago
q I'm believing ZeroMQ will be in all IT infrastructures soon
q I'm still HATING AKKA untyped model
q Next time, I'm going to try Typed Actor / Channel
Normation – CC-BY-SA
normation.com 16
Scala and ZeroMQ
Events beyond the JVM
Pub/Sub.
Young people these days
have got it easy
François ARMAND
Directeur R&D - Normation
far@normation.com
Normation – CC-BY-SA
normation.com 17
ZeroMQ sockets : Pub / Sub
q Publish / Subscribes sockets
q It's just work, nothing to add
Normation – CC-BY-SA
normation.com 18
ZeroMQ sockets : Pub / Sub
Code !
https://github.com/fanf/scala_zeromq/tree/master/src/main/scala/psug/zeromq/pubsub
Normation – CC-BY-SA
normation.com 19
Scala and ZeroMQ
Events beyond the JVM
Req/Rep.
Because waiting for answer
is hard.
François ARMAND
Directeur R&D - Normation
far@normation.com
Normation – CC-BY-SA
normation.com 20
ZeroMQ sockets : Req / Rep
q Request / Reply sockets
q Statefull request ↔ reply cycles
Normation – CC-BY-SA
normation.com 21
ZeroMQ sockets : Req / Rep
Code !
https://github.com/fanf/scala_zeromq/tree/master/src/main/scala/psug/zeromq/reqrep
Normation – CC-BY-SA
normation.com 22
Scala and ZeroMQ
Events beyond the JVM
Questions ?
François ARMAND
Directeur R&D - Normation
far@normation.com

More Related Content

What's hot

Europycon2011: Implementing distributed application using ZeroMQ
Europycon2011: Implementing distributed application using ZeroMQEuropycon2011: Implementing distributed application using ZeroMQ
Europycon2011: Implementing distributed application using ZeroMQ
fcrippa
 
Real time system_performance_mon
Real time system_performance_monReal time system_performance_mon
Real time system_performance_mon
Tomas Doran
 

What's hot (20)

RestMS Introduction
RestMS IntroductionRestMS Introduction
RestMS Introduction
 
ZeroMQ
ZeroMQZeroMQ
ZeroMQ
 
What is RabbitMQ ?
What is RabbitMQ ?What is RabbitMQ ?
What is RabbitMQ ?
 
Overview of ZeroMQ
Overview of ZeroMQOverview of ZeroMQ
Overview of ZeroMQ
 
ZeroMQ with NodeJS
ZeroMQ with NodeJSZeroMQ with NodeJS
ZeroMQ with NodeJS
 
Introduction to ZeroMQ - eSpace TechTalk
Introduction to ZeroMQ - eSpace TechTalkIntroduction to ZeroMQ - eSpace TechTalk
Introduction to ZeroMQ - eSpace TechTalk
 
Europycon2011: Implementing distributed application using ZeroMQ
Europycon2011: Implementing distributed application using ZeroMQEuropycon2011: Implementing distributed application using ZeroMQ
Europycon2011: Implementing distributed application using ZeroMQ
 
Zmq in context of openstack
Zmq in context of openstackZmq in context of openstack
Zmq in context of openstack
 
Keynote: Idiomatic RabbitMQ - Gavin M Roy
Keynote: Idiomatic RabbitMQ - Gavin M RoyKeynote: Idiomatic RabbitMQ - Gavin M Roy
Keynote: Idiomatic RabbitMQ - Gavin M Roy
 
Real time system_performance_mon
Real time system_performance_monReal time system_performance_mon
Real time system_performance_mon
 
ZeroMQ - Sockets on steroids!
ZeroMQ - Sockets on steroids!ZeroMQ - Sockets on steroids!
ZeroMQ - Sockets on steroids!
 
RabbitMQ And Nanite
RabbitMQ And NaniteRabbitMQ And Nanite
RabbitMQ And Nanite
 
Introduction to AMQP Messaging with RabbitMQ
Introduction to AMQP Messaging with RabbitMQIntroduction to AMQP Messaging with RabbitMQ
Introduction to AMQP Messaging with RabbitMQ
 
FOSDEM 2011 - 0MQ
FOSDEM 2011 - 0MQFOSDEM 2011 - 0MQ
FOSDEM 2011 - 0MQ
 
Amqp Basic
Amqp BasicAmqp Basic
Amqp Basic
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
 
Getting started with IOT Development using Fedora on ARM
Getting started with IOT Development using Fedora on ARMGetting started with IOT Development using Fedora on ARM
Getting started with IOT Development using Fedora on ARM
 
The RabbitMQ Message Broker
The RabbitMQ Message BrokerThe RabbitMQ Message Broker
The RabbitMQ Message Broker
 
Distributed messaging with AMQP
Distributed messaging with AMQPDistributed messaging with AMQP
Distributed messaging with AMQP
 
Message Broker System and RabbitMQ
Message Broker System and RabbitMQMessage Broker System and RabbitMQ
Message Broker System and RabbitMQ
 

Viewers also liked (7)

Building custom kernels for IPython
Building custom kernels for IPythonBuilding custom kernels for IPython
Building custom kernels for IPython
 
Introduction to ZeroMQ
Introduction to ZeroMQIntroduction to ZeroMQ
Introduction to ZeroMQ
 
Distributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromqDistributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromq
 
Software Architecture over ZeroMQ
Software Architecture over ZeroMQSoftware Architecture over ZeroMQ
Software Architecture over ZeroMQ
 
Build reliable, traceable, distributed systems with ZeroMQ
Build reliable, traceable, distributed systems with ZeroMQBuild reliable, traceable, distributed systems with ZeroMQ
Build reliable, traceable, distributed systems with ZeroMQ
 
Zero mq logs
Zero mq logsZero mq logs
Zero mq logs
 
Intro to Spark and Spark SQL
Intro to Spark and Spark SQLIntro to Spark and Spark SQL
Intro to Spark and Spark SQL
 

Similar to Scala and ZeroMQ: Events beyond the JVM

OpenStack 2012 fall summit observation - Quantum/SDN
OpenStack 2012 fall summit observation - Quantum/SDNOpenStack 2012 fall summit observation - Quantum/SDN
OpenStack 2012 fall summit observation - Quantum/SDN
Te-Yen Liu
 
Intro to Project Calico: a pure layer 3 approach to scale-out networking
Intro to Project Calico: a pure layer 3 approach to scale-out networkingIntro to Project Calico: a pure layer 3 approach to scale-out networking
Intro to Project Calico: a pure layer 3 approach to scale-out networking
Packet
 
Securing IoT Applications
Securing IoT Applications Securing IoT Applications
Securing IoT Applications
WSO2
 

Similar to Scala and ZeroMQ: Events beyond the JVM (20)

Rolando Santamaría Masó - Simplicity meets scalability - code.talks 2015
Rolando Santamaría Masó - Simplicity meets scalability - code.talks 2015Rolando Santamaría Masó - Simplicity meets scalability - code.talks 2015
Rolando Santamaría Masó - Simplicity meets scalability - code.talks 2015
 
FOSDEM 2013 - SIP and MSRP over WebSocket in Kamailio
FOSDEM 2013 - SIP and MSRP over WebSocket in KamailioFOSDEM 2013 - SIP and MSRP over WebSocket in Kamailio
FOSDEM 2013 - SIP and MSRP over WebSocket in Kamailio
 
Oracle Developer Tour Latam Nowadays Architecture Trends, from Monolith to Mi...
Oracle Developer Tour Latam Nowadays Architecture Trends, from Monolith to Mi...Oracle Developer Tour Latam Nowadays Architecture Trends, from Monolith to Mi...
Oracle Developer Tour Latam Nowadays Architecture Trends, from Monolith to Mi...
 
Rudder: what's new and what's next? Roadmap, vision and thoughts
Rudder: what's new and what's next? Roadmap, vision and thoughtsRudder: what's new and what's next? Roadmap, vision and thoughts
Rudder: what's new and what's next? Roadmap, vision and thoughts
 
X by orange; una telco en la nube
X by orange;   una telco en la nubeX by orange;   una telco en la nube
X by orange; una telco en la nube
 
Service Mesh Pain & Gain. Experiences from a client project.
Service Mesh Pain & Gain. Experiences from a client project.Service Mesh Pain & Gain. Experiences from a client project.
Service Mesh Pain & Gain. Experiences from a client project.
 
OpenStack 2012 fall summit observation - Quantum/SDN
OpenStack 2012 fall summit observation - Quantum/SDNOpenStack 2012 fall summit observation - Quantum/SDN
OpenStack 2012 fall summit observation - Quantum/SDN
 
The state of server-side Swift
The state of server-side SwiftThe state of server-side Swift
The state of server-side Swift
 
Oracle Code Javaday Sao Paulo Nowadays Architecture Trends, from Monolith to ...
Oracle Code Javaday Sao Paulo Nowadays Architecture Trends, from Monolith to ...Oracle Code Javaday Sao Paulo Nowadays Architecture Trends, from Monolith to ...
Oracle Code Javaday Sao Paulo Nowadays Architecture Trends, from Monolith to ...
 
Артем Гавриченков "The Dark Side of Things: Distributed Denial of Service Att...
Артем Гавриченков "The Dark Side of Things: Distributed Denial of Service Att...Артем Гавриченков "The Dark Side of Things: Distributed Denial of Service Att...
Артем Гавриченков "The Dark Side of Things: Distributed Denial of Service Att...
 
Switchdev - No More SDK
Switchdev - No More SDKSwitchdev - No More SDK
Switchdev - No More SDK
 
What is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your MicroservicesWhat is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your Microservices
 
Intro to Project Calico: a pure layer 3 approach to scale-out networking
Intro to Project Calico: a pure layer 3 approach to scale-out networkingIntro to Project Calico: a pure layer 3 approach to scale-out networking
Intro to Project Calico: a pure layer 3 approach to scale-out networking
 
Container Networking: the Gotchas (Mesos London Meetup 11 May 2016)
Container Networking: the Gotchas (Mesos London Meetup 11 May 2016)Container Networking: the Gotchas (Mesos London Meetup 11 May 2016)
Container Networking: the Gotchas (Mesos London Meetup 11 May 2016)
 
Securing IoT Applications
Securing IoT Applications Securing IoT Applications
Securing IoT Applications
 
Security Goodness with Ruby on Rails
Security Goodness with Ruby on RailsSecurity Goodness with Ruby on Rails
Security Goodness with Ruby on Rails
 
Quick Yang v1.0
Quick Yang v1.0Quick Yang v1.0
Quick Yang v1.0
 
Quick Yang v1.0
Quick Yang v1.0Quick Yang v1.0
Quick Yang v1.0
 
NECOS Industrial Workshop Introduction by Prof. Christian Rothenberg (UNICAMP)
NECOS Industrial Workshop Introduction by Prof. Christian Rothenberg (UNICAMP)NECOS Industrial Workshop Introduction by Prof. Christian Rothenberg (UNICAMP)
NECOS Industrial Workshop Introduction by Prof. Christian Rothenberg (UNICAMP)
 
The State of WebSockets in Django
The State of WebSockets in DjangoThe State of WebSockets in Django
The State of WebSockets in Django
 

More from RUDDER

Poss 2017 : gestion des configurations et mise en conformité chez un service ...
Poss 2017 : gestion des configurations et mise en conformité chez un service ...Poss 2017 : gestion des configurations et mise en conformité chez un service ...
Poss 2017 : gestion des configurations et mise en conformité chez un service ...
RUDDER
 
Poss 2017 - la continuité, arme secrète de la gestion du si - cas concret de ...
Poss 2017 - la continuité, arme secrète de la gestion du si - cas concret de ...Poss 2017 - la continuité, arme secrète de la gestion du si - cas concret de ...
Poss 2017 - la continuité, arme secrète de la gestion du si - cas concret de ...
RUDDER
 
POSS 2017 : Comment automatiser son infrastructure quand... on a pas le temps...
POSS 2017 : Comment automatiser son infrastructure quand... on a pas le temps...POSS 2017 : Comment automatiser son infrastructure quand... on a pas le temps...
POSS 2017 : Comment automatiser son infrastructure quand... on a pas le temps...
RUDDER
 
RUDDER - Continuous Configuration (configuration management + continuous aud...
 RUDDER - Continuous Configuration (configuration management + continuous aud... RUDDER - Continuous Configuration (configuration management + continuous aud...
RUDDER - Continuous Configuration (configuration management + continuous aud...
RUDDER
 

More from RUDDER (20)

What if configuration management didn't need to be lvl60 in dev?
What if configuration management didn't need to be lvl60 in dev?What if configuration management didn't need to be lvl60 in dev?
What if configuration management didn't need to be lvl60 in dev?
 
Servers compliance: audit, remediation, proof
Servers compliance: audit, remediation, proofServers compliance: audit, remediation, proof
Servers compliance: audit, remediation, proof
 
OSIS 2019 - Qu’apporte l’observabilité à la gestion de configuration ?
OSIS 2019 - Qu’apporte l’observabilité à la gestion de configuration ?OSIS 2019 - Qu’apporte l’observabilité à la gestion de configuration ?
OSIS 2019 - Qu’apporte l’observabilité à la gestion de configuration ?
 
OW2Con - Configurations, do you prove yours?
OW2Con - Configurations, do you prove yours?OW2Con - Configurations, do you prove yours?
OW2Con - Configurations, do you prove yours?
 
The new plugin ecosystem in RUDDER 5.0
The new plugin ecosystem in RUDDER 5.0The new plugin ecosystem in RUDDER 5.0
The new plugin ecosystem in RUDDER 5.0
 
What uses for observing operations of Configuration Management?
What uses for observing operations of Configuration Management?What uses for observing operations of Configuration Management?
What uses for observing operations of Configuration Management?
 
UX challenges of a UI-centric config management tool
UX challenges of a UI-centric config management toolUX challenges of a UI-centric config management tool
UX challenges of a UI-centric config management tool
 
What happened in RUDDER in 2018 and what’s next?
What happened in RUDDER in 2018 and what’s next?What happened in RUDDER in 2018 and what’s next?
What happened in RUDDER in 2018 and what’s next?
 
What is RUDDER and when should I use it?
What is RUDDER and when should I use it?What is RUDDER and when should I use it?
What is RUDDER and when should I use it?
 
Fosdem - Configurations do you prove yours?
Fosdem - Configurations  do you prove yours?Fosdem - Configurations  do you prove yours?
Fosdem - Configurations do you prove yours?
 
L'audit en continu : clé de la conformité démontrable (#POSS 2018)
L'audit en continu : clé de la conformité démontrable (#POSS 2018)L'audit en continu : clé de la conformité démontrable (#POSS 2018)
L'audit en continu : clé de la conformité démontrable (#POSS 2018)
 
Fiabilité et conformité continues en production avec Rudder (#BBOOST 2018)
Fiabilité et conformité continues en production avec Rudder (#BBOOST 2018)Fiabilité et conformité continues en production avec Rudder (#BBOOST 2018)
Fiabilité et conformité continues en production avec Rudder (#BBOOST 2018)
 
Stay up - voyage d'un éditeur de logiciels libres
Stay up - voyage d'un éditeur de logiciels libresStay up - voyage d'un éditeur de logiciels libres
Stay up - voyage d'un éditeur de logiciels libres
 
How we scaled Rudder to 10k, and the road to 50k
How we scaled Rudder to 10k, and the road to 50kHow we scaled Rudder to 10k, and the road to 50k
How we scaled Rudder to 10k, and the road to 50k
 
What's new and what's next in Rudder
What's new and what's next in RudderWhat's new and what's next in Rudder
What's new and what's next in Rudder
 
Poss 2017 : gestion des configurations et mise en conformité chez un service ...
Poss 2017 : gestion des configurations et mise en conformité chez un service ...Poss 2017 : gestion des configurations et mise en conformité chez un service ...
Poss 2017 : gestion des configurations et mise en conformité chez un service ...
 
Poss 2017 - la continuité, arme secrète de la gestion du si - cas concret de ...
Poss 2017 - la continuité, arme secrète de la gestion du si - cas concret de ...Poss 2017 - la continuité, arme secrète de la gestion du si - cas concret de ...
Poss 2017 - la continuité, arme secrète de la gestion du si - cas concret de ...
 
POSS 2017 : Comment automatiser son infrastructure quand... on a pas le temps...
POSS 2017 : Comment automatiser son infrastructure quand... on a pas le temps...POSS 2017 : Comment automatiser son infrastructure quand... on a pas le temps...
POSS 2017 : Comment automatiser son infrastructure quand... on a pas le temps...
 
DevOps D-Day 2017 - Gestion des configurations et mise en conformité chez un ...
DevOps D-Day 2017 - Gestion des configurations et mise en conformité chez un ...DevOps D-Day 2017 - Gestion des configurations et mise en conformité chez un ...
DevOps D-Day 2017 - Gestion des configurations et mise en conformité chez un ...
 
RUDDER - Continuous Configuration (configuration management + continuous aud...
 RUDDER - Continuous Configuration (configuration management + continuous aud... RUDDER - Continuous Configuration (configuration management + continuous aud...
RUDDER - Continuous Configuration (configuration management + continuous aud...
 

Recently uploaded

Recently uploaded (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

Scala and ZeroMQ: Events beyond the JVM

  • 1. Normation – CC-BY-SA normation.com 1 Scala and ZeroMQ Events beyond the JVM Scala and ZeroMQ  Events beyond the JVM François ARMAND Directeur R&D - Normation far@normation.com
  • 2. Normation – CC-BY-SA normation.com 2 Qui suis-je ? Scalaist since... q mid-2006 for personnal projects q Rudder : full time Scala since mid-2009 q Projet LaFoSec : sécurité des langages fonctionnels (in French) – Scala from the point of view of IT security – 2010 paper for the Agence Nationnal de la Sécurité de SI (ANSSI) – http://www.ssi.gouv.fr/fr/anssi/publications/publications-scientifiques/autres-publicati ons/lafosec-securite-et-langages-fonctionnels.html Co-founder Lead-architect far@normation.com @fanf42 François ARMAND
  • 3. Normation – CC-BY-SA normation.com 3 De quoi va-t-on parler ? q ZeroMQ presentation q Integration with Scala q Code, code, code, code...
  • 4. Normation – CC-BY-SA normation.com 4 Scala and ZeroMQ Events beyond the JVM ZeroMQ : Ounce upon a time, the quest for the GrailMOM François ARMAND Directeur R&D - Normation far@normation.com
  • 5. Normation – CC-BY-SA normation.com 5 MOM : Grail of IT integration q Message Oriented Middleware (and Architecture) q Grails of IT integration
  • 6. Normation – CC-BY-SA normation.com 6 ZeroMQ : history and presentation q In the '90s, messaging middlewares : q Banks / trading places: q Need for hight speed Events interchange queues q 2003 : Advanced Message Queuing Protocol « Toward a commodity (message oriented) middleware » – Message orientation – Queuing – Routing (including point-to-point and publish-and-subscribe), – Reliability – Security.
  • 7. Normation – CC-BY-SA normation.com 7 From AMQP to Nano q AMQP version 1.0 : October 2011 (!!!) q AMQP : Oasis Standard : October 2012 q RabbitMQ still refuses to implements v1.0 q 2004: iMatix, initiator of the project resigned and starts ZeroMQ Hi Folks, Here at iMatix we've participated since 2004 in AMQP but today we've decided to end that. We're going to be killing support for OpenAMQ and migrating our users to ZeroMQ, which is simpler, faster, and in our view a better bet for our users. We have serious, long lived, and unaddressed concerns with the AMQP development process and today our worst predictions seem to have come true: AMQP is a game for large firms, and ignores the needs of the majority of users and vendors. For us, that means failure. q 2012: iMatix, iniator of the ZeroMQ project and starts Crossroads.io q But it's dead because... q 2013: Martin Sustrik, original author of ZeroMQ and Crossroads.io, leaves to build Nano...
  • 8. Normation – CC-BY-SA normation.com 8 From AMQP to Nano q AMQP version 1.0 : October 2011 (!!!) q AMQP : Oasis Standard : October 2012 q RabbitMQ still refuses to implements v1.0 q 2004 : iMatix, initiator of the project resigned and starts ZeroMQ Hi Folks, Here at iMatix we've participated since 2004 in AMQP but today we've decided to end that. We're going to be killing support for OpenAMQ and migrating our users to ZeroMQ, which is simpler, faster, and in our view a better bet for our users. We have serious, long lived, and unaddressed concerns with the AMQP development process and today our worst predictions seem to have come true: AMQP is a game for large firms, and ignores the needs of the majority of users and vendors. For us, that means failure. q 2012 : iMatix, iniator of the ZeroMQ project and starts crossroads.io q But that dead because... q 2013 : Martin Sustrik, original author of ZeroMQ and Crossroads.io, leaves to build Nano...
  • 9. Normation – CC-BY-SA normation.com 9 ZeroMQ Ø Not a MOM (no broker, no queues, etc)    Ø Socket library that acts as a concurrency framework.  Ø Carries messages across inproc, IPC, TCP, and multicast.  Ø Connect N-to-N via fanout, pubsub, pipeline, request-reply.  Ø Asynch I/O for scalable multicore message-passing apps.  Ø 40+ languages including C, C++, Java, .NET, Python.  Ø http://zguide.zeromq.org/
  • 10. Normation – CC-BY-SA normation.com 10 Scala and ZeroMQ Events beyond the JVM Sockets for this millenium François ARMAND Directeur R&D - Normation far@normation.com
  • 11. Normation – CC-BY-SA normation.com 11 ZeroMQ sockets q « It's sockets on steroids. It's like mailboxes with routing. It's fast! » q ZeroMQ patterns (and sockets) : q Request-reply – Connects a set of clients to a set of services. – This is a remote procedure call and task distribution pattern. q Pub-sub – Connects a set of publishers to a set of subscribers. – This is a data distribution pattern. q Pipelines – Connects nodes in a fan-out/fan-in pattern that can have multiple steps and loops. – This is a parallel task distribution and collection pattern. q Exclusive pair – Connects two sockets exclusively. – This is a pattern for connecting two threads in a process – Not to be confused with "normal" pairs of sockets.
  • 12. Normation – CC-BY-SA normation.com 12 ZeroMQ sockets q « It's sockets on steroids. It's like mailboxes with routing. It's fast! » q ZeroMQ patterns (and sockets) : q Request-reply – Connects a set of clients to a set of services. – This is a remote procedure call and task distribution pattern. q Pub-sub – Connects a set of publishers to a set of subscribers. – This is a data distribution pattern. q Pipelines – Connects nodes in a fan-out/fan-in pattern that can have multiple steps and loops. – This is a parallel task distribution and collection pattern. q Exclusive pair – Connects two sockets exclusively. – This is a pattern for connecting two threads in a process – Not to be confused with "normal" pairs of sockets.
  • 13. Normation – CC-BY-SA normation.com 13 Scala and ZeroMQ Events beyond the JVM Scala and ZeroMQ François ARMAND Directeur R&D - Normation far@normation.com
  • 14. Normation – CC-BY-SA normation.com 14 Scala and ZeroMQ q C-Scala native binding q http://zeromq.org/bindings:scala-binding q Uses JNA q Only supports libzmq v2.1 q Akka integration q Akka-zeromq module q http://doc.akka.io/docs/akka/2.2.0/scala/zeromq.html q Documentation and example are sparses
  • 15. Normation – CC-BY-SA normation.com 15 Scala and ZeroMQ - remarks q I'm still believing AKKA is Scala killer-app q It went a looooooooooooooooooong way since my last try 3 years ago q I'm believing ZeroMQ will be in all IT infrastructures soon q I'm still HATING AKKA untyped model q Next time, I'm going to try Typed Actor / Channel
  • 16. Normation – CC-BY-SA normation.com 16 Scala and ZeroMQ Events beyond the JVM Pub/Sub. Young people these days have got it easy François ARMAND Directeur R&D - Normation far@normation.com
  • 17. Normation – CC-BY-SA normation.com 17 ZeroMQ sockets : Pub / Sub q Publish / Subscribes sockets q It's just work, nothing to add
  • 18. Normation – CC-BY-SA normation.com 18 ZeroMQ sockets : Pub / Sub Code ! https://github.com/fanf/scala_zeromq/tree/master/src/main/scala/psug/zeromq/pubsub
  • 19. Normation – CC-BY-SA normation.com 19 Scala and ZeroMQ Events beyond the JVM Req/Rep. Because waiting for answer is hard. François ARMAND Directeur R&D - Normation far@normation.com
  • 20. Normation – CC-BY-SA normation.com 20 ZeroMQ sockets : Req / Rep q Request / Reply sockets q Statefull request ↔ reply cycles
  • 21. Normation – CC-BY-SA normation.com 21 ZeroMQ sockets : Req / Rep Code ! https://github.com/fanf/scala_zeromq/tree/master/src/main/scala/psug/zeromq/reqrep
  • 22. Normation – CC-BY-SA normation.com 22 Scala and ZeroMQ Events beyond the JVM Questions ? François ARMAND Directeur R&D - Normation far@normation.com