SlideShare a Scribd company logo
1 of 20
Mocking the cloud
Michael Neale
@michaelneale
github.com/michaelneale
@cloudbees
 Hosted apps (PaaS a la GAE etc)
 Jenkins/hudson “as a service”
 lotsa elastic servers, variable load
 in production !
Where scala:
 Provisioning:
 Build servers, masters, new hosts, allocation
 “cloud controller” app
 Some Play! framework, some maven
CloudBees

     controller                  providore      storage


App pool    DB clusters   Master pool   Slave pool




                  scala
Why scala?
 Easy !
 * Saved time (early startup - I had to wear
 lots of hats)
 * Types help hard to reach (test) places
 * And why not
Result?
 New staff come on, able to contribute,
 maintain.
 No issues.
 But they aren’t idiots.
Next time?
Seriously look at scala “native” things (akka)

Avoid faux-oo
 - instead use objects as namespaces

Monadic IO - Monadic server/cloud
operations?
server = do
        instance = launch_server "image-id"
        volume = create_volume_for instance "10G"
        return attach_volume instance volume
To the cloud
 (jclouds + scala)

 Avert your eyes children...
CloudClient
 “Discovered” semantics:
 Start, Stop, List, Status, Volume Create,
 Attach etc..
 Create own easily mockable cloud api (trait)
 Don’t try this at home...

 (EBS sob stories for another time - pushed
 provisioning api to the limit)
Mockito + Scalatest
 Runs nicely in IDEA runner

 TestX extends ShouldMatchers (scalatest)
 import org.mockito.{Matchers, ArgumentCaptor}
Also: the REPL
 Invaluable:

 Controlled “live” testing
 Explore api behaviors, inspect
 Data in “hazelcast” - reload new version, continue
 Testing with real things == expensive

More Related Content

What's hot

Puppetpreso
PuppetpresoPuppetpreso
Puppetpreso
ke4qqq
 

What's hot (20)

How to build an HA container orchestrator infrastructure for production – Giu...
How to build an HA container orchestrator infrastructure for production – Giu...How to build an HA container orchestrator infrastructure for production – Giu...
How to build an HA container orchestrator infrastructure for production – Giu...
 
Serverless cat detector workshop - cloudyna 2017 (16.12.2017)
Serverless cat detector   workshop - cloudyna 2017 (16.12.2017)Serverless cat detector   workshop - cloudyna 2017 (16.12.2017)
Serverless cat detector workshop - cloudyna 2017 (16.12.2017)
 
Kubernetes on AWS gone wild
Kubernetes on AWS gone wildKubernetes on AWS gone wild
Kubernetes on AWS gone wild
 
Automating Application over OpenStack using Workflows
Automating Application over OpenStack using WorkflowsAutomating Application over OpenStack using Workflows
Automating Application over OpenStack using Workflows
 
Puppetpreso
PuppetpresoPuppetpreso
Puppetpreso
 
Serverless Reality
Serverless RealityServerless Reality
Serverless Reality
 
From Docker Straight to AWS
From Docker Straight to AWSFrom Docker Straight to AWS
From Docker Straight to AWS
 
Trash Talk! How to Reduce Downtime by Tuning Garbage Collection
Trash Talk! How to Reduce Downtime by Tuning Garbage CollectionTrash Talk! How to Reduce Downtime by Tuning Garbage Collection
Trash Talk! How to Reduce Downtime by Tuning Garbage Collection
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Operational challenges behind Serverless architectures
Operational challenges behind Serverless architecturesOperational challenges behind Serverless architectures
Operational challenges behind Serverless architectures
 
Bostonrb Amazon Talk
Bostonrb Amazon TalkBostonrb Amazon Talk
Bostonrb Amazon Talk
 
IT automation: Make the server great again - toulouse devops fev 2017
IT automation: Make the server great again  - toulouse devops fev 2017IT automation: Make the server great again  - toulouse devops fev 2017
IT automation: Make the server great again - toulouse devops fev 2017
 
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
 Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
 
Meetup Estonia, talk about Azure AKS and ACI Connector
Meetup Estonia, talk about Azure AKS and ACI ConnectorMeetup Estonia, talk about Azure AKS and ACI Connector
Meetup Estonia, talk about Azure AKS and ACI Connector
 
Announcing Blox - Open Source Projects for Customizing Scheduling on Amazon ECS
Announcing Blox - Open Source Projects for Customizing Scheduling on Amazon ECSAnnouncing Blox - Open Source Projects for Customizing Scheduling on Amazon ECS
Announcing Blox - Open Source Projects for Customizing Scheduling on Amazon ECS
 
Dos and don'ts in AWS
Dos and don'ts in AWSDos and don'ts in AWS
Dos and don'ts in AWS
 
AWS Elastic Container Service - DockerHN
AWS Elastic Container Service - DockerHNAWS Elastic Container Service - DockerHN
AWS Elastic Container Service - DockerHN
 
Webinar: Queues with RabbitMQ - Lorna Mitchell
Webinar: Queues with RabbitMQ - Lorna MitchellWebinar: Queues with RabbitMQ - Lorna Mitchell
Webinar: Queues with RabbitMQ - Lorna Mitchell
 
jclouds at HKJUG
jclouds at HKJUGjclouds at HKJUG
jclouds at HKJUG
 
Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017
Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017
Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017
 

Viewers also liked

A Sceptical Guide to Functional Programming
A Sceptical Guide to Functional ProgrammingA Sceptical Guide to Functional Programming
A Sceptical Guide to Functional Programming
Garth Gilmour
 
Perl Development (Sample Courseware)
Perl Development (Sample Courseware)Perl Development (Sample Courseware)
Perl Development (Sample Courseware)
Garth Gilmour
 

Viewers also liked (6)

MongoDB - visualisation of slow operations
MongoDB - visualisation of slow operationsMongoDB - visualisation of slow operations
MongoDB - visualisation of slow operations
 
Usability Testing Intro
Usability Testing IntroUsability Testing Intro
Usability Testing Intro
 
Scala.io 2013 - M’enfin Scalac, où glandes-tu encore ?
Scala.io 2013 - M’enfin Scalac, où glandes-tu encore ?Scala.io 2013 - M’enfin Scalac, où glandes-tu encore ?
Scala.io 2013 - M’enfin Scalac, où glandes-tu encore ?
 
A Sceptical Guide to Functional Programming
A Sceptical Guide to Functional ProgrammingA Sceptical Guide to Functional Programming
A Sceptical Guide to Functional Programming
 
Perl Development (Sample Courseware)
Perl Development (Sample Courseware)Perl Development (Sample Courseware)
Perl Development (Sample Courseware)
 
Raphaël JS Conf
Raphaël JS ConfRaphaël JS Conf
Raphaël JS Conf
 

Similar to Scala sydoct2011

jclouds High Level Overview by Adrian Cole
jclouds High Level Overview by Adrian Colejclouds High Level Overview by Adrian Cole
jclouds High Level Overview by Adrian Cole
Everett Toews
 
Docker Online Meetup #3: Docker in Production
Docker Online Meetup #3: Docker in ProductionDocker Online Meetup #3: Docker in Production
Docker Online Meetup #3: Docker in Production
Docker, Inc.
 
Open stack dashboard diablo
Open stack dashboard   diabloOpen stack dashboard   diablo
Open stack dashboard diablo
Open Stack
 

Similar to Scala sydoct2011 (20)

Just one-shade-of-openstack
Just one-shade-of-openstackJust one-shade-of-openstack
Just one-shade-of-openstack
 
Martin Odersky: What's next for Scala
Martin Odersky: What's next for ScalaMartin Odersky: What's next for Scala
Martin Odersky: What's next for Scala
 
jclouds High Level Overview by Adrian Cole
jclouds High Level Overview by Adrian Colejclouds High Level Overview by Adrian Cole
jclouds High Level Overview by Adrian Cole
 
Scaling Django for X Factor - DJUGL Oct 2012
Scaling Django for X Factor - DJUGL Oct 2012Scaling Django for X Factor - DJUGL Oct 2012
Scaling Django for X Factor - DJUGL Oct 2012
 
Docker Online Meetup #3: Docker in Production
Docker Online Meetup #3: Docker in ProductionDocker Online Meetup #3: Docker in Production
Docker Online Meetup #3: Docker in Production
 
Introduction to Apache CloudStack by David Nalley
Introduction to Apache CloudStack by David NalleyIntroduction to Apache CloudStack by David Nalley
Introduction to Apache CloudStack by David Nalley
 
Devoxx
DevoxxDevoxx
Devoxx
 
Serverless Spring - Nate Schutta 1/2
Serverless Spring - Nate Schutta 1/2Serverless Spring - Nate Schutta 1/2
Serverless Spring - Nate Schutta 1/2
 
Cloud PaaS with Java
Cloud PaaS with JavaCloud PaaS with Java
Cloud PaaS with Java
 
CI/CD with Kubernetes, Helm & Wercker (#madScalability)
CI/CD with Kubernetes, Helm & Wercker (#madScalability)CI/CD with Kubernetes, Helm & Wercker (#madScalability)
CI/CD with Kubernetes, Helm & Wercker (#madScalability)
 
Docker Tips And Tricks at the Docker Beijing Meetup
Docker Tips And Tricks at the Docker Beijing MeetupDocker Tips And Tricks at the Docker Beijing Meetup
Docker Tips And Tricks at the Docker Beijing Meetup
 
Making DSpace XMLUI Your Own
Making DSpace XMLUI Your OwnMaking DSpace XMLUI Your Own
Making DSpace XMLUI Your Own
 
Google Cloud Build - Sfeir Lunch Janvier 2019
Google Cloud Build - Sfeir Lunch Janvier 2019Google Cloud Build - Sfeir Lunch Janvier 2019
Google Cloud Build - Sfeir Lunch Janvier 2019
 
Docker Demystified for SB JUG
Docker Demystified for SB JUGDocker Demystified for SB JUG
Docker Demystified for SB JUG
 
Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023
Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023
Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023
 
Paul Angus (ShapeBlue) - Push infrastructure with Ansible #DOXLON
Paul Angus (ShapeBlue) - Push infrastructure with Ansible #DOXLONPaul Angus (ShapeBlue) - Push infrastructure with Ansible #DOXLON
Paul Angus (ShapeBlue) - Push infrastructure with Ansible #DOXLON
 
Adopting Java for the Serverless World at JAX 2022
Adopting Java for the Serverless World at JAX 2022Adopting Java for the Serverless World at JAX 2022
Adopting Java for the Serverless World at JAX 2022
 
Play framework
Play frameworkPlay framework
Play framework
 
Open stack dashboard diablo
Open stack dashboard   diabloOpen stack dashboard   diablo
Open stack dashboard diablo
 
OpenStack Dashboard - Diablo
OpenStack Dashboard - DiabloOpenStack Dashboard - Diablo
OpenStack Dashboard - Diablo
 

More from Michael Neale

More from Michael Neale (16)

Jenkins X intro (from google app dev conference)
Jenkins X intro (from google app dev conference)Jenkins X intro (from google app dev conference)
Jenkins X intro (from google app dev conference)
 
Devoxx 2014 michael_neale
Devoxx 2014 michael_nealeDevoxx 2014 michael_neale
Devoxx 2014 michael_neale
 
Cd syd
Cd sydCd syd
Cd syd
 
Cross site calls with javascript - the right way with CORS
Cross site calls with javascript - the right way with CORSCross site calls with javascript - the right way with CORS
Cross site calls with javascript - the right way with CORS
 
Microservices and functional programming
Microservices and functional programmingMicroservices and functional programming
Microservices and functional programming
 
Cors michael
Cors michaelCors michael
Cors michael
 
Osdc 2011 michael_neale
Osdc 2011 michael_nealeOsdc 2011 michael_neale
Osdc 2011 michael_neale
 
Java one 2011_michaelneale
Java one 2011_michaelnealeJava one 2011_michaelneale
Java one 2011_michaelneale
 
Errors and handling them. YOW nights Sydney 2011
Errors and handling them. YOW nights Sydney 2011Errors and handling them. YOW nights Sydney 2011
Errors and handling them. YOW nights Sydney 2011
 
Sjug aug 2010_cloud
Sjug aug 2010_cloudSjug aug 2010_cloud
Sjug aug 2010_cloud
 
SJUG March 2010 Restful design
SJUG March 2010 Restful designSJUG March 2010 Restful design
SJUG March 2010 Restful design
 
On Scala Slides - OSDC 2009
On Scala Slides - OSDC 2009On Scala Slides - OSDC 2009
On Scala Slides - OSDC 2009
 
Osdc Complex Event Processing
Osdc Complex Event ProcessingOsdc Complex Event Processing
Osdc Complex Event Processing
 
Scala Sjug 09
Scala Sjug 09Scala Sjug 09
Scala Sjug 09
 
Jaoo Michael Neale 09
Jaoo Michael Neale 09Jaoo Michael Neale 09
Jaoo Michael Neale 09
 
Osdc Michael Neale 2008
Osdc Michael Neale 2008Osdc Michael Neale 2008
Osdc Michael Neale 2008
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

Scala sydoct2011

  • 1. Mocking the cloud Michael Neale @michaelneale github.com/michaelneale
  • 2.
  • 3. @cloudbees Hosted apps (PaaS a la GAE etc) Jenkins/hudson “as a service” lotsa elastic servers, variable load in production !
  • 4. Where scala: Provisioning: Build servers, masters, new hosts, allocation “cloud controller” app Some Play! framework, some maven
  • 5. CloudBees controller providore storage App pool DB clusters Master pool Slave pool scala
  • 6. Why scala? Easy ! * Saved time (early startup - I had to wear lots of hats) * Types help hard to reach (test) places * And why not
  • 7. Result? New staff come on, able to contribute, maintain. No issues. But they aren’t idiots.
  • 8. Next time? Seriously look at scala “native” things (akka) Avoid faux-oo - instead use objects as namespaces Monadic IO - Monadic server/cloud operations?
  • 9. server = do instance = launch_server "image-id" volume = create_volume_for instance "10G" return attach_volume instance volume
  • 10. To the cloud (jclouds + scala) Avert your eyes children...
  • 11.
  • 12. CloudClient “Discovered” semantics: Start, Stop, List, Status, Volume Create, Attach etc.. Create own easily mockable cloud api (trait) Don’t try this at home... (EBS sob stories for another time - pushed provisioning api to the limit)
  • 13. Mockito + Scalatest Runs nicely in IDEA runner TestX extends ShouldMatchers (scalatest) import org.mockito.{Matchers, ArgumentCaptor}
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. Also: the REPL Invaluable: Controlled “live” testing Explore api behaviors, inspect Data in “hazelcast” - reload new version, continue Testing with real things == expensive

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n