SlideShare a Scribd company logo
MICROSERVICES WITH A
Yair Galler @ygaller – Java IL November 2017
A Minimalist Microframework
for Web Apps
•Verb, Route & Handler
•Request and Response objects
From 0 60
in 35 seconds
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.leadspace</groupId>
<artifactId>hello-spark</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.sparkjava</groupId>
<artifactId>spark-core</artifactId>
<version>2.6.0</version>
</dependency>
</dependencies>
</project>
The HTTP Server
* Works with other HTTP servers
Common options are easy to tune
• Port
• Threads
• Timeout
Configuration
Fully configurable for advanced use cases
Works with other containers
Configuration
Easy access to request & response objects
• Parameters
• Mime Type
• Response transformer – Any object  String
Ease of Use
Ease of Use
The Leadspace Use Case
Before Spark
•Tried adapting existing Tomcat to
microservices
•Services were increasingly complex
•Provisioning & configuration hell
Alternatives We Considered
Spring Boot
Dropwizard
The Road to Spark
Spark in Leadspace
•Thin wrapper for serving data / configs
•Business logic
•Orchestrators
•Queue based services
Spark in Leadspace
When is it less suitable?
•Web serving
•High concurrency
Spark in Leadspace
Testability
• Spin up an instance with mock
dependencies
• Call endpoints with an http client
• Shutdown
Additional Features &
Considerations
Dependency
Injection
Web Serving
Kotlin
Questions? @ygaller

More Related Content

What's hot

Exposing Salesforce REST Services Using Swagger
Exposing Salesforce REST Services Using SwaggerExposing Salesforce REST Services Using Swagger
Exposing Salesforce REST Services Using Swagger
Salesforce Developers
 
Spring
SpringSpring
Spring
JyothirmaiG4
 
Azure cloud for the web frontend developers
Azure cloud for the web frontend developersAzure cloud for the web frontend developers
Azure cloud for the web frontend developers
Maxim Salnikov
 
All ivanti is a secure workspace - Bsides Delft 2018
All ivanti is a secure workspace - Bsides Delft 2018All ivanti is a secure workspace - Bsides Delft 2018
All ivanti is a secure workspace - Bsides Delft 2018
Johanna Curiel
 
The JavaFX Ecosystem
The JavaFX EcosystemThe JavaFX Ecosystem
The JavaFX Ecosystem
Andres Almiray
 
Birdpie
BirdpieBirdpie
Birdpie
anupnarkhede
 
Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...
Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...
Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...
Christian Schneider
 
ISC2 Secure Summit EMEA - Top Microsoft Azure security fails and how to avoid...
ISC2 Secure Summit EMEA - Top Microsoft Azure security fails and how to avoid...ISC2 Secure Summit EMEA - Top Microsoft Azure security fails and how to avoid...
ISC2 Secure Summit EMEA - Top Microsoft Azure security fails and how to avoid...
Karl Ots
 
PhoneGap Day EU 2016 - Closing Remarks
PhoneGap Day EU 2016 -  Closing RemarksPhoneGap Day EU 2016 -  Closing Remarks
PhoneGap Day EU 2016 - Closing Remarks
Shazron Abdullah
 
Serverless Computing With Azure Functions
Serverless Computing With Azure FunctionsServerless Computing With Azure Functions
Serverless Computing With Azure Functions
Jaliya Udagedara
 
Loading native plugins using PhoneGap content-sync
Loading native plugins using PhoneGap content-syncLoading native plugins using PhoneGap content-sync
Loading native plugins using PhoneGap content-sync
Shazron Abdullah
 
Zed attack proxy [ What is ZAP(Zed Attack Proxy)? ]
Zed attack proxy [ What is ZAP(Zed Attack Proxy)? ]Zed attack proxy [ What is ZAP(Zed Attack Proxy)? ]
Zed attack proxy [ What is ZAP(Zed Attack Proxy)? ]
raj upadhyay
 
ASP.NET Core 1.0 Overview: Pre-RC2
ASP.NET Core 1.0 Overview: Pre-RC2ASP.NET Core 1.0 Overview: Pre-RC2
ASP.NET Core 1.0 Overview: Pre-RC2
Shahed Chowdhuri
 
Debugging made easier with extended events
Debugging made easier with extended eventsDebugging made easier with extended events
Debugging made easier with extended events
Amit Banerjee
 
Fastest to Mobile with Scalatra + Swagger
Fastest to Mobile with Scalatra + SwaggerFastest to Mobile with Scalatra + Swagger
Fastest to Mobile with Scalatra + Swagger
Tony Tam
 
AlwaysOn Troubleshooting Improvements
AlwaysOn Troubleshooting ImprovementsAlwaysOn Troubleshooting Improvements
AlwaysOn Troubleshooting Improvements
Amit Banerjee
 
Azure serverless security
Azure serverless securityAzure serverless security
Azure serverless security
Pratik Khasnabis
 
I Am MongoDB – And So Can You!
I Am MongoDB – And So Can You!I Am MongoDB – And So Can You!
I Am MongoDB – And So Can You!
MongoDB
 
Introduction of ASP.NET MVC and AngularJS
Introduction of ASP.NET MVC and AngularJSIntroduction of ASP.NET MVC and AngularJS
Introduction of ASP.NET MVC and AngularJS
Mohamed Elkhodary
 
How to Hack (And Secure) Serverless Apps on Azure
How to Hack (And Secure) Serverless Apps on AzureHow to Hack (And Secure) Serverless Apps on Azure
How to Hack (And Secure) Serverless Apps on Azure
Dean Bryen
 

What's hot (20)

Exposing Salesforce REST Services Using Swagger
Exposing Salesforce REST Services Using SwaggerExposing Salesforce REST Services Using Swagger
Exposing Salesforce REST Services Using Swagger
 
Spring
SpringSpring
Spring
 
Azure cloud for the web frontend developers
Azure cloud for the web frontend developersAzure cloud for the web frontend developers
Azure cloud for the web frontend developers
 
All ivanti is a secure workspace - Bsides Delft 2018
All ivanti is a secure workspace - Bsides Delft 2018All ivanti is a secure workspace - Bsides Delft 2018
All ivanti is a secure workspace - Bsides Delft 2018
 
The JavaFX Ecosystem
The JavaFX EcosystemThe JavaFX Ecosystem
The JavaFX Ecosystem
 
Birdpie
BirdpieBirdpie
Birdpie
 
Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...
Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...
Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...
 
ISC2 Secure Summit EMEA - Top Microsoft Azure security fails and how to avoid...
ISC2 Secure Summit EMEA - Top Microsoft Azure security fails and how to avoid...ISC2 Secure Summit EMEA - Top Microsoft Azure security fails and how to avoid...
ISC2 Secure Summit EMEA - Top Microsoft Azure security fails and how to avoid...
 
PhoneGap Day EU 2016 - Closing Remarks
PhoneGap Day EU 2016 -  Closing RemarksPhoneGap Day EU 2016 -  Closing Remarks
PhoneGap Day EU 2016 - Closing Remarks
 
Serverless Computing With Azure Functions
Serverless Computing With Azure FunctionsServerless Computing With Azure Functions
Serverless Computing With Azure Functions
 
Loading native plugins using PhoneGap content-sync
Loading native plugins using PhoneGap content-syncLoading native plugins using PhoneGap content-sync
Loading native plugins using PhoneGap content-sync
 
Zed attack proxy [ What is ZAP(Zed Attack Proxy)? ]
Zed attack proxy [ What is ZAP(Zed Attack Proxy)? ]Zed attack proxy [ What is ZAP(Zed Attack Proxy)? ]
Zed attack proxy [ What is ZAP(Zed Attack Proxy)? ]
 
ASP.NET Core 1.0 Overview: Pre-RC2
ASP.NET Core 1.0 Overview: Pre-RC2ASP.NET Core 1.0 Overview: Pre-RC2
ASP.NET Core 1.0 Overview: Pre-RC2
 
Debugging made easier with extended events
Debugging made easier with extended eventsDebugging made easier with extended events
Debugging made easier with extended events
 
Fastest to Mobile with Scalatra + Swagger
Fastest to Mobile with Scalatra + SwaggerFastest to Mobile with Scalatra + Swagger
Fastest to Mobile with Scalatra + Swagger
 
AlwaysOn Troubleshooting Improvements
AlwaysOn Troubleshooting ImprovementsAlwaysOn Troubleshooting Improvements
AlwaysOn Troubleshooting Improvements
 
Azure serverless security
Azure serverless securityAzure serverless security
Azure serverless security
 
I Am MongoDB – And So Can You!
I Am MongoDB – And So Can You!I Am MongoDB – And So Can You!
I Am MongoDB – And So Can You!
 
Introduction of ASP.NET MVC and AngularJS
Introduction of ASP.NET MVC and AngularJSIntroduction of ASP.NET MVC and AngularJS
Introduction of ASP.NET MVC and AngularJS
 
How to Hack (And Secure) Serverless Apps on Azure
How to Hack (And Secure) Serverless Apps on AzureHow to Hack (And Secure) Serverless Apps on Azure
How to Hack (And Secure) Serverless Apps on Azure
 

Similar to Microservices with a Spark

Spring Boot and JHipster
Spring Boot and JHipsterSpring Boot and JHipster
Spring Boot and JHipster
Eueung Mulyana
 
Apache maven
Apache mavenApache maven
Apache maven
faisalm017
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous Integration
Nicolas Fränkel
 
JavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオンJavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオン
haruki ueno
 
Spring RestFul Web Services - CRUD Operations Example
Spring RestFul Web Services - CRUD Operations ExampleSpring RestFul Web Services - CRUD Operations Example
Spring RestFul Web Services - CRUD Operations Example
Nikhil Bhalwankar
 
Pom
PomPom
Pom
akmini
 
Pom configuration java xml
Pom configuration java xmlPom configuration java xml
Pom configuration java xml
akmini
 
Gradle: From Extreme to Mainstream
Gradle: From Extreme to MainstreamGradle: From Extreme to Mainstream
Gradle: From Extreme to Mainstream
BTI360
 
Enough with the JavaScript already!
Enough with the JavaScript already!Enough with the JavaScript already!
Enough with the JavaScript already!
Nicholas Zakas
 
Enough with the javas cript already! de Nicholas Zakas
Enough with the javas cript already! de Nicholas ZakasEnough with the javas cript already! de Nicholas Zakas
Enough with the javas cript already! de Nicholas Zakas
Kubide
 
Ajax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorialsAjax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorials
Raghavan Mohan
 
Open Social In The Enterprise
Open Social In The EnterpriseOpen Social In The Enterprise
Open Social In The Enterprise
Tim Moore
 
Apache Maven
Apache MavenApache Maven
Apache Maven
venkatraghavang
 
Maven
MavenMaven
Maven
javeed_mhd
 
Maven
MavenMaven
Desarrollo web backend: Spring Boot, MongoDB y Azure
Desarrollo web backend: Spring Boot, MongoDB y AzureDesarrollo web backend: Spring Boot, MongoDB y Azure
Desarrollo web backend: Spring Boot, MongoDB y Azure
Patxi Gortázar
 
Maven in Mule
Maven in MuleMaven in Mule
Maven in Mule
Anand kalla
 
Not Only Streams for Akademia JLabs
Not Only Streams for Akademia JLabsNot Only Streams for Akademia JLabs
Not Only Streams for Akademia JLabs
Konrad Malawski
 
Automation Frame works Instruction Sheet
Automation Frame works Instruction SheetAutomation Frame works Instruction Sheet
Automation Frame works Instruction Sheet
vodQA
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
David M. Johnson
 

Similar to Microservices with a Spark (20)

Spring Boot and JHipster
Spring Boot and JHipsterSpring Boot and JHipster
Spring Boot and JHipster
 
Apache maven
Apache mavenApache maven
Apache maven
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous Integration
 
JavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオンJavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオン
 
Spring RestFul Web Services - CRUD Operations Example
Spring RestFul Web Services - CRUD Operations ExampleSpring RestFul Web Services - CRUD Operations Example
Spring RestFul Web Services - CRUD Operations Example
 
Pom
PomPom
Pom
 
Pom configuration java xml
Pom configuration java xmlPom configuration java xml
Pom configuration java xml
 
Gradle: From Extreme to Mainstream
Gradle: From Extreme to MainstreamGradle: From Extreme to Mainstream
Gradle: From Extreme to Mainstream
 
Enough with the JavaScript already!
Enough with the JavaScript already!Enough with the JavaScript already!
Enough with the JavaScript already!
 
Enough with the javas cript already! de Nicholas Zakas
Enough with the javas cript already! de Nicholas ZakasEnough with the javas cript already! de Nicholas Zakas
Enough with the javas cript already! de Nicholas Zakas
 
Ajax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorialsAjax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorials
 
Open Social In The Enterprise
Open Social In The EnterpriseOpen Social In The Enterprise
Open Social In The Enterprise
 
Apache Maven
Apache MavenApache Maven
Apache Maven
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
Desarrollo web backend: Spring Boot, MongoDB y Azure
Desarrollo web backend: Spring Boot, MongoDB y AzureDesarrollo web backend: Spring Boot, MongoDB y Azure
Desarrollo web backend: Spring Boot, MongoDB y Azure
 
Maven in Mule
Maven in MuleMaven in Mule
Maven in Mule
 
Not Only Streams for Akademia JLabs
Not Only Streams for Akademia JLabsNot Only Streams for Akademia JLabs
Not Only Streams for Akademia JLabs
 
Automation Frame works Instruction Sheet
Automation Frame works Instruction SheetAutomation Frame works Instruction Sheet
Automation Frame works Instruction Sheet
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 

Recently uploaded

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
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
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
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
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
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
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
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
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
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
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
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
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
 

Recently uploaded (20)

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
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
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
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
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)
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
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
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
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
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 

Microservices with a Spark

Editor's Notes

  1. Who thinks this talk is about Big Data? Goals of this talk: Explain what is Spark Present our journey from monolith to microservices using Spark Show extra features of Spark Quickly about myself: Engineering TL at Leadspace Been at Leadspace for 6 years Durring that time we moved from Monolith to Microservices – Something many have done. What’s different – We’ve ended up using Spark to build services
  2. Based on Sinatra RoR Actively developed – 6K stars, Java 9 coming soon What is minimalist – Route urls to functions, Request & Response objects Web app – Static + REST
  3. Don’t really care about “Hello world” Do care about getting to the business logic as quickly as possible Zero code to working server in 35 seconds!
  4. Port 4567 is the default Response is an object that undergoes a transformation Thank IntelliJ  Uses Java 8 lambdas – Would not exist without it
  5. In the coding example, I showed the actual coding. You might wonder what else need to be done. This is all the setup overhead Omitted maven-source-plugin for Java 8
  6. Generic Embedded Jetty under the hood Anything you can do with Jetty, you can do with Spark
  7. Common options – Port, threads, timeout
  8. Useful for advanced use case – Connectors Other containers
  9. Request & response objects Access params (URL / Query) Set mime type & transform the response
  10. We are mid-size. Not POC / not Google or Netflix or Taboola. Don’t want upfront costs of their frameworks
  11. Started deconstructing our monolith POC back in 2012 Starting point - Tomcat + MySQL System was too complex, too fragile. Locks. Long builds of one huge codebase
  12. “Microservices” the concept was just appearing Embedded was the key Bad directions (we didn’t understand at the time) Many machines, one Tomcat / machine, multiple wars per Tomcat + RMI. Many machines, one war per Tomcat, but not embedded. NoSQL on some. Setup hell, abuse of Spring. Ansible automation
  13. Least opinionated Other containers that we looked at: Spring Boot – Lots of magic, very opinionated towards Spring Dropwizard – Opinionated and includes many libraries – Jetty, Jackson, JDBI, Liquibase. Mapping is Jersey based Spark does the little that it does really well There’s not much under the hood Comparisons: 6700 stars on Github (DW – 6K, Play – 9K, Spring Boot – 17K) https://zeroturnaround.com/rebellabs/sparkjava-is-an-amazing-java-web-framework-do-you-really-need-it/ https://craftsmen.nl/memory-usage-6-popular-rest-server-frameworks-compared/
  14. How we use Spark today Lightweight services Thin wrappers for data stores Business logic / Orchestrators / Machine Learning Processed that read queues Hundreds of requests / second
  15. Spark is not a fit for everything. We also use Express / Akka
  16. Emphasis here is on testing the endpoints, not the business logic Mocked DB