A talk I did recently on microservices and functional programming. Microservices are small, single purpose apps that are run as a service, which are usually composed together to provide the real app.
An inroduction to Terraform, a tool that helps you deploy and change your infrastructure as code. Given at Rencontres Mondiales du Logiciel libre (RMLL) 2017
Accessing any offshore structure can be problematic due to the movement of a vessel compared to the structure. Ampelmann has developed the solution for this challenge. Similar to a flight simulator, the Ampelmann eliminates any relative motion by taking instant measurements of the ship’s motions and then compensates them by using 6 hydraulic cylinders. The result: the top of the Ampelmann remains completely stationary compared to the structure. The offshore gangway can then be extended towards the structure so all personnel can walk across safely, even in high wave conditions.
An inroduction to Terraform, a tool that helps you deploy and change your infrastructure as code. Given at Rencontres Mondiales du Logiciel libre (RMLL) 2017
Accessing any offshore structure can be problematic due to the movement of a vessel compared to the structure. Ampelmann has developed the solution for this challenge. Similar to a flight simulator, the Ampelmann eliminates any relative motion by taking instant measurements of the ship’s motions and then compensates them by using 6 hydraulic cylinders. The result: the top of the Ampelmann remains completely stationary compared to the structure. The offshore gangway can then be extended towards the structure so all personnel can walk across safely, even in high wave conditions.
Scaling Push Messaging for Millions of Devices @NetflixC4Media
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/2oA2uI5.
Susheel Aroskar talks about Zuul Push, a scalable push notification service that handles millions of "always-on" persistent connections from all the Netflix apps running. He covers the design of the Zuul Push server and reviews the design details of the back-end message routing infrastructure that lets any Netflix microservice push notifications to any connected client. Filmed at qconnewyork.com.
Susheel Aroskar works as a software engineer on the Cloud Gateway team at Netflix, which develops and operates Zuul, an API gateway that fronts all of the Netflix cloud traffic and handles more than 100 billion requests/day. Prior to Zuul, he worked on Netflix CDN's control plane in the cloud, which is responsible for steering more than a third of all North American peak evening internet traffic.
Cloud Native Night August 2016, Munich: Talk by Julius Volz (@juliusvolz, Co-founder at Prometheus).
Join our Meetup: www.meetup.com/cloud-native-muc
Abstract: This talk is on monitoring dynamic cloud environments with Prometheus.
Easy Setup for Parallel Test Execution with Selenium DockerSargis Sargsyan
Parallel execution of test cases is one of the important requirements of a modern test automation framework.
Generally, to run Selenium Suite in parallel, we use selenium grid and distributing tests across multiple machines which will reduce the time required for running tests. To run tests in parallel, we need to configure Selenium Grid with Hub and Nodes where the hub is the central point which will receive test requests along with configurations or capabilities. Based on the request received, the hub will distribute tests to the registered nodes.
Selenium has made a set of Docker images which are available on Docker Hub. We have Selenium Grid, and the browser images - Chrome and Firefox. There are also images with the debug versions which will let as view the test execution.
In this session, we will go through the Selenium tests parallel run setup and configuration.
Automate your Oracle Cloud Infrastructure operationNelson Calero
The Oracle Cloud provides APIs and CLI utilities to handle your infrastructure in the cloud without using the web console. In addition, there are orchestration tools such as Terraform to build, change and version your infrastructure.
This presentation introduces to the topic through examples, minimizing manual interventions: creating instances and containers, using the REST api and opc tool, deploying a cluster using the project terraform-kubernetes-installer, and backing up your databases.
Low Code Integration with Apache Camel.pdfClaus Ibsen
Design your integration flows using Camel and JBang for a better developer experience, and make it easily production grade using Quarkus.
Claus Ibsen, Apache Camel lead & Senior Principal Software Engineer, Red Hat
Kyma: Extending Business systems with Kubernetes, Istio and <fill the blank>.SAP HANA Cloud Platform
In this talk, we look into an example of how to make previously simple things again simple. We introduce project Kyma: a side-by-side extension environment based on Kubernetes from the ground up, allowing developers to customize the functionality of enterprise systems, using business events and HTTP triggers. It makes use of Istio Service Mesh, benefits from Knative and relies on NATS for message routing. We've released it as open source project Kyma (https://kyma-project.io)
We go briefly across the technology stack, looking at each of the components and exploring what factors lead to the choice of technology and what alternatives we've left out of the equation. We also look into how that fits into the broader Cloud-native ecosystem and what potential synergies we see with other CNCF projects.
Serverless integration with Knative and Apache Camel on KubernetesClaus Ibsen
This presentation will introduce Knative, an open source project that adds serverless capabilities on top of Kubernetes, and present Camel K, a lightweight platform that brings Apache Camel integrations in the serverless world. Camel K allows running Camel routes on top of any Kubernetes cluster, leveraging Knative serverless capabilities such as “scaling to zero”.
We will demo how Camel K can connect cloud services or enterprise applications using its 250+ components and how it can intelligently route events within the Knative environment via enterprise integration patterns (EIP).
Target Group: Developers, architects and other technical people - a basic understanding of Kubernetes is an advantage
The InstallShield of the 21st Century – Theo SchlossnagleChef Software, Inc.
Today's systems are complex and the most successful products are SaaS. When you need to ship a SaaS architecture to someone (private SaaS) there are a lot of moving parts to install and maintain. I'll talk about what we do at Circonus to provide our complex software stack on large clusters on-premise using Chef as the orchestration framework.
Scaling Push Messaging for Millions of Devices @NetflixC4Media
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/2oA2uI5.
Susheel Aroskar talks about Zuul Push, a scalable push notification service that handles millions of "always-on" persistent connections from all the Netflix apps running. He covers the design of the Zuul Push server and reviews the design details of the back-end message routing infrastructure that lets any Netflix microservice push notifications to any connected client. Filmed at qconnewyork.com.
Susheel Aroskar works as a software engineer on the Cloud Gateway team at Netflix, which develops and operates Zuul, an API gateway that fronts all of the Netflix cloud traffic and handles more than 100 billion requests/day. Prior to Zuul, he worked on Netflix CDN's control plane in the cloud, which is responsible for steering more than a third of all North American peak evening internet traffic.
Cloud Native Night August 2016, Munich: Talk by Julius Volz (@juliusvolz, Co-founder at Prometheus).
Join our Meetup: www.meetup.com/cloud-native-muc
Abstract: This talk is on monitoring dynamic cloud environments with Prometheus.
Easy Setup for Parallel Test Execution with Selenium DockerSargis Sargsyan
Parallel execution of test cases is one of the important requirements of a modern test automation framework.
Generally, to run Selenium Suite in parallel, we use selenium grid and distributing tests across multiple machines which will reduce the time required for running tests. To run tests in parallel, we need to configure Selenium Grid with Hub and Nodes where the hub is the central point which will receive test requests along with configurations or capabilities. Based on the request received, the hub will distribute tests to the registered nodes.
Selenium has made a set of Docker images which are available on Docker Hub. We have Selenium Grid, and the browser images - Chrome and Firefox. There are also images with the debug versions which will let as view the test execution.
In this session, we will go through the Selenium tests parallel run setup and configuration.
Automate your Oracle Cloud Infrastructure operationNelson Calero
The Oracle Cloud provides APIs and CLI utilities to handle your infrastructure in the cloud without using the web console. In addition, there are orchestration tools such as Terraform to build, change and version your infrastructure.
This presentation introduces to the topic through examples, minimizing manual interventions: creating instances and containers, using the REST api and opc tool, deploying a cluster using the project terraform-kubernetes-installer, and backing up your databases.
Low Code Integration with Apache Camel.pdfClaus Ibsen
Design your integration flows using Camel and JBang for a better developer experience, and make it easily production grade using Quarkus.
Claus Ibsen, Apache Camel lead & Senior Principal Software Engineer, Red Hat
Kyma: Extending Business systems with Kubernetes, Istio and <fill the blank>.SAP HANA Cloud Platform
In this talk, we look into an example of how to make previously simple things again simple. We introduce project Kyma: a side-by-side extension environment based on Kubernetes from the ground up, allowing developers to customize the functionality of enterprise systems, using business events and HTTP triggers. It makes use of Istio Service Mesh, benefits from Knative and relies on NATS for message routing. We've released it as open source project Kyma (https://kyma-project.io)
We go briefly across the technology stack, looking at each of the components and exploring what factors lead to the choice of technology and what alternatives we've left out of the equation. We also look into how that fits into the broader Cloud-native ecosystem and what potential synergies we see with other CNCF projects.
Serverless integration with Knative and Apache Camel on KubernetesClaus Ibsen
This presentation will introduce Knative, an open source project that adds serverless capabilities on top of Kubernetes, and present Camel K, a lightweight platform that brings Apache Camel integrations in the serverless world. Camel K allows running Camel routes on top of any Kubernetes cluster, leveraging Knative serverless capabilities such as “scaling to zero”.
We will demo how Camel K can connect cloud services or enterprise applications using its 250+ components and how it can intelligently route events within the Knative environment via enterprise integration patterns (EIP).
Target Group: Developers, architects and other technical people - a basic understanding of Kubernetes is an advantage
The InstallShield of the 21st Century – Theo SchlossnagleChef Software, Inc.
Today's systems are complex and the most successful products are SaaS. When you need to ship a SaaS architecture to someone (private SaaS) there are a lot of moving parts to install and maintain. I'll talk about what we do at Circonus to provide our complex software stack on large clusters on-premise using Chef as the orchestration framework.
Introduction to node.js by Ran Mizrahi @ Reversim SummitRan Mizrahi
Node.js is a platform built on Chrome V8 javascript runtime engine for building fast and scalable, non-blocking, real-time and network applications. In this session I'll introduce you to node.js and developing large code bases using it. We'll cover the following aspects:
* What is node.js?
* Apache vs. Nginx performance (One thread per connection vs. event loop) and what it has to do with node.js.
* Why node was written in Javascript?
* Main tools and frameworks (Express, socket.io, mongoose etc.)
* TDD/BDD with node.js using mocha and Expect.js
Tek 2013 - Building Web Apps from a New Angle with AngularJSPablo Godel
AngularJS is a new JavaScript framework, backed by Google, for building powerful, complex and rich client-side web applications. We will go over the features and basics of building a web application with AngularJS and we will demonstrate how to communicate with a REST server built with PHP.
Green Shoots in the Brownest Field: Being a Startup in GovernmentC4Media
Video and slides synchronized, mp3 and slide download available at http://bit.ly/1cghaiX.
Mat Wall describes some of the tools & techniques that are used within the UK Government Digital Service to try and make the government behave less like an enterprise and more like a startup.Filmed at qconlondon.com.
Mat Wall is a technical architect who can still actually make things and now works for the Cabinet Office, a rare thing indeed. Mat works on elements of the GOV.UK website, as well as working within departments on transactional services. Twitter: @matwall
DevOps Nirvana: Seven Steps to a Peaceful Life on AWS (ARC210) | AWS re:Inven...Amazon Web Services
(Presented by Stackdriver) Key decisions related to architecture, tools, processes, and even team composition can have a dramatic effect on the human effort required to operate distributed applications on AWS. If you make the wrong decisions on in these areas, you spend your days, nights, weekends, and vacations dealing with issues and noise. If you make the right decisions, you and your team can focus on building customer value, and your time away from work is spent… not working.
Stackdriver and Smugmug describe the seven most important practices that world-class operations teams employ to minimize operational overhead, highlighting real-world examples to illustrate the importance of each.
Reactive design: languages, and paradigmsDean Wampler
A talk first given at React 2014 and refined for YOW! LambdaJam 2014 that explores the meaning of Reactive Programming, as described in the Reactive Manifesto, and how well it is supported by general design paradigms, like Functional Programming, Object-Oriented Programming, and Domain Driven Design, and by particular design approaches, such as Functional Reactive Programming, Reactive Extensions, Actors, etc.
Tools/Processes for serious android app developmentGaurav Lochan
I've managed a team that developed serious android apps, and ended up dabbling with tools out there and processes/systems. Here is a quick summary of the various things to think about if you're serious about android development, and in some cases, my recommendations.
This covers:
IDE
Build
Source Control
Bug/Task tracking
Crash reporting
Analytics
Test Automation
Continuous Integration
Device Matrix testing
Performance testing
Beta testing
A/B testing
Backend-as-a-Service
Cross site calls with javascript - the right way with CORSMichael Neale
Using CORS (cross origin resource sharing) you can easily and securely to cross site scripting in webapps - less servers and more integration from apis right in the browser
This was presented during Web Directions South, 2013, Sydney, Australia.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
2. Microservices and FP
Given that:
We have lots of services
- Everything has an API
Functional programming:
- quality improvements, popular
- applied easily to “new” services/projects
Combine them!
Wednesday, 9 October 13
3. Definitions
Functional programming:
- avoid/manage side effects
- immutability over mutation
- higher order functions
- first class functions
- composition using functions over OO
Wednesday, 9 October 13
4. Definitions
Micro-service:
- remotely accessible service (typically http)
- does “one thing” (and does it well?)
- executes stand alone in a container (JVM - in this
case)
- may depend on other services
- can be composed into a larger service
Wednesday, 9 October 13
8. Jenkins CI
PaaS repos autoscale
management console web apps
how to compose???
provisioning
licencingsubscriptions
Wednesday, 9 October 13
9. Identify some micro
services
repos: artifact storage
- store blobs in users account (via s3)
autoscale:
- look at a stream of stats - decide to scale app
(note: won’t scale app - just recommends)
subscriptions:
- check entitlements, record usage
Wednesday, 9 October 13
11. Aside: FP (more later)
Some services lend themselves to “purity”
eg: Automatic scaling
F(last minute stats) = recommendation to scale up,
or down (or no change)
No state, no persistence. Perfect candidate for FP.
Wednesday, 9 October 13
12. Why not monolithic?
Can easily do
@Produces(MediaType.JSON)
@Path("/apps")
@POST
...
Thanks to jax-rs in one app? why not? Different
endpoints via @Path, different methods, different
classes?
Wednesday, 9 October 13
13. Why not monolithic?
Apps grow (teams grow too!)
Different parts change at different rates
Different execution container needs (resources)
Different teams?
Company grows?
But most of all:
Wednesday, 9 October 13
15. Why not monolithic?
Deploying a change to a microservice does not
increase blood pressure as much as deploying the
ONE MASSIVE APP THAT RUNS EVERYTHING
Wednesday, 9 October 13
19. Shift to dev-ops
More deployment expected
More *people* doing the deployment
Wednesday, 9 October 13
20. Smooth deployment
Microservices need:
- easy rollback
- no “over the wall” deployment
- easy as-needed deployment
- accessible deploy environment
A PaaS can help (private or public) - they were born
for this.
Wednesday, 9 October 13
21. Transport
Typically (but not always) HTTP
Typically (but not always) JSON
(autoscale service was message bus + thrift name/
value pairs)
But *are* always loosely coupled (ie never RMI)
Wednesday, 9 October 13
22. Containers
Execution environment:
- anything really
- consumers of APIs don’t care
- but developers do, deployers do
- JVM ideal: enough controls/constraints
- many languages
- many frameworks
If you had to pick one: JVM wins.
Wednesday, 9 October 13
23. Convinced?
By this point I hope I have convinced you
microservices are good.
Right?
Wednesday, 9 October 13
27. History
2010 Started: JVM stack parts - Scala not
controversial (I had experience) - working mostly
“lone wolf”
2011 - another team added - brought Erlang
Wednesday, 9 October 13
29. More FP
Given “success” with Scala, more FP (services,
languages) was not viewed as a great risk.
Wednesday, 9 October 13
30. Observation
FP means one person can do more &&
People like me like to work alone
∴ risk of staying with one-person-per micro service
(is this a bad thing?)
Wednesday, 9 October 13
31. Objections and resistance
Ask why:
- resistance to the “new” (unnecessary risk)
- resistance to FP ideas (hype?)
- polyglot fear
(realistically multiple languages will be used)
Wednesday, 9 October 13
32. Maintainability objection
It goes:
- how will anyone be able to maintain this after you?
My Experience:
- projects featuring FP handed over successfully
- new developers able to pick up FP easily
- seasoned developers too
Wednesday, 9 October 13
33. Where we may differ
Small teams - many systems.
∴ Little overlap in jobs.
We get to use a great PaaS !
(our own!) for all these micro services
Wednesday, 9 October 13
34. What did we do with FP
Manage horrendous public cloud APIs
Automatic scaling (microservice)
Github crawling (microservice)
Subscription/signup/entitlements (microservice)
... and microservices
Wednesday, 9 October 13
35. Surprisingly practical things
No real calculations, no explicit maths.
Just boring every day error prone stuff.
Wednesday, 9 October 13
38. New build required. Check the pool, talk to the Evil
api, ask for a new server, it fails, ask again. Wait for
server to be up, no, I mean really up.
Ask for a new disk, wait for a new disk, it fails, try
again, attach the new disk, is the disk attached?
fails, try again, damn it the snapshot isn’t available.
The problem:
Wednesday, 9 October 13
39. How can we solve this?
TDD? problems only manifest under load/in-
production. APIs are buggy, change over time.
Industry best practice: hack something together as a
script and some of the time it works.
Can FP help us?
Wednesday, 9 October 13
40. Yes
Types (providore is written in scala)
- Specifically: Option, Either
- Closed Data Types (servers only in so many states)
The M word: Monads
Currying
Wednesday, 9 October 13
41. Cloud API
launch_server: Server
at best hopes to be:
launch_server: Option[Server]
launch_server: Either[Server, OhGodWhyWhyWhy]
(not an actual pure function of course)
Wednesday, 9 October 13
42. Cloud Monad
Cloud APIs are like IO
Slow, horrible, misbehaving IO
...and then the APIs other people write
All want to be monadic
Wednesday, 9 October 13
43. val validation: String / Subscription = (for {
account <- extractAccount
_ <- validateSubscription(account)
callback <- extractCallBack
plan <- validatePlan
billing_day <- extractBillingDay
subscription <- createSub(account, plan, callback, ...
} yield subscription).run(req.body)
(scala) ReaderT to help you compose
http://debasishg.blogspot.com.au/2011/07/
monad-transformers-in-scala.html
Need to “organise code in monadic way”
Wednesday, 9 October 13
44. Types
So hard to catch things without them
Monadic IO + types mean you catch things before
you try
Trying/experimenting can be $$ expensive...
(still learning this, all new to me)
Wednesday, 9 October 13
45. Types helped with
Ignored messages
Bad pattern matching
Misconfiguration/timing of server creation
Avoiding “stringly typed” messages
All “real world” things types have help us catch with
a friendly compile error**
** may not actually be friendly
Wednesday, 9 October 13
49. Currying
Server lifecycle: Reserved->Launching->Update
(user data)->Volume Create->Volume Attach-
>initialise/start
Accumulate setup data via partial application
Instead of an object that has mutating state, a
function you partially apply to accumulate data.
Good “beginner” FP concept (powerful, simple)
Wednesday, 9 October 13
50. Small things
But every little bit helps.
The pure FP is my ideal, rarely reached (so far)
Wednesday, 9 October 13
53. Auto scaling
F(last minute stats, previous data
window) -> “Suggestion” to scale up, or down
(or in or out)
Fundamentally calculation, fundamentally functional.
Wednesday, 9 October 13
54. Side effects
Push out side effects to other side of the message
bus
Let a nasty app handle the side effects
Messages are signals, suggestions, idempotent
Wednesday, 9 October 13
55. Advocating to Developers
Don’t “sell” to your developers by:
- saying monad too often
- saying “it’s easy”
- showing that it can be just as easy/familiar as what
they have
Instead...
Wednesday, 9 October 13
56. Find the functions
Find the functions in what they do
Find the calculations (eg core of autoscaling)
Advanced:
Separate the program definition from the execution
(monads)
Intermediate:
Currying, Higher order functions, Types (good ones)
Wednesday, 9 October 13
57. ‘Unlearning’ OO
Clojure: excellent at teaching people to forget about
OO.
Scala: challenge. Temptation always there.
∴ Use object/package as namespace (avoid classes)
Aside: lack of implicit state allows “Erlang Magic”
Wednesday, 9 October 13
59. Quick development for web apps and APIs
RESTful by design
“batteries included” - has everything.
Easy reuse of all java libraries.
www.playframework.com
Wednesday, 9 October 13
61. Easy deployment (jar/zip file)
Can support DBs/evolution
Excellent JSON/http/web support
Security, Async, Background jobs, and more
Scala or Java.
Wednesday, 9 October 13
62. Compojure: just enough web framework
Light - small apps
Deploy as war, or embedded jetty
Great libraries, reuse java libs
Effortless JSON -> clojure
https://github.com/weavejester/compojure
Wednesday, 9 October 13
65. To the Cloud!
Want to try things at your company:
Cloud Platforms (hint! vendor shilling!) make it easy
to try things out that may be used seriously.
Clojure anywhere, Scala anywhere
Say “cloud cloud” a lot and people will listen.
Wednesday, 9 October 13
67. Bad questions to hear
(when advocating)
If you hear these asked, probably will have a bad
time:
How will we hire people?
Does it work for large teams?
Wednesday, 9 October 13
68. Final Observation
Developers who have fondness for emacs/vim (over
IDE) find things easier
FP invites “change this small bit, see what happens”
exploration
No real tool barriers.
If I can do this, anyone can.
Wednesday, 9 October 13
69. Conclusion
FP and Microservices *naturally* go together
Can be about Risk Reduction in new rapid
deployment world
Cloud
A good place to try FP
Wednesday, 9 October 13