SlideShare a Scribd company logo
Advanced Clojure Microservices
Tobias Bayer Hamburg, 30.09.2016
Clojure, Java, Cloud
tobias.bayer@inovex.de
https://github.com/tobiasbayer
2
Tobias Bayer
Senior Developer / Software Architect
inovex GmbH
3
(defroutes app
(GET "/messages/:name" [name] {:body {:message (str "Hello World" " " name)}})
(route/resources "/")
(route/not-found "Not Found"))
(defn -main [& args]
(run-jetty app {:port 3000 :join? false }))
Microservices with Clojure is easy!
4
~ 20 Microservices
High Availability
Polyglot
About 30% of services in Clojure
Running on AWS
5
Project
6
Resource Modeling
Fault Tolerance
Monitoring and Metrics
Cloudability
...
Real World Problems
7
Resource Modeling with Liberator
8
Resource Modeling with Liberator
9
Decisions
Resource Modeling with Liberator
10
Actions
Resource Modeling with Liberator
11
Handlers
Resource Modeling with Liberator
12
Resource Modeling with Liberator
(defroutes app
(ANY "/api/users" [] r/users)
(ANY "/api/users/:userhandle" [userhandle] (r/user userhandle))
(ANY "/api/authentication" [] r/authentication))
13
Resource Modeling with Liberator
(defresource users
:available-media-types ["application/user-v1+json"]
:allowed-methods [:post]
:malformed? (fn [ctx] (s/validate-user (body ctx)))
:handle-malformed (fn [ctx] (ring-response {:status 400
:body
{:message (str (s/validate-user (body ctx)))})}))
:post! (fn [ctx] (if (user-exists? (body ctx))
{:conflict true}
{:created-entity (create-user (body ctx))}))
:handle-created (fn [ctx] (if (:conflict ctx)
(ring-response {:status 409})
(r/user-output (:created-entity ctx)))))
Circuit Breaker
Netflix
hystrix-clj
clj-http-hystrix
14
Fault Tolerance with Hystrix
(h/add-hook {:hystrix/timeout-ms (:HYSTRIX_TIMEOUT config/settings)
:hystrix/threads (:HYSTRIX_THREADS config/settings)})
15
Fault Tolerance with Hystrix
(defn search-customer [param]
(client/get
(str api-endpoint "/customers?search=" param)
{:content-type :json
:as :json
:hystrix/group-key "customers"
:hystrix/fallback-fn (constantly {:body {:name "Not" :firstname "Found"}})}))
16
Metrics with Prometheus
17
Metrics with Prometheus
18
Metrics with Prometheus
(defroutes app
;; ...
(ANY "/internal/metrics" []
(prometheus/dump-metrics (:registry @metrics/metrics-store))))
(def handler
(-> app
; ...
(prometheus/instrument-handler "" (:registry @metrics/metrics-store))))
19
Metrics with Prometheus
prometheus-clj
(defonce metrics-store (atom (prometheus/init-defaults)))
(defn- register-metrics []
(-> @metrics-store
(prometheus/register-gauge "users" "users_count" "Number of users in DB" ["users_count"])
(prometheus/register-gauge "users" "users_disabled" "Number of disabled users in DB"
["users_disabled"])
(prometheus/register-counter "users" "cache_hits"
"Number of cache hits when requesting a customer" ["cache_hits"])
(prometheus/register-counter "users" "cache_misses"
"Number of cache misses when requesting a customer" ["cache_misses"])))
(defn init []
(reset! metrics-store (register-metrics))
(HystrixPrometheusMetricsPublisher/register (:registry @metrics-store)))
20
Metrics with Prometheus
(defn update-metrics []
(prometheus/set-gauge @metrics-store "users" "users_count" (p/count-users) ["users_count"])
(prometheus/set-gauge @metrics-store "users" "users_disabled"
(p/count-users {:enabled false}) ["users_disabled"]))
(defn inc-cache-hits []
(prometheus/increase-counter @metrics-store "users" "cache_hits" ["cache_hits"] 1))
(defn inc-cache-misses []
(prometheus/increase-counter @metrics-store "users" "cache_misses" ["cache_misses"] 1))
21
Metrics with Prometheus
(defn process-event [event]
(when (= (:eventType event) "SubscriptionChanged")
(log/info "Received event" event)
(handle-subscription-changed-event event)))
(defn start-worker! [fn-processor]
(kinesis/worker! :app (:APP_NAME config/settings)
:stream (:EVENT_STREAM config/settings)
:endpoint (:KINESIS_ENDPOINT config/settings)
:region-name (:AWS_REGION config/settings)
:processor (fn [records]
(doseq [record records]
(process-record record fn-processor)))))
22
Cloudability with Amazonica
AWS Kinesis
23
jobs@inovex.de
www.inovex.de/jobs
+49 721 619 021 50
Wir suchen Verstärkung in den Bereichen
• Digital Consulting
• Web Frontend & Backend
• Replatforming
• Apps & Smart Devices
• Big Data
• Data Science
• Search
• Business Intelligence
• DevOps
• Cloud
• Operations
Hamburg, Köln, München,
Karlsruhe, Pforzheim

More Related Content

What's hot

Kubernetes and Prometheus
Kubernetes and PrometheusKubernetes and Prometheus
Kubernetes and Prometheus
Weaveworks
 
Know your app: Add metrics to Java with Micrometer | DevNation Tech Talk
Know your app: Add metrics to Java with Micrometer | DevNation Tech TalkKnow your app: Add metrics to Java with Micrometer | DevNation Tech Talk
Know your app: Add metrics to Java with Micrometer | DevNation Tech Talk
Red Hat Developers
 
Introduction to gRPC - Mete Atamel - Codemotion Rome 2017
Introduction to gRPC - Mete Atamel - Codemotion Rome 2017Introduction to gRPC - Mete Atamel - Codemotion Rome 2017
Introduction to gRPC - Mete Atamel - Codemotion Rome 2017
Codemotion
 
Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...
Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...
Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...
Codemotion
 
Handle insane devices traffic using Google Cloud Platform - Andrea Ulisse - C...
Handle insane devices traffic using Google Cloud Platform - Andrea Ulisse - C...Handle insane devices traffic using Google Cloud Platform - Andrea Ulisse - C...
Handle insane devices traffic using Google Cloud Platform - Andrea Ulisse - C...
Codemotion
 
NFVO based on ManageIQ - OPNFV Summit 2016 Demo
NFVO based on ManageIQ - OPNFV Summit 2016 DemoNFVO based on ManageIQ - OPNFV Summit 2016 Demo
NFVO based on ManageIQ - OPNFV Summit 2016 Demo
ManageIQ
 
Monitoring MySQL with Prometheus, Grafana and Percona Dashboards
Monitoring MySQL with Prometheus, Grafana and Percona DashboardsMonitoring MySQL with Prometheus, Grafana and Percona Dashboards
Monitoring MySQL with Prometheus, Grafana and Percona Dashboards
Julien Pivotto
 
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Brian Brazil
 
Ceilometer Updates - Kilo Edition
Ceilometer Updates - Kilo EditionCeilometer Updates - Kilo Edition
Ceilometer Updates - Kilo Edition
OpenStack Foundation
 
Java application monitoring with Dropwizard Metrics and graphite
Java application monitoring with Dropwizard Metrics and graphite Java application monitoring with Dropwizard Metrics and graphite
Java application monitoring with Dropwizard Metrics and graphite
Roberto Franchini
 
Prometheus for Monitoring Metrics (Fermilab 2018)
Prometheus for Monitoring Metrics (Fermilab 2018)Prometheus for Monitoring Metrics (Fermilab 2018)
Prometheus for Monitoring Metrics (Fermilab 2018)
Brian Brazil
 
CDK Meetup: Rule the World through IaC
CDK Meetup: Rule the World through IaCCDK Meetup: Rule the World through IaC
CDK Meetup: Rule the World through IaC
smalltown
 
The journey to the kubernetes metrics
The journey to the kubernetes metricsThe journey to the kubernetes metrics
The journey to the kubernetes metrics
ChenYiHuang5
 
stackconf 2021 | Prometheus in 2021 and beyond
stackconf 2021 | Prometheus in 2021 and beyondstackconf 2021 | Prometheus in 2021 and beyond
stackconf 2021 | Prometheus in 2021 and beyond
NETWAYS
 
An Introduction to Prometheus
An Introduction to PrometheusAn Introduction to Prometheus
An Introduction to Prometheus
Evgeny Shmarnev
 
Monitoring with prometheus at scale
Monitoring with prometheus at scaleMonitoring with prometheus at scale
Monitoring with prometheus at scale
Juraj Hantak
 
Replication - Nick Carboni - ManageIQ Design Summit 2016
Replication - Nick Carboni - ManageIQ Design Summit 2016Replication - Nick Carboni - ManageIQ Design Summit 2016
Replication - Nick Carboni - ManageIQ Design Summit 2016
ManageIQ
 
Airflow at WePay
Airflow at WePayAirflow at WePay
Airflow at WePay
Chris Riccomini
 
Kubernetes extensibility: crd & operators
Kubernetes extensibility: crd & operators Kubernetes extensibility: crd & operators
Kubernetes extensibility: crd & operators
Giacomo Tirabassi
 
Handling Kubernetes Resources
Handling Kubernetes ResourcesHandling Kubernetes Resources
Handling Kubernetes Resources
Olivier Boukili
 

What's hot (20)

Kubernetes and Prometheus
Kubernetes and PrometheusKubernetes and Prometheus
Kubernetes and Prometheus
 
Know your app: Add metrics to Java with Micrometer | DevNation Tech Talk
Know your app: Add metrics to Java with Micrometer | DevNation Tech TalkKnow your app: Add metrics to Java with Micrometer | DevNation Tech Talk
Know your app: Add metrics to Java with Micrometer | DevNation Tech Talk
 
Introduction to gRPC - Mete Atamel - Codemotion Rome 2017
Introduction to gRPC - Mete Atamel - Codemotion Rome 2017Introduction to gRPC - Mete Atamel - Codemotion Rome 2017
Introduction to gRPC - Mete Atamel - Codemotion Rome 2017
 
Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...
Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...
Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...
 
Handle insane devices traffic using Google Cloud Platform - Andrea Ulisse - C...
Handle insane devices traffic using Google Cloud Platform - Andrea Ulisse - C...Handle insane devices traffic using Google Cloud Platform - Andrea Ulisse - C...
Handle insane devices traffic using Google Cloud Platform - Andrea Ulisse - C...
 
NFVO based on ManageIQ - OPNFV Summit 2016 Demo
NFVO based on ManageIQ - OPNFV Summit 2016 DemoNFVO based on ManageIQ - OPNFV Summit 2016 Demo
NFVO based on ManageIQ - OPNFV Summit 2016 Demo
 
Monitoring MySQL with Prometheus, Grafana and Percona Dashboards
Monitoring MySQL with Prometheus, Grafana and Percona DashboardsMonitoring MySQL with Prometheus, Grafana and Percona Dashboards
Monitoring MySQL with Prometheus, Grafana and Percona Dashboards
 
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
 
Ceilometer Updates - Kilo Edition
Ceilometer Updates - Kilo EditionCeilometer Updates - Kilo Edition
Ceilometer Updates - Kilo Edition
 
Java application monitoring with Dropwizard Metrics and graphite
Java application monitoring with Dropwizard Metrics and graphite Java application monitoring with Dropwizard Metrics and graphite
Java application monitoring with Dropwizard Metrics and graphite
 
Prometheus for Monitoring Metrics (Fermilab 2018)
Prometheus for Monitoring Metrics (Fermilab 2018)Prometheus for Monitoring Metrics (Fermilab 2018)
Prometheus for Monitoring Metrics (Fermilab 2018)
 
CDK Meetup: Rule the World through IaC
CDK Meetup: Rule the World through IaCCDK Meetup: Rule the World through IaC
CDK Meetup: Rule the World through IaC
 
The journey to the kubernetes metrics
The journey to the kubernetes metricsThe journey to the kubernetes metrics
The journey to the kubernetes metrics
 
stackconf 2021 | Prometheus in 2021 and beyond
stackconf 2021 | Prometheus in 2021 and beyondstackconf 2021 | Prometheus in 2021 and beyond
stackconf 2021 | Prometheus in 2021 and beyond
 
An Introduction to Prometheus
An Introduction to PrometheusAn Introduction to Prometheus
An Introduction to Prometheus
 
Monitoring with prometheus at scale
Monitoring with prometheus at scaleMonitoring with prometheus at scale
Monitoring with prometheus at scale
 
Replication - Nick Carboni - ManageIQ Design Summit 2016
Replication - Nick Carboni - ManageIQ Design Summit 2016Replication - Nick Carboni - ManageIQ Design Summit 2016
Replication - Nick Carboni - ManageIQ Design Summit 2016
 
Airflow at WePay
Airflow at WePayAirflow at WePay
Airflow at WePay
 
Kubernetes extensibility: crd & operators
Kubernetes extensibility: crd & operators Kubernetes extensibility: crd & operators
Kubernetes extensibility: crd & operators
 
Handling Kubernetes Resources
Handling Kubernetes ResourcesHandling Kubernetes Resources
Handling Kubernetes Resources
 

Viewers also liked

Moderne App-Entwicklung am Beispiel waipu.tv
Moderne App-Entwicklung am Beispiel waipu.tvModerne App-Entwicklung am Beispiel waipu.tv
Moderne App-Entwicklung am Beispiel waipu.tv
inovex GmbH
 
Datenprodukte für Deutschlands größten Fahrzeugmarkt
Datenprodukte für Deutschlands größten FahrzeugmarktDatenprodukte für Deutschlands größten Fahrzeugmarkt
Datenprodukte für Deutschlands größten Fahrzeugmarkt
inovex GmbH
 
Continuous Integration for Fun and Profit
Continuous Integration for Fun and ProfitContinuous Integration for Fun and Profit
Continuous Integration for Fun and Profit
inovex GmbH
 
Erfolgsfaktoren von Datenprodukten
Erfolgsfaktoren von DatenproduktenErfolgsfaktoren von Datenprodukten
Erfolgsfaktoren von Datenprodukten
inovex GmbH
 
Gitlab meets Kubernetes
Gitlab meets KubernetesGitlab meets Kubernetes
Gitlab meets Kubernetes
inovex GmbH
 
Stackstorm – Event driven Automation
Stackstorm – Event driven AutomationStackstorm – Event driven Automation
Stackstorm – Event driven Automation
inovex GmbH
 
Prometheus Monitoring
Prometheus MonitoringPrometheus Monitoring
Prometheus Monitoring
inovex GmbH
 
Elasticsearch und Big Data - Webinar vom 23.07.2014
Elasticsearch und Big Data - Webinar vom 23.07.2014Elasticsearch und Big Data - Webinar vom 23.07.2014
Elasticsearch und Big Data - Webinar vom 23.07.2014
inovex GmbH
 
Kubernetes Frankfurt
Kubernetes FrankfurtKubernetes Frankfurt
Kubernetes Frankfurt
loodse
 
OpenStack und Containers
OpenStack und ContainersOpenStack und Containers
OpenStack und Containers
inovex GmbH
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
loodse
 
Die dunkle Seite der Microservices - und wie du sie besiegen kannst
Die dunkle Seite der Microservices - und wie du sie besiegen kannst Die dunkle Seite der Microservices - und wie du sie besiegen kannst
Die dunkle Seite der Microservices - und wie du sie besiegen kannst
inovex GmbH
 
Docker meets Kubernetes
Docker meets KubernetesDocker meets Kubernetes
Docker meets Kubernetes
loodse
 
Dockerized Microservices
Dockerized MicroservicesDockerized Microservices
Dockerized Microservices
inovex GmbH
 
Cloud Wars – what‘s the smartest data platform? Vergleich Microsoft Azure, Am...
Cloud Wars – what‘s the smartest data platform? Vergleich Microsoft Azure, Am...Cloud Wars – what‘s the smartest data platform? Vergleich Microsoft Azure, Am...
Cloud Wars – what‘s the smartest data platform? Vergleich Microsoft Azure, Am...
inovex GmbH
 
SysDig Metriken zentralisieren
SysDig Metriken zentralisierenSysDig Metriken zentralisieren
SysDig Metriken zentralisieren
inovex GmbH
 
Automated Application Management with SaltStack
Automated Application Management with SaltStackAutomated Application Management with SaltStack
Automated Application Management with SaltStack
inovex GmbH
 
Monitoring with Graylog - a modern approach to monitoring?
Monitoring with Graylog - a modern approach to monitoring?Monitoring with Graylog - a modern approach to monitoring?
Monitoring with Graylog - a modern approach to monitoring?
inovex GmbH
 
Sprachsteuerung mit dem Google Assistant – Add a new User Interface to your P...
Sprachsteuerung mit dem Google Assistant – Add a new User Interface to your P...Sprachsteuerung mit dem Google Assistant – Add a new User Interface to your P...
Sprachsteuerung mit dem Google Assistant – Add a new User Interface to your P...
inovex GmbH
 
Haltet den (Daten-) Dieb! Echtzeiterkennung von Anomalien in Computernetzwerk...
Haltet den (Daten-) Dieb! Echtzeiterkennung von Anomalien in Computernetzwerk...Haltet den (Daten-) Dieb! Echtzeiterkennung von Anomalien in Computernetzwerk...
Haltet den (Daten-) Dieb! Echtzeiterkennung von Anomalien in Computernetzwerk...
inovex GmbH
 

Viewers also liked (20)

Moderne App-Entwicklung am Beispiel waipu.tv
Moderne App-Entwicklung am Beispiel waipu.tvModerne App-Entwicklung am Beispiel waipu.tv
Moderne App-Entwicklung am Beispiel waipu.tv
 
Datenprodukte für Deutschlands größten Fahrzeugmarkt
Datenprodukte für Deutschlands größten FahrzeugmarktDatenprodukte für Deutschlands größten Fahrzeugmarkt
Datenprodukte für Deutschlands größten Fahrzeugmarkt
 
Continuous Integration for Fun and Profit
Continuous Integration for Fun and ProfitContinuous Integration for Fun and Profit
Continuous Integration for Fun and Profit
 
Erfolgsfaktoren von Datenprodukten
Erfolgsfaktoren von DatenproduktenErfolgsfaktoren von Datenprodukten
Erfolgsfaktoren von Datenprodukten
 
Gitlab meets Kubernetes
Gitlab meets KubernetesGitlab meets Kubernetes
Gitlab meets Kubernetes
 
Stackstorm – Event driven Automation
Stackstorm – Event driven AutomationStackstorm – Event driven Automation
Stackstorm – Event driven Automation
 
Prometheus Monitoring
Prometheus MonitoringPrometheus Monitoring
Prometheus Monitoring
 
Elasticsearch und Big Data - Webinar vom 23.07.2014
Elasticsearch und Big Data - Webinar vom 23.07.2014Elasticsearch und Big Data - Webinar vom 23.07.2014
Elasticsearch und Big Data - Webinar vom 23.07.2014
 
Kubernetes Frankfurt
Kubernetes FrankfurtKubernetes Frankfurt
Kubernetes Frankfurt
 
OpenStack und Containers
OpenStack und ContainersOpenStack und Containers
OpenStack und Containers
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
 
Die dunkle Seite der Microservices - und wie du sie besiegen kannst
Die dunkle Seite der Microservices - und wie du sie besiegen kannst Die dunkle Seite der Microservices - und wie du sie besiegen kannst
Die dunkle Seite der Microservices - und wie du sie besiegen kannst
 
Docker meets Kubernetes
Docker meets KubernetesDocker meets Kubernetes
Docker meets Kubernetes
 
Dockerized Microservices
Dockerized MicroservicesDockerized Microservices
Dockerized Microservices
 
Cloud Wars – what‘s the smartest data platform? Vergleich Microsoft Azure, Am...
Cloud Wars – what‘s the smartest data platform? Vergleich Microsoft Azure, Am...Cloud Wars – what‘s the smartest data platform? Vergleich Microsoft Azure, Am...
Cloud Wars – what‘s the smartest data platform? Vergleich Microsoft Azure, Am...
 
SysDig Metriken zentralisieren
SysDig Metriken zentralisierenSysDig Metriken zentralisieren
SysDig Metriken zentralisieren
 
Automated Application Management with SaltStack
Automated Application Management with SaltStackAutomated Application Management with SaltStack
Automated Application Management with SaltStack
 
Monitoring with Graylog - a modern approach to monitoring?
Monitoring with Graylog - a modern approach to monitoring?Monitoring with Graylog - a modern approach to monitoring?
Monitoring with Graylog - a modern approach to monitoring?
 
Sprachsteuerung mit dem Google Assistant – Add a new User Interface to your P...
Sprachsteuerung mit dem Google Assistant – Add a new User Interface to your P...Sprachsteuerung mit dem Google Assistant – Add a new User Interface to your P...
Sprachsteuerung mit dem Google Assistant – Add a new User Interface to your P...
 
Haltet den (Daten-) Dieb! Echtzeiterkennung von Anomalien in Computernetzwerk...
Haltet den (Daten-) Dieb! Echtzeiterkennung von Anomalien in Computernetzwerk...Haltet den (Daten-) Dieb! Echtzeiterkennung von Anomalien in Computernetzwerk...
Haltet den (Daten-) Dieb! Echtzeiterkennung von Anomalien in Computernetzwerk...
 

Similar to Advanced Cojure Microservices

Little Opinions, Big Possibilities: The Tools and Patterns for Building Larg...
 Little Opinions, Big Possibilities: The Tools and Patterns for Building Larg... Little Opinions, Big Possibilities: The Tools and Patterns for Building Larg...
Little Opinions, Big Possibilities: The Tools and Patterns for Building Larg...
Brian Mann
 
using Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API'susing Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API's
Antônio Roberto Silva
 
Microservices in GO - Massimiliano Dessì - Codemotion Rome 2017
Microservices in GO - Massimiliano Dessì - Codemotion Rome 2017Microservices in GO - Massimiliano Dessì - Codemotion Rome 2017
Microservices in GO - Massimiliano Dessì - Codemotion Rome 2017
Codemotion
 
使用 Prometheus 監控 Kubernetes Cluster
使用 Prometheus 監控 Kubernetes Cluster 使用 Prometheus 監控 Kubernetes Cluster
使用 Prometheus 監控 Kubernetes Cluster
inwin stack
 
Monitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaMonitoring using Prometheus and Grafana
Monitoring using Prometheus and Grafana
Arvind Kumar G.S
 
Monitoring a Kubernetes-backed microservice architecture with Prometheus
Monitoring a Kubernetes-backed microservice architecture with PrometheusMonitoring a Kubernetes-backed microservice architecture with Prometheus
Monitoring a Kubernetes-backed microservice architecture with Prometheus
Fabian Reinartz
 
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesNode Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Chris Bailey
 
Application Security from the Inside - OWASP
Application Security from the Inside - OWASPApplication Security from the Inside - OWASP
Application Security from the Inside - OWASP
Sqreen
 
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js MicroservicesIBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
Chris Bailey
 
Programming IoT Gateways in JavaScript with macchina.io
Programming IoT Gateways in JavaScript with macchina.ioProgramming IoT Gateways in JavaScript with macchina.io
Programming IoT Gateways in JavaScript with macchina.io
Günter Obiltschnig
 
Swift Cloud Workshop - Swift Microservices
Swift Cloud Workshop - Swift MicroservicesSwift Cloud Workshop - Swift Microservices
Swift Cloud Workshop - Swift Microservices
Chris Bailey
 
Re-Design with Elixir/OTP
Re-Design with Elixir/OTPRe-Design with Elixir/OTP
Re-Design with Elixir/OTP
Mustafa TURAN
 
Monitoring as Software Validation
Monitoring as Software ValidationMonitoring as Software Validation
Monitoring as Software Validation
BioDec
 
Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!
Luca Lusso
 
iguazio - nuclio overview to CNCF (Sep 25th 2017)
iguazio - nuclio overview to CNCF (Sep 25th 2017)iguazio - nuclio overview to CNCF (Sep 25th 2017)
iguazio - nuclio overview to CNCF (Sep 25th 2017)
Eran Duchan
 
Performance and Scalability Testing with Python and Multi-Mechanize
Performance and Scalability Testing with Python and Multi-MechanizePerformance and Scalability Testing with Python and Multi-Mechanize
Performance and Scalability Testing with Python and Multi-Mechanize
coreygoldberg
 
nuclio Overview October 2017
nuclio Overview October 2017nuclio Overview October 2017
nuclio Overview October 2017
iguazio
 
Data visualization in python/Django
Data visualization in python/DjangoData visualization in python/Django
Data visualization in python/Django
kenluck2001
 
Infrastructure-as-code: bridging the gap between Devs and Ops
Infrastructure-as-code: bridging the gap between Devs and OpsInfrastructure-as-code: bridging the gap between Devs and Ops
Infrastructure-as-code: bridging the gap between Devs and Ops
Mykyta Protsenko
 
Master a Cloud Native Standard - MicroProfile.pptx
Master a Cloud Native Standard - MicroProfile.pptxMaster a Cloud Native Standard - MicroProfile.pptx
Master a Cloud Native Standard - MicroProfile.pptx
EmilyJiang23
 

Similar to Advanced Cojure Microservices (20)

Little Opinions, Big Possibilities: The Tools and Patterns for Building Larg...
 Little Opinions, Big Possibilities: The Tools and Patterns for Building Larg... Little Opinions, Big Possibilities: The Tools and Patterns for Building Larg...
Little Opinions, Big Possibilities: The Tools and Patterns for Building Larg...
 
using Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API'susing Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API's
 
Microservices in GO - Massimiliano Dessì - Codemotion Rome 2017
Microservices in GO - Massimiliano Dessì - Codemotion Rome 2017Microservices in GO - Massimiliano Dessì - Codemotion Rome 2017
Microservices in GO - Massimiliano Dessì - Codemotion Rome 2017
 
使用 Prometheus 監控 Kubernetes Cluster
使用 Prometheus 監控 Kubernetes Cluster 使用 Prometheus 監控 Kubernetes Cluster
使用 Prometheus 監控 Kubernetes Cluster
 
Monitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaMonitoring using Prometheus and Grafana
Monitoring using Prometheus and Grafana
 
Monitoring a Kubernetes-backed microservice architecture with Prometheus
Monitoring a Kubernetes-backed microservice architecture with PrometheusMonitoring a Kubernetes-backed microservice architecture with Prometheus
Monitoring a Kubernetes-backed microservice architecture with Prometheus
 
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesNode Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
 
Application Security from the Inside - OWASP
Application Security from the Inside - OWASPApplication Security from the Inside - OWASP
Application Security from the Inside - OWASP
 
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js MicroservicesIBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
 
Programming IoT Gateways in JavaScript with macchina.io
Programming IoT Gateways in JavaScript with macchina.ioProgramming IoT Gateways in JavaScript with macchina.io
Programming IoT Gateways in JavaScript with macchina.io
 
Swift Cloud Workshop - Swift Microservices
Swift Cloud Workshop - Swift MicroservicesSwift Cloud Workshop - Swift Microservices
Swift Cloud Workshop - Swift Microservices
 
Re-Design with Elixir/OTP
Re-Design with Elixir/OTPRe-Design with Elixir/OTP
Re-Design with Elixir/OTP
 
Monitoring as Software Validation
Monitoring as Software ValidationMonitoring as Software Validation
Monitoring as Software Validation
 
Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!
 
iguazio - nuclio overview to CNCF (Sep 25th 2017)
iguazio - nuclio overview to CNCF (Sep 25th 2017)iguazio - nuclio overview to CNCF (Sep 25th 2017)
iguazio - nuclio overview to CNCF (Sep 25th 2017)
 
Performance and Scalability Testing with Python and Multi-Mechanize
Performance and Scalability Testing with Python and Multi-MechanizePerformance and Scalability Testing with Python and Multi-Mechanize
Performance and Scalability Testing with Python and Multi-Mechanize
 
nuclio Overview October 2017
nuclio Overview October 2017nuclio Overview October 2017
nuclio Overview October 2017
 
Data visualization in python/Django
Data visualization in python/DjangoData visualization in python/Django
Data visualization in python/Django
 
Infrastructure-as-code: bridging the gap between Devs and Ops
Infrastructure-as-code: bridging the gap between Devs and OpsInfrastructure-as-code: bridging the gap between Devs and Ops
Infrastructure-as-code: bridging the gap between Devs and Ops
 
Master a Cloud Native Standard - MicroProfile.pptx
Master a Cloud Native Standard - MicroProfile.pptxMaster a Cloud Native Standard - MicroProfile.pptx
Master a Cloud Native Standard - MicroProfile.pptx
 

More from inovex GmbH

lldb – Debugger auf Abwegen
lldb – Debugger auf Abwegenlldb – Debugger auf Abwegen
lldb – Debugger auf Abwegen
inovex GmbH
 
Are you sure about that?! Uncertainty Quantification in AI
Are you sure about that?! Uncertainty Quantification in AIAre you sure about that?! Uncertainty Quantification in AI
Are you sure about that?! Uncertainty Quantification in AI
inovex GmbH
 
Why natural language is next step in the AI evolution
Why natural language is next step in the AI evolutionWhy natural language is next step in the AI evolution
Why natural language is next step in the AI evolution
inovex GmbH
 
WWDC 2019 Recap
WWDC 2019 RecapWWDC 2019 Recap
WWDC 2019 Recap
inovex GmbH
 
Network Policies
Network PoliciesNetwork Policies
Network Policies
inovex GmbH
 
Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine Learning
inovex GmbH
 
Jenkins X – CI/CD in wolkigen Umgebungen
Jenkins X – CI/CD in wolkigen UmgebungenJenkins X – CI/CD in wolkigen Umgebungen
Jenkins X – CI/CD in wolkigen Umgebungen
inovex GmbH
 
AI auf Edge-Geraeten
AI auf Edge-GeraetenAI auf Edge-Geraeten
AI auf Edge-Geraeten
inovex GmbH
 
Prometheus on Kubernetes
Prometheus on KubernetesPrometheus on Kubernetes
Prometheus on Kubernetes
inovex GmbH
 
Deep Learning for Recommender Systems
Deep Learning for Recommender SystemsDeep Learning for Recommender Systems
Deep Learning for Recommender Systems
inovex GmbH
 
Azure IoT Edge
Azure IoT EdgeAzure IoT Edge
Azure IoT Edge
inovex GmbH
 
Representation Learning von Zeitreihen
Representation Learning von ZeitreihenRepresentation Learning von Zeitreihen
Representation Learning von Zeitreihen
inovex GmbH
 
Talk to me – Chatbots und digitale Assistenten
Talk to me – Chatbots und digitale AssistentenTalk to me – Chatbots und digitale Assistenten
Talk to me – Chatbots und digitale Assistenten
inovex GmbH
 
Künstlich intelligent?
Künstlich intelligent?Künstlich intelligent?
Künstlich intelligent?
inovex GmbH
 
Dev + Ops = Go
Dev + Ops = GoDev + Ops = Go
Dev + Ops = Go
inovex GmbH
 
Das Android Open Source Project
Das Android Open Source ProjectDas Android Open Source Project
Das Android Open Source Project
inovex GmbH
 
Machine Learning Interpretability
Machine Learning InterpretabilityMachine Learning Interpretability
Machine Learning Interpretability
inovex GmbH
 
Performance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use casePerformance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use case
inovex GmbH
 
People & Products – Lessons learned from the daily IT madness
People & Products – Lessons learned from the daily IT madnessPeople & Products – Lessons learned from the daily IT madness
People & Products – Lessons learned from the daily IT madness
inovex GmbH
 
Infrastructure as (real) Code – Manage your K8s resources with Pulumi
Infrastructure as (real) Code – Manage your K8s resources with PulumiInfrastructure as (real) Code – Manage your K8s resources with Pulumi
Infrastructure as (real) Code – Manage your K8s resources with Pulumi
inovex GmbH
 

More from inovex GmbH (20)

lldb – Debugger auf Abwegen
lldb – Debugger auf Abwegenlldb – Debugger auf Abwegen
lldb – Debugger auf Abwegen
 
Are you sure about that?! Uncertainty Quantification in AI
Are you sure about that?! Uncertainty Quantification in AIAre you sure about that?! Uncertainty Quantification in AI
Are you sure about that?! Uncertainty Quantification in AI
 
Why natural language is next step in the AI evolution
Why natural language is next step in the AI evolutionWhy natural language is next step in the AI evolution
Why natural language is next step in the AI evolution
 
WWDC 2019 Recap
WWDC 2019 RecapWWDC 2019 Recap
WWDC 2019 Recap
 
Network Policies
Network PoliciesNetwork Policies
Network Policies
 
Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine Learning
 
Jenkins X – CI/CD in wolkigen Umgebungen
Jenkins X – CI/CD in wolkigen UmgebungenJenkins X – CI/CD in wolkigen Umgebungen
Jenkins X – CI/CD in wolkigen Umgebungen
 
AI auf Edge-Geraeten
AI auf Edge-GeraetenAI auf Edge-Geraeten
AI auf Edge-Geraeten
 
Prometheus on Kubernetes
Prometheus on KubernetesPrometheus on Kubernetes
Prometheus on Kubernetes
 
Deep Learning for Recommender Systems
Deep Learning for Recommender SystemsDeep Learning for Recommender Systems
Deep Learning for Recommender Systems
 
Azure IoT Edge
Azure IoT EdgeAzure IoT Edge
Azure IoT Edge
 
Representation Learning von Zeitreihen
Representation Learning von ZeitreihenRepresentation Learning von Zeitreihen
Representation Learning von Zeitreihen
 
Talk to me – Chatbots und digitale Assistenten
Talk to me – Chatbots und digitale AssistentenTalk to me – Chatbots und digitale Assistenten
Talk to me – Chatbots und digitale Assistenten
 
Künstlich intelligent?
Künstlich intelligent?Künstlich intelligent?
Künstlich intelligent?
 
Dev + Ops = Go
Dev + Ops = GoDev + Ops = Go
Dev + Ops = Go
 
Das Android Open Source Project
Das Android Open Source ProjectDas Android Open Source Project
Das Android Open Source Project
 
Machine Learning Interpretability
Machine Learning InterpretabilityMachine Learning Interpretability
Machine Learning Interpretability
 
Performance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use casePerformance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use case
 
People & Products – Lessons learned from the daily IT madness
People & Products – Lessons learned from the daily IT madnessPeople & Products – Lessons learned from the daily IT madness
People & Products – Lessons learned from the daily IT madness
 
Infrastructure as (real) Code – Manage your K8s resources with Pulumi
Infrastructure as (real) Code – Manage your K8s resources with PulumiInfrastructure as (real) Code – Manage your K8s resources with Pulumi
Infrastructure as (real) Code – Manage your K8s resources with Pulumi
 

Recently uploaded

AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
Google
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 

Recently uploaded (20)

AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 

Advanced Cojure Microservices

  • 1. Advanced Clojure Microservices Tobias Bayer Hamburg, 30.09.2016
  • 2. Clojure, Java, Cloud tobias.bayer@inovex.de https://github.com/tobiasbayer 2 Tobias Bayer Senior Developer / Software Architect inovex GmbH
  • 3. 3 (defroutes app (GET "/messages/:name" [name] {:body {:message (str "Hello World" " " name)}}) (route/resources "/") (route/not-found "Not Found")) (defn -main [& args] (run-jetty app {:port 3000 :join? false })) Microservices with Clojure is easy!
  • 4. 4
  • 5. ~ 20 Microservices High Availability Polyglot About 30% of services in Clojure Running on AWS 5 Project
  • 6. 6 Resource Modeling Fault Tolerance Monitoring and Metrics Cloudability ... Real World Problems
  • 12. 12 Resource Modeling with Liberator (defroutes app (ANY "/api/users" [] r/users) (ANY "/api/users/:userhandle" [userhandle] (r/user userhandle)) (ANY "/api/authentication" [] r/authentication))
  • 13. 13 Resource Modeling with Liberator (defresource users :available-media-types ["application/user-v1+json"] :allowed-methods [:post] :malformed? (fn [ctx] (s/validate-user (body ctx))) :handle-malformed (fn [ctx] (ring-response {:status 400 :body {:message (str (s/validate-user (body ctx)))})})) :post! (fn [ctx] (if (user-exists? (body ctx)) {:conflict true} {:created-entity (create-user (body ctx))})) :handle-created (fn [ctx] (if (:conflict ctx) (ring-response {:status 409}) (r/user-output (:created-entity ctx)))))
  • 15. (h/add-hook {:hystrix/timeout-ms (:HYSTRIX_TIMEOUT config/settings) :hystrix/threads (:HYSTRIX_THREADS config/settings)}) 15 Fault Tolerance with Hystrix (defn search-customer [param] (client/get (str api-endpoint "/customers?search=" param) {:content-type :json :as :json :hystrix/group-key "customers" :hystrix/fallback-fn (constantly {:body {:name "Not" :firstname "Found"}})}))
  • 19. (defroutes app ;; ... (ANY "/internal/metrics" [] (prometheus/dump-metrics (:registry @metrics/metrics-store)))) (def handler (-> app ; ... (prometheus/instrument-handler "" (:registry @metrics/metrics-store)))) 19 Metrics with Prometheus prometheus-clj
  • 20. (defonce metrics-store (atom (prometheus/init-defaults))) (defn- register-metrics [] (-> @metrics-store (prometheus/register-gauge "users" "users_count" "Number of users in DB" ["users_count"]) (prometheus/register-gauge "users" "users_disabled" "Number of disabled users in DB" ["users_disabled"]) (prometheus/register-counter "users" "cache_hits" "Number of cache hits when requesting a customer" ["cache_hits"]) (prometheus/register-counter "users" "cache_misses" "Number of cache misses when requesting a customer" ["cache_misses"]))) (defn init [] (reset! metrics-store (register-metrics)) (HystrixPrometheusMetricsPublisher/register (:registry @metrics-store))) 20 Metrics with Prometheus
  • 21. (defn update-metrics [] (prometheus/set-gauge @metrics-store "users" "users_count" (p/count-users) ["users_count"]) (prometheus/set-gauge @metrics-store "users" "users_disabled" (p/count-users {:enabled false}) ["users_disabled"])) (defn inc-cache-hits [] (prometheus/increase-counter @metrics-store "users" "cache_hits" ["cache_hits"] 1)) (defn inc-cache-misses [] (prometheus/increase-counter @metrics-store "users" "cache_misses" ["cache_misses"] 1)) 21 Metrics with Prometheus
  • 22. (defn process-event [event] (when (= (:eventType event) "SubscriptionChanged") (log/info "Received event" event) (handle-subscription-changed-event event))) (defn start-worker! [fn-processor] (kinesis/worker! :app (:APP_NAME config/settings) :stream (:EVENT_STREAM config/settings) :endpoint (:KINESIS_ENDPOINT config/settings) :region-name (:AWS_REGION config/settings) :processor (fn [records] (doseq [record records] (process-record record fn-processor))))) 22 Cloudability with Amazonica AWS Kinesis
  • 23. 23
  • 24. jobs@inovex.de www.inovex.de/jobs +49 721 619 021 50 Wir suchen Verstärkung in den Bereichen • Digital Consulting • Web Frontend & Backend • Replatforming • Apps & Smart Devices • Big Data • Data Science • Search • Business Intelligence • DevOps • Cloud • Operations Hamburg, Köln, München, Karlsruhe, Pforzheim