SlideShare a Scribd company logo
9/30/16 1
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: Internal
MICROSERVICES WITH SENECAJS
Trung Dang Session 2
9/30/16 2
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
Agenda – Session 2
▪ Docker
▪ AMQP / RabbitMQ: What is it?
▪ SenecaJS transportation with AMQP
▪ Multiple service instances: PM2 or Docker?
▪ Consul - Service health checker & Configuration
▪ JWT for Auth
▪ Introducing servicebase package
▪ Q/A
9/30/16 3
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
Sample source code is available at
https://github.com/immanuel192/seneca-with-rabbitmq-seminar
9/30/16 4
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: Internal
Review Session 1
9/30/16 5
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
Monolithic Application Model
1. How to scale this application to
serve more customer requests?
2. The Payments Module is taking
very long time to process the
requests. Is there any solution
with cheap cost?
9/30/16 6
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
9/30/16 7
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
Microservices with Seneca, RabbitMQ, Consul, and FeathersJS
servicebase
Database Models
Service Logic
Service B
NGINX–LoadBalancer
GatewayAPI1GatewayAPI2
RabbitMQ
Configuration Storage & Health Checker
Docker
servicebase
Database Models
Service Logic
Service A
Redis
9/30/16 8
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
Docker - https://www.docker.com/
9/30/16 9
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
AMQP & RabbitMQ. What is it?
• RabbitMQ is a messaging broker - an intermediary for messaging.
9/30/16 10
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
Service 1
RabbitMQ - How it works
Service 2
Queue
Queue
Exchange
client
Service 1
9/30/16 11
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
docker run -d 
--hostname rabbitmq-server 
-p 5672:5672 -p 15672:15672 
--name rabbitmq-server 
-e RABBITMQ_DEFAULT_USER=username -e
RABBITMQ_DEFAULT_PASS=password 
rabbitmq:management
Docker – Start RabbitMQ
9/30/16 12
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
SenecaJS Philosophy
• Pattern Matching: instead of fragile service discovery, you just let
the world know what sort of messages you are about.
• Transport Independence: you can send messages between
services in many ways, all hidden from your business logic.
9/30/16 13
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
SenecaJS – Your first microservice
let seneca = require('seneca')()
seneca.add('service:math,cmd:sum', (msg, reply) => {
reply(null, { answer: (msg.left + msg.right) })
})
seneca.act({ service: 'math', cmd: 'sum', left: 1, right: 2 },
(err, result) => {
if (err) return console.error(err)
console.log(result)
}
)
9/30/16 14
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
SenecaJS – Pattern Matching
seneca.add('service:math,cmd:sum', (msg, reply) => {
reply(null, { answer: (msg.left + msg.right) })
})
Can this service return the result as an integer only
whenever I need?
9/30/16 15
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
SenecaJS – Pattern Matching - 2
seneca.add(‘service:math,cmd:sum’, function (msg,
reply) {
if (msg.integer === true){
reply(null, { answer: (parseInt(msg.left) +
parseInt(msg.right)) })
}
else{
reply(null, { answer: (msg.left + msg.right) })
}
})
9/30/16 16
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
SenecaJS – Pattern Matching - 3
seneca.add('service:math,cmd:sum', (msg, reply) => {
reply(null, { answer: (msg.left + msg.right) })
})
seneca.add('service:math,cmd:sum,integer:true', (msg, reply) =>
{
reply(null, {
answer: ( parseInt(msg.left) +
parseInt(msg.right)
)
})
})
9/30/16 17
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
SenecaJS – Pattern Matching - Recap
• Matches against top level properties of JSON message
• Patterns are unique
• Specialised patterns win over generic patterns
• Competing patterns win based on value
9/30/16 18
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
SenecaJS – Transport
• Seneca can work with multiple transports
• Available transports: RabbitMQ, Kafka, Redis, BeansTalk, mqp,
Mesh, SQS, NSQ, ZeroMQ, NATS, Azure Service Bus, NServiceBus,
Aliyun-MNS, Google Cloud PubSub
• HTTP/TCP is supported by default
9/30/16 19
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
SenecaJS with AMQP Transport
• seneca-amqp-transport
https://github.com/seneca-contrib/seneca-amqp-transport
• It is a plugin to allow seneca listeners and clients to communicate
over AMQP
• Currently support AMQP 0.9.1
• For AMQP 1.0, please use seneca-servicebus-transport
9/30/16 20
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
SenecaJS with AMQP Transport – Server
let seneca = require('seneca')()
.use('seneca-amqp-transport')
.add('service:myService,cmd:create', function (args, done) {
console.log(`From client ${args.clientId}: ${args.i}`);
done(null, { i: args.i })
})
.listen({
type: 'amqp',
pin: 'service:myService',
url: 'amqp://username:password@rabbitmq-server:5672'
})
9/30/16 21
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
SenecaJS with AMQP Transport – Client
let clientId = 1
let args = process.argv.slice(2)
if (args.length > 0) {
clientId = args[0]
}
let client = require('seneca')().use('seneca-amqp-transport').client({
type: 'amqp',
pin: 'service:myService',
url: 'amqp://username:password@rabbitmq-server:5672'
})
let i = 0
setInterval(function() {
client.act(`service:myService,cmd:create,clientId:${clientId},i:${i}`,
function(err, ret) {
console.log('Client: received i = ' + ret.i);
});
i++;
}, 100)
9/30/16 22
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
SenecaJS with AMQP Transport – How it works
Consumer Queue
Queue
myServiceclient
Request
reply_to = my_client_id
correlation_id = abc
Reply
correlation_id = abc
Queue
Client Queue
Routing
pin = service:myService
Routing
pin = my_client_id
9/30/16 23
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: Internal
DEMO
9/30/16 24
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: Internal
TEA-BREAK
9/30/16 25
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
PM2
• Advanced process manager for production Node.js applications.
Load balancer, logs facility, startup script, micro service
management, at a glance.
• We can use pm2 to start our services with scale
pm2 start config-file.json
pm2 start your-app.js
pm2 scale app-name instance-number
9/30/16 26
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
PM2 - Sample JSON configuration
File start-service.json
{
apps: [
{
name: "myService",
script: "index.js",
watch: false,
env: {
"NODE_ENV": "development"
},
instances: 1
}
]
}
9/30/16 27
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
Docker – Run your service in multiple container
export pwd=`pwd`
docker run -d --link=rabbitmq-server -v "$pwd":/app 
mhart/alpine-node:latest node /app/server.js
docker run -d --link=rabbitmq-server -v "$pwd":/app 
mhart/alpine-node:latest node /app/client.js 1
docker run -d --link=rabbitmq-server -v "$pwd":/app 
mhart/alpine-node:latest node /app/client.js 2
9/30/16 28
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
Configuring your service
• How can we protect our configuration for production ENV?
• How can we monitor our services’s heath?
References:
• Health - Consul
https://www.consul.io/docs/agent/http/health.html
• Key / Value store - Consul
https://www.consul.io/docs/agent/http/kv.html
9/30/16 29
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
JWT for Authentication
• JWT stands for Json Web Token
• No more cookies.
• JWT has 3 parts: header.body.signature
Example:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzY290Y2guaW8iLCJleHAiOjEzMDA4MTkzODAsIm5hbWU
iOiJDaHJpcyBTZXZpbGxlamEiLCJhZG1pbiI6dHJ1ZX0.03f329983b86f7d9a9f5fef85305880101d5e302afafa20
154d094b229f75
• JWT helps to verify the sender, authorize the request, prevent man
in middle and good with CORS.
9/30/16 30
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
Introducing servicebase package
https://www.npmjs.com/package/servicebase
Features :
• Listener / Client mode, with AMQP Transport or HTTP Transport
• Promisify all functions
• Use Consul as Configuration Storage & Service Health Checker
• Support multiple database adapters. Postgresql & Sqlite are build-in supported adapters
• Use Loggly as logs monitoring service
• Support Authorization when consuming the service’s action
• Error handler: no more terminating your service because of TIMEOUT or fatal$ error
• Including test helper
• Including typed-definitions file
9/30/16 31
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: Internal
DEMO
9/30/16 32
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
Testing your services
• Use sqlite in-memory for integration test
• For unit-test: test your logic-class instead of test the function you
registered with seneca
• For integration-test with other services: use pm2 & rabbitmq
9/30/16 33
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
Microservices are the kind of SOA. Microservices must be
independently deployable, whereas SOA services are often
implemented in deployment monoliths. Classic SOA is more platform
driven, so microservices offer more choices in all dimensions.
Torsten Winterberg (Oracle ACE Director)
Microservices vs SOA
9/30/16 34
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: Internal
Q&A
Thank you very much
9/30/16 35
CLICK TO EDIT MASTER TITLE STYLE
Security Classification: InternalSecurity Classification: Internal
Stateful / Stateless & Authorization
• Stateful means that there is memory of the past. Previous
transactions are remembered and may affect the current
transaction.
• Stateless means there is no memory of the past. Every transaction
is performed as if it were being done for the very first time.
• In Stateless service, we use JWT (Json Web Token) for
Authentication. No more Cookies.
• Authorization will be done by each service regarding to the
authenticated user.

More Related Content

What's hot

Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJS
Hüseyin BABAL
 
Introducing Vault
Introducing VaultIntroducing Vault
Introducing Vault
Ramit Surana
 
Node js training (1)
Node js training (1)Node js training (1)
Node js training (1)
Ashish Gupta
 
Building microservices with vert.x 3.0
Building microservices with vert.x 3.0Building microservices with vert.x 3.0
Building microservices with vert.x 3.0
Agraj Mangal
 
Building a production ready meteor app
Building a production ready meteor appBuilding a production ready meteor app
Building a production ready meteor app
Ritik Malhotra
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)
Michele Orselli
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azure
Colin Mackay
 
Immutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and JenkinsImmutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and Jenkins
Manish Pandit
 
Nodejs - Building a RESTful API
Nodejs - Building a RESTful APINodejs - Building a RESTful API
Nodejs - Building a RESTful API
Sang Cù
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
Michael Bahr
 
Building Better Backdoors with WMI - DerbyCon 2017
Building Better Backdoors with WMI - DerbyCon 2017Building Better Backdoors with WMI - DerbyCon 2017
Building Better Backdoors with WMI - DerbyCon 2017
Alexander Polce Leary
 
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Chickens & Eggs: Managing secrets in AWS with Hashicorp VaultChickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Jeff Horwitz
 
Flask jwt authentication tutorial
Flask jwt authentication tutorialFlask jwt authentication tutorial
Flask jwt authentication tutorial
Katy Slemon
 
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
NAVER D2
 
Introduction to vSphere APIs Using pyVmomi
Introduction to vSphere APIs Using pyVmomiIntroduction to vSphere APIs Using pyVmomi
Introduction to vSphere APIs Using pyVmomi
Michael Rice
 
Using Vault to decouple MySQL Secrets
Using Vault to decouple MySQL SecretsUsing Vault to decouple MySQL Secrets
Using Vault to decouple MySQL Secrets
Derek Downey
 
Building Bizweb Microservices with Docker
Building Bizweb Microservices with DockerBuilding Bizweb Microservices with Docker
Building Bizweb Microservices with Docker
Khôi Nguyễn Minh
 
Owin and Katana
Owin and KatanaOwin and Katana
Owin and Katana
Ugo Lattanzi
 
Introduction to node.js by jiban
Introduction to node.js by jibanIntroduction to node.js by jiban
Introduction to node.js by jiban
Jibanananda Sana
 
Sails.js Intro
Sails.js IntroSails.js Intro
Sails.js Intro
Nicholas Jansma
 

What's hot (20)

Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJS
 
Introducing Vault
Introducing VaultIntroducing Vault
Introducing Vault
 
Node js training (1)
Node js training (1)Node js training (1)
Node js training (1)
 
Building microservices with vert.x 3.0
Building microservices with vert.x 3.0Building microservices with vert.x 3.0
Building microservices with vert.x 3.0
 
Building a production ready meteor app
Building a production ready meteor appBuilding a production ready meteor app
Building a production ready meteor app
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azure
 
Immutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and JenkinsImmutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and Jenkins
 
Nodejs - Building a RESTful API
Nodejs - Building a RESTful APINodejs - Building a RESTful API
Nodejs - Building a RESTful API
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
 
Building Better Backdoors with WMI - DerbyCon 2017
Building Better Backdoors with WMI - DerbyCon 2017Building Better Backdoors with WMI - DerbyCon 2017
Building Better Backdoors with WMI - DerbyCon 2017
 
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Chickens & Eggs: Managing secrets in AWS with Hashicorp VaultChickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
 
Flask jwt authentication tutorial
Flask jwt authentication tutorialFlask jwt authentication tutorial
Flask jwt authentication tutorial
 
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
 
Introduction to vSphere APIs Using pyVmomi
Introduction to vSphere APIs Using pyVmomiIntroduction to vSphere APIs Using pyVmomi
Introduction to vSphere APIs Using pyVmomi
 
Using Vault to decouple MySQL Secrets
Using Vault to decouple MySQL SecretsUsing Vault to decouple MySQL Secrets
Using Vault to decouple MySQL Secrets
 
Building Bizweb Microservices with Docker
Building Bizweb Microservices with DockerBuilding Bizweb Microservices with Docker
Building Bizweb Microservices with Docker
 
Owin and Katana
Owin and KatanaOwin and Katana
Owin and Katana
 
Introduction to node.js by jiban
Introduction to node.js by jibanIntroduction to node.js by jiban
Introduction to node.js by jiban
 
Sails.js Intro
Sails.js IntroSails.js Intro
Sails.js Intro
 

Viewers also liked

Latest Meteor JS News
Latest Meteor JS NewsLatest Meteor JS News
Latest Meteor JS News
Designveloper
 
Meet song nhi your virtual financial assistance
Meet song nhi   your virtual financial assistanceMeet song nhi   your virtual financial assistance
Meet song nhi your virtual financial assistance
Designveloper
 
Rapid Digital Innovation: How Node.js Delivers
Rapid Digital Innovation: How Node.js DeliversRapid Digital Innovation: How Node.js Delivers
Rapid Digital Innovation: How Node.js Delivers
Richard Rodger
 
How microservices fail, and what to do about it
How microservices fail, and what to do about itHow microservices fail, and what to do about it
How microservices fail, and what to do about it
Richard Rodger
 
Unity3D With Meteor
Unity3D With MeteorUnity3D With Meteor
Unity3D With Meteor
Designveloper
 
Richard rodger technical debt - web summit 2013
Richard rodger   technical debt - web summit 2013Richard rodger   technical debt - web summit 2013
Richard rodger technical debt - web summit 2013
Richard Rodger
 
Introducción a microservicios
Introducción a microserviciosIntroducción a microservicios
Introducción a microservicios
Erasmo Domínguez Jiménez
 
Multi tenancy - Wining formula for a PaaS
Multi tenancy - Wining formula for a PaaSMulti tenancy - Wining formula for a PaaS
Multi tenancy - Wining formula for a PaaS
WSO2
 
The Seneca Pattern at EngineYard Distill 2013 Conference
The Seneca Pattern at EngineYard Distill 2013 ConferenceThe Seneca Pattern at EngineYard Distill 2013 Conference
The Seneca Pattern at EngineYard Distill 2013 Conference
Richard Rodger
 
Building a Multi-tenanted SaaS with Node.js
Building a Multi-tenanted SaaS with Node.jsBuilding a Multi-tenanted SaaS with Node.js
Building a Multi-tenanted SaaS with Node.js
Eoin Shanaghy
 
Integrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQIntegrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQ
Gavin Roy
 
Bizweb Microservices Architecture
Bizweb Microservices ArchitectureBizweb Microservices Architecture
Bizweb Microservices Architecture
Khôi Nguyễn Minh
 
ITLC HN 14 - Bizweb Microservices Architecture
ITLC HN 14  - Bizweb Microservices ArchitectureITLC HN 14  - Bizweb Microservices Architecture
ITLC HN 14 - Bizweb Microservices Architecture
IT Expert Club
 
Distributed Transaction in Microservice
Distributed Transaction in MicroserviceDistributed Transaction in Microservice
Distributed Transaction in Microservice
Nghia Minh
 
JSX Design Overview (日本語)
JSX Design Overview (日本語)JSX Design Overview (日本語)
JSX Design Overview (日本語)Kazuho Oku
 
JSX
JSXJSX

Viewers also liked (16)

Latest Meteor JS News
Latest Meteor JS NewsLatest Meteor JS News
Latest Meteor JS News
 
Meet song nhi your virtual financial assistance
Meet song nhi   your virtual financial assistanceMeet song nhi   your virtual financial assistance
Meet song nhi your virtual financial assistance
 
Rapid Digital Innovation: How Node.js Delivers
Rapid Digital Innovation: How Node.js DeliversRapid Digital Innovation: How Node.js Delivers
Rapid Digital Innovation: How Node.js Delivers
 
How microservices fail, and what to do about it
How microservices fail, and what to do about itHow microservices fail, and what to do about it
How microservices fail, and what to do about it
 
Unity3D With Meteor
Unity3D With MeteorUnity3D With Meteor
Unity3D With Meteor
 
Richard rodger technical debt - web summit 2013
Richard rodger   technical debt - web summit 2013Richard rodger   technical debt - web summit 2013
Richard rodger technical debt - web summit 2013
 
Introducción a microservicios
Introducción a microserviciosIntroducción a microservicios
Introducción a microservicios
 
Multi tenancy - Wining formula for a PaaS
Multi tenancy - Wining formula for a PaaSMulti tenancy - Wining formula for a PaaS
Multi tenancy - Wining formula for a PaaS
 
The Seneca Pattern at EngineYard Distill 2013 Conference
The Seneca Pattern at EngineYard Distill 2013 ConferenceThe Seneca Pattern at EngineYard Distill 2013 Conference
The Seneca Pattern at EngineYard Distill 2013 Conference
 
Building a Multi-tenanted SaaS with Node.js
Building a Multi-tenanted SaaS with Node.jsBuilding a Multi-tenanted SaaS with Node.js
Building a Multi-tenanted SaaS with Node.js
 
Integrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQIntegrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQ
 
Bizweb Microservices Architecture
Bizweb Microservices ArchitectureBizweb Microservices Architecture
Bizweb Microservices Architecture
 
ITLC HN 14 - Bizweb Microservices Architecture
ITLC HN 14  - Bizweb Microservices ArchitectureITLC HN 14  - Bizweb Microservices Architecture
ITLC HN 14 - Bizweb Microservices Architecture
 
Distributed Transaction in Microservice
Distributed Transaction in MicroserviceDistributed Transaction in Microservice
Distributed Transaction in Microservice
 
JSX Design Overview (日本語)
JSX Design Overview (日本語)JSX Design Overview (日本語)
JSX Design Overview (日本語)
 
JSX
JSXJSX
JSX
 

Similar to Microservices with SenecaJS (part 2)

Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy
Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy
Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy
Jeffrey Holden
 
GumGum: Multi-Region Cassandra in AWS
GumGum: Multi-Region Cassandra in AWSGumGum: Multi-Region Cassandra in AWS
GumGum: Multi-Region Cassandra in AWS
DataStax Academy
 
Unleash software architecture leveraging on docker
Unleash software architecture leveraging on dockerUnleash software architecture leveraging on docker
Unleash software architecture leveraging on docker
Adrien Blind
 
NetDevOps for the Network Dude: How to get started with API's, Ansible and Py...
NetDevOps for the Network Dude: How to get started with API's, Ansible and Py...NetDevOps for the Network Dude: How to get started with API's, Ansible and Py...
NetDevOps for the Network Dude: How to get started with API's, Ansible and Py...
Cisco DevNet
 
Cloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesCloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit Kubernetes
QAware GmbH
 
How Zalando runs Kubernetes clusters at scale on AWS - AWS re:Invent
How Zalando runs Kubernetes clusters at scale on AWS - AWS re:InventHow Zalando runs Kubernetes clusters at scale on AWS - AWS re:Invent
How Zalando runs Kubernetes clusters at scale on AWS - AWS re:Invent
Henning Jacobs
 
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
Amazon Web Services
 
2014 Security Onion Conference
2014 Security Onion Conference2014 Security Onion Conference
2014 Security Onion Conference
DefensiveDepth
 
Using the Azure Container Service in your company
Using the Azure Container Service in your companyUsing the Azure Container Service in your company
Using the Azure Container Service in your company
Jan de Vries
 
Zero-downtime deployment of Micro-services with Kubernetes
Zero-downtime deployment of Micro-services with KubernetesZero-downtime deployment of Micro-services with Kubernetes
Zero-downtime deployment of Micro-services with Kubernetes
Wojciech Barczyński
 
Canary deployment with Traefik and K3S
Canary deployment with Traefik and K3SCanary deployment with Traefik and K3S
Canary deployment with Traefik and K3S
Jakub Hajek
 
Aad Versteden | State-of-the-art web applications fuelled by Linked Data awar...
Aad Versteden | State-of-the-art web applications fuelled by Linked Data awar...Aad Versteden | State-of-the-art web applications fuelled by Linked Data awar...
Aad Versteden | State-of-the-art web applications fuelled by Linked Data awar...
semanticsconference
 
Configuring cisco site to site ip sec vpn with dynamic ip endpoint cisco routers
Configuring cisco site to site ip sec vpn with dynamic ip endpoint cisco routersConfiguring cisco site to site ip sec vpn with dynamic ip endpoint cisco routers
Configuring cisco site to site ip sec vpn with dynamic ip endpoint cisco routers
phosika sithisane
 
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel AvivSelf Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Amazon Web Services
 
Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...
Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...
Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...
Davide Benvegnù
 
SDN and Security: A Marriage Made in Heaven. Or Not.
SDN and Security: A Marriage Made in Heaven. Or Not.SDN and Security: A Marriage Made in Heaven. Or Not.
SDN and Security: A Marriage Made in Heaven. Or Not.
Priyanka Aash
 
AWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and JavaAWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and Java
Manish Pandit
 
NCS: NEtwork Control System Hands-on Labs
NCS:  NEtwork Control System Hands-on Labs NCS:  NEtwork Control System Hands-on Labs
NCS: NEtwork Control System Hands-on Labs
Cisco Canada
 
Jacopo Nardiello - Monitoring Cloud-Native applications with Prometheus - Cod...
Jacopo Nardiello - Monitoring Cloud-Native applications with Prometheus - Cod...Jacopo Nardiello - Monitoring Cloud-Native applications with Prometheus - Cod...
Jacopo Nardiello - Monitoring Cloud-Native applications with Prometheus - Cod...
Codemotion
 
NodeJS : Communication and Round Robin Way
NodeJS : Communication and Round Robin WayNodeJS : Communication and Round Robin Way
NodeJS : Communication and Round Robin Way
Edureka!
 

Similar to Microservices with SenecaJS (part 2) (20)

Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy
Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy
Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy
 
GumGum: Multi-Region Cassandra in AWS
GumGum: Multi-Region Cassandra in AWSGumGum: Multi-Region Cassandra in AWS
GumGum: Multi-Region Cassandra in AWS
 
Unleash software architecture leveraging on docker
Unleash software architecture leveraging on dockerUnleash software architecture leveraging on docker
Unleash software architecture leveraging on docker
 
NetDevOps for the Network Dude: How to get started with API's, Ansible and Py...
NetDevOps for the Network Dude: How to get started with API's, Ansible and Py...NetDevOps for the Network Dude: How to get started with API's, Ansible and Py...
NetDevOps for the Network Dude: How to get started with API's, Ansible and Py...
 
Cloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesCloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit Kubernetes
 
How Zalando runs Kubernetes clusters at scale on AWS - AWS re:Invent
How Zalando runs Kubernetes clusters at scale on AWS - AWS re:InventHow Zalando runs Kubernetes clusters at scale on AWS - AWS re:Invent
How Zalando runs Kubernetes clusters at scale on AWS - AWS re:Invent
 
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
 
2014 Security Onion Conference
2014 Security Onion Conference2014 Security Onion Conference
2014 Security Onion Conference
 
Using the Azure Container Service in your company
Using the Azure Container Service in your companyUsing the Azure Container Service in your company
Using the Azure Container Service in your company
 
Zero-downtime deployment of Micro-services with Kubernetes
Zero-downtime deployment of Micro-services with KubernetesZero-downtime deployment of Micro-services with Kubernetes
Zero-downtime deployment of Micro-services with Kubernetes
 
Canary deployment with Traefik and K3S
Canary deployment with Traefik and K3SCanary deployment with Traefik and K3S
Canary deployment with Traefik and K3S
 
Aad Versteden | State-of-the-art web applications fuelled by Linked Data awar...
Aad Versteden | State-of-the-art web applications fuelled by Linked Data awar...Aad Versteden | State-of-the-art web applications fuelled by Linked Data awar...
Aad Versteden | State-of-the-art web applications fuelled by Linked Data awar...
 
Configuring cisco site to site ip sec vpn with dynamic ip endpoint cisco routers
Configuring cisco site to site ip sec vpn with dynamic ip endpoint cisco routersConfiguring cisco site to site ip sec vpn with dynamic ip endpoint cisco routers
Configuring cisco site to site ip sec vpn with dynamic ip endpoint cisco routers
 
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel AvivSelf Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
 
Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...
Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...
Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...
 
SDN and Security: A Marriage Made in Heaven. Or Not.
SDN and Security: A Marriage Made in Heaven. Or Not.SDN and Security: A Marriage Made in Heaven. Or Not.
SDN and Security: A Marriage Made in Heaven. Or Not.
 
AWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and JavaAWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and Java
 
NCS: NEtwork Control System Hands-on Labs
NCS:  NEtwork Control System Hands-on Labs NCS:  NEtwork Control System Hands-on Labs
NCS: NEtwork Control System Hands-on Labs
 
Jacopo Nardiello - Monitoring Cloud-Native applications with Prometheus - Cod...
Jacopo Nardiello - Monitoring Cloud-Native applications with Prometheus - Cod...Jacopo Nardiello - Monitoring Cloud-Native applications with Prometheus - Cod...
Jacopo Nardiello - Monitoring Cloud-Native applications with Prometheus - Cod...
 
NodeJS : Communication and Round Robin Way
NodeJS : Communication and Round Robin WayNodeJS : Communication and Round Robin Way
NodeJS : Communication and Round Robin Way
 

More from Designveloper

Let us take care of your brand image
Let us take care of your brand imageLet us take care of your brand image
Let us take care of your brand image
Designveloper
 
5 java script frameworks to watch in 2017
5 java script frameworks to watch in 20175 java script frameworks to watch in 2017
5 java script frameworks to watch in 2017
Designveloper
 
Happy international women's day!
Happy international women's day!Happy international women's day!
Happy international women's day!
Designveloper
 
Typing racer game - a nice break from work
Typing racer game  - a nice break from workTyping racer game  - a nice break from work
Typing racer game - a nice break from work
Designveloper
 
Should we work remotely?
Should we work remotely?Should we work remotely?
Should we work remotely?
Designveloper
 
Why pair programming is a good idea
Why pair programming is a good idea Why pair programming is a good idea
Why pair programming is a good idea
Designveloper
 
5 worst mistakes of diy websites
5 worst mistakes of diy websites5 worst mistakes of diy websites
5 worst mistakes of diy websites
Designveloper
 
Basic glossary of web design terms for non designers (part 2)
Basic glossary of web design terms for non designers (part 2)Basic glossary of web design terms for non designers (part 2)
Basic glossary of web design terms for non designers (part 2)
Designveloper
 
Single page web application development using meteor js
Single page web application development using meteor jsSingle page web application development using meteor js
Single page web application development using meteor js
Designveloper
 
Multiplayer game with unity3 d and meteor
Multiplayer game with unity3 d and meteorMultiplayer game with unity3 d and meteor
Multiplayer game with unity3 d and meteor
Designveloper
 
Awesome free resources for learning javascript
Awesome free resources for learning javascriptAwesome free resources for learning javascript
Awesome free resources for learning javascript
Designveloper
 
What is the best java script frameworks to learn?
What is the best java script frameworks to learn?What is the best java script frameworks to learn?
What is the best java script frameworks to learn?
Designveloper
 
Travelling forms a young man
Travelling forms a young manTravelling forms a young man
Travelling forms a young man
Designveloper
 
5 compelling reasons your website should be responsive
5 compelling reasons your website should be responsive5 compelling reasons your website should be responsive
5 compelling reasons your website should be responsive
Designveloper
 
Reactive programming with tracker
Reactive programming with trackerReactive programming with tracker
Reactive programming with tracker
Designveloper
 
Benefits of using single page websites
Benefits of using single page websitesBenefits of using single page websites
Benefits of using single page websites
Designveloper
 
What is the best programming language for beginner?
What is the best programming language for beginner?What is the best programming language for beginner?
What is the best programming language for beginner?
Designveloper
 
No sql injection in meteor.js application
No sql injection in meteor.js applicationNo sql injection in meteor.js application
No sql injection in meteor.js application
Designveloper
 
How to deploy and scale your meteor apps
How to deploy and scale your meteor appsHow to deploy and scale your meteor apps
How to deploy and scale your meteor apps
Designveloper
 
Meetup groups you need to join if you are new to tech
Meetup groups you need to join if you are new to techMeetup groups you need to join if you are new to tech
Meetup groups you need to join if you are new to tech
Designveloper
 

More from Designveloper (20)

Let us take care of your brand image
Let us take care of your brand imageLet us take care of your brand image
Let us take care of your brand image
 
5 java script frameworks to watch in 2017
5 java script frameworks to watch in 20175 java script frameworks to watch in 2017
5 java script frameworks to watch in 2017
 
Happy international women's day!
Happy international women's day!Happy international women's day!
Happy international women's day!
 
Typing racer game - a nice break from work
Typing racer game  - a nice break from workTyping racer game  - a nice break from work
Typing racer game - a nice break from work
 
Should we work remotely?
Should we work remotely?Should we work remotely?
Should we work remotely?
 
Why pair programming is a good idea
Why pair programming is a good idea Why pair programming is a good idea
Why pair programming is a good idea
 
5 worst mistakes of diy websites
5 worst mistakes of diy websites5 worst mistakes of diy websites
5 worst mistakes of diy websites
 
Basic glossary of web design terms for non designers (part 2)
Basic glossary of web design terms for non designers (part 2)Basic glossary of web design terms for non designers (part 2)
Basic glossary of web design terms for non designers (part 2)
 
Single page web application development using meteor js
Single page web application development using meteor jsSingle page web application development using meteor js
Single page web application development using meteor js
 
Multiplayer game with unity3 d and meteor
Multiplayer game with unity3 d and meteorMultiplayer game with unity3 d and meteor
Multiplayer game with unity3 d and meteor
 
Awesome free resources for learning javascript
Awesome free resources for learning javascriptAwesome free resources for learning javascript
Awesome free resources for learning javascript
 
What is the best java script frameworks to learn?
What is the best java script frameworks to learn?What is the best java script frameworks to learn?
What is the best java script frameworks to learn?
 
Travelling forms a young man
Travelling forms a young manTravelling forms a young man
Travelling forms a young man
 
5 compelling reasons your website should be responsive
5 compelling reasons your website should be responsive5 compelling reasons your website should be responsive
5 compelling reasons your website should be responsive
 
Reactive programming with tracker
Reactive programming with trackerReactive programming with tracker
Reactive programming with tracker
 
Benefits of using single page websites
Benefits of using single page websitesBenefits of using single page websites
Benefits of using single page websites
 
What is the best programming language for beginner?
What is the best programming language for beginner?What is the best programming language for beginner?
What is the best programming language for beginner?
 
No sql injection in meteor.js application
No sql injection in meteor.js applicationNo sql injection in meteor.js application
No sql injection in meteor.js application
 
How to deploy and scale your meteor apps
How to deploy and scale your meteor appsHow to deploy and scale your meteor apps
How to deploy and scale your meteor apps
 
Meetup groups you need to join if you are new to tech
Meetup groups you need to join if you are new to techMeetup groups you need to join if you are new to tech
Meetup groups you need to join if you are new to tech
 

Recently uploaded

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 

Recently uploaded (20)

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 

Microservices with SenecaJS (part 2)

  • 1. 9/30/16 1 CLICK TO EDIT MASTER TITLE STYLE Security Classification: Internal MICROSERVICES WITH SENECAJS Trung Dang Session 2
  • 2. 9/30/16 2 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal Agenda – Session 2 ▪ Docker ▪ AMQP / RabbitMQ: What is it? ▪ SenecaJS transportation with AMQP ▪ Multiple service instances: PM2 or Docker? ▪ Consul - Service health checker & Configuration ▪ JWT for Auth ▪ Introducing servicebase package ▪ Q/A
  • 3. 9/30/16 3 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal Sample source code is available at https://github.com/immanuel192/seneca-with-rabbitmq-seminar
  • 4. 9/30/16 4 CLICK TO EDIT MASTER TITLE STYLE Security Classification: Internal Review Session 1
  • 5. 9/30/16 5 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal Monolithic Application Model 1. How to scale this application to serve more customer requests? 2. The Payments Module is taking very long time to process the requests. Is there any solution with cheap cost?
  • 6. 9/30/16 6 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal
  • 7. 9/30/16 7 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal Microservices with Seneca, RabbitMQ, Consul, and FeathersJS servicebase Database Models Service Logic Service B NGINX–LoadBalancer GatewayAPI1GatewayAPI2 RabbitMQ Configuration Storage & Health Checker Docker servicebase Database Models Service Logic Service A Redis
  • 8. 9/30/16 8 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal Docker - https://www.docker.com/
  • 9. 9/30/16 9 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal AMQP & RabbitMQ. What is it? • RabbitMQ is a messaging broker - an intermediary for messaging.
  • 10. 9/30/16 10 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal Service 1 RabbitMQ - How it works Service 2 Queue Queue Exchange client Service 1
  • 11. 9/30/16 11 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal docker run -d --hostname rabbitmq-server -p 5672:5672 -p 15672:15672 --name rabbitmq-server -e RABBITMQ_DEFAULT_USER=username -e RABBITMQ_DEFAULT_PASS=password rabbitmq:management Docker – Start RabbitMQ
  • 12. 9/30/16 12 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal SenecaJS Philosophy • Pattern Matching: instead of fragile service discovery, you just let the world know what sort of messages you are about. • Transport Independence: you can send messages between services in many ways, all hidden from your business logic.
  • 13. 9/30/16 13 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal SenecaJS – Your first microservice let seneca = require('seneca')() seneca.add('service:math,cmd:sum', (msg, reply) => { reply(null, { answer: (msg.left + msg.right) }) }) seneca.act({ service: 'math', cmd: 'sum', left: 1, right: 2 }, (err, result) => { if (err) return console.error(err) console.log(result) } )
  • 14. 9/30/16 14 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal SenecaJS – Pattern Matching seneca.add('service:math,cmd:sum', (msg, reply) => { reply(null, { answer: (msg.left + msg.right) }) }) Can this service return the result as an integer only whenever I need?
  • 15. 9/30/16 15 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal SenecaJS – Pattern Matching - 2 seneca.add(‘service:math,cmd:sum’, function (msg, reply) { if (msg.integer === true){ reply(null, { answer: (parseInt(msg.left) + parseInt(msg.right)) }) } else{ reply(null, { answer: (msg.left + msg.right) }) } })
  • 16. 9/30/16 16 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal SenecaJS – Pattern Matching - 3 seneca.add('service:math,cmd:sum', (msg, reply) => { reply(null, { answer: (msg.left + msg.right) }) }) seneca.add('service:math,cmd:sum,integer:true', (msg, reply) => { reply(null, { answer: ( parseInt(msg.left) + parseInt(msg.right) ) }) })
  • 17. 9/30/16 17 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal SenecaJS – Pattern Matching - Recap • Matches against top level properties of JSON message • Patterns are unique • Specialised patterns win over generic patterns • Competing patterns win based on value
  • 18. 9/30/16 18 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal SenecaJS – Transport • Seneca can work with multiple transports • Available transports: RabbitMQ, Kafka, Redis, BeansTalk, mqp, Mesh, SQS, NSQ, ZeroMQ, NATS, Azure Service Bus, NServiceBus, Aliyun-MNS, Google Cloud PubSub • HTTP/TCP is supported by default
  • 19. 9/30/16 19 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal SenecaJS with AMQP Transport • seneca-amqp-transport https://github.com/seneca-contrib/seneca-amqp-transport • It is a plugin to allow seneca listeners and clients to communicate over AMQP • Currently support AMQP 0.9.1 • For AMQP 1.0, please use seneca-servicebus-transport
  • 20. 9/30/16 20 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal SenecaJS with AMQP Transport – Server let seneca = require('seneca')() .use('seneca-amqp-transport') .add('service:myService,cmd:create', function (args, done) { console.log(`From client ${args.clientId}: ${args.i}`); done(null, { i: args.i }) }) .listen({ type: 'amqp', pin: 'service:myService', url: 'amqp://username:password@rabbitmq-server:5672' })
  • 21. 9/30/16 21 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal SenecaJS with AMQP Transport – Client let clientId = 1 let args = process.argv.slice(2) if (args.length > 0) { clientId = args[0] } let client = require('seneca')().use('seneca-amqp-transport').client({ type: 'amqp', pin: 'service:myService', url: 'amqp://username:password@rabbitmq-server:5672' }) let i = 0 setInterval(function() { client.act(`service:myService,cmd:create,clientId:${clientId},i:${i}`, function(err, ret) { console.log('Client: received i = ' + ret.i); }); i++; }, 100)
  • 22. 9/30/16 22 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal SenecaJS with AMQP Transport – How it works Consumer Queue Queue myServiceclient Request reply_to = my_client_id correlation_id = abc Reply correlation_id = abc Queue Client Queue Routing pin = service:myService Routing pin = my_client_id
  • 23. 9/30/16 23 CLICK TO EDIT MASTER TITLE STYLE Security Classification: Internal DEMO
  • 24. 9/30/16 24 CLICK TO EDIT MASTER TITLE STYLE Security Classification: Internal TEA-BREAK
  • 25. 9/30/16 25 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal PM2 • Advanced process manager for production Node.js applications. Load balancer, logs facility, startup script, micro service management, at a glance. • We can use pm2 to start our services with scale pm2 start config-file.json pm2 start your-app.js pm2 scale app-name instance-number
  • 26. 9/30/16 26 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal PM2 - Sample JSON configuration File start-service.json { apps: [ { name: "myService", script: "index.js", watch: false, env: { "NODE_ENV": "development" }, instances: 1 } ] }
  • 27. 9/30/16 27 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal Docker – Run your service in multiple container export pwd=`pwd` docker run -d --link=rabbitmq-server -v "$pwd":/app mhart/alpine-node:latest node /app/server.js docker run -d --link=rabbitmq-server -v "$pwd":/app mhart/alpine-node:latest node /app/client.js 1 docker run -d --link=rabbitmq-server -v "$pwd":/app mhart/alpine-node:latest node /app/client.js 2
  • 28. 9/30/16 28 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal Configuring your service • How can we protect our configuration for production ENV? • How can we monitor our services’s heath? References: • Health - Consul https://www.consul.io/docs/agent/http/health.html • Key / Value store - Consul https://www.consul.io/docs/agent/http/kv.html
  • 29. 9/30/16 29 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal JWT for Authentication • JWT stands for Json Web Token • No more cookies. • JWT has 3 parts: header.body.signature Example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzY290Y2guaW8iLCJleHAiOjEzMDA4MTkzODAsIm5hbWU iOiJDaHJpcyBTZXZpbGxlamEiLCJhZG1pbiI6dHJ1ZX0.03f329983b86f7d9a9f5fef85305880101d5e302afafa20 154d094b229f75 • JWT helps to verify the sender, authorize the request, prevent man in middle and good with CORS.
  • 30. 9/30/16 30 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal Introducing servicebase package https://www.npmjs.com/package/servicebase Features : • Listener / Client mode, with AMQP Transport or HTTP Transport • Promisify all functions • Use Consul as Configuration Storage & Service Health Checker • Support multiple database adapters. Postgresql & Sqlite are build-in supported adapters • Use Loggly as logs monitoring service • Support Authorization when consuming the service’s action • Error handler: no more terminating your service because of TIMEOUT or fatal$ error • Including test helper • Including typed-definitions file
  • 31. 9/30/16 31 CLICK TO EDIT MASTER TITLE STYLE Security Classification: Internal DEMO
  • 32. 9/30/16 32 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal Testing your services • Use sqlite in-memory for integration test • For unit-test: test your logic-class instead of test the function you registered with seneca • For integration-test with other services: use pm2 & rabbitmq
  • 33. 9/30/16 33 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal Microservices are the kind of SOA. Microservices must be independently deployable, whereas SOA services are often implemented in deployment monoliths. Classic SOA is more platform driven, so microservices offer more choices in all dimensions. Torsten Winterberg (Oracle ACE Director) Microservices vs SOA
  • 34. 9/30/16 34 CLICK TO EDIT MASTER TITLE STYLE Security Classification: Internal Q&A Thank you very much
  • 35. 9/30/16 35 CLICK TO EDIT MASTER TITLE STYLE Security Classification: InternalSecurity Classification: Internal Stateful / Stateless & Authorization • Stateful means that there is memory of the past. Previous transactions are remembered and may affect the current transaction. • Stateless means there is no memory of the past. Every transaction is performed as if it were being done for the very first time. • In Stateless service, we use JWT (Json Web Token) for Authentication. No more Cookies. • Authorization will be done by each service regarding to the authenticated user.