SlideShare a Scribd company logo
Over the past 1.5 years LinkedIn has been using {py}gradle on over 800 different projects successfully. Given
the success of these projects we are going to offer the plugin to the open source community. We plan to open
source {py}gradle in it’s current state, after LinkedIn-isms are removed with a 0 major version. When it’s open
sourced, we will also present the plan forward for 1.0 and beyond.
OPEN SOURCE
BUILDING A POLYGLOT SERVICE?
A Polyglot Service has a backend API server written in Python that uses gunicorn, Flask, and other internal
and external Python dependencies, it has a frontend server written in Ember.js that uses NPM under the hood,
it uses Python clients generated from Rest.li interface definition language (IDL) using a Java tool, and must
emit the proper metadata that our deployment system uses to configure, canary, and deploy our service.
How can we build a Polyglot Service?
generateJava
generatePython
buildJava
buildEmber
buildRestli
buildPython
build
uploadMetadata
publish
uploadArtifacts
packDeployable
runPytest
pipInstallDeps
makeDists
createVenv
Gradle is an open source modular build system. Gradle started its life building JVM-based code, and
gained additional traction when they moved to Android and C/C++ over the past few years. Gradle
gives developers a rich API to implement plugins: the primitive units that compose a Gradle build
system. A plugin developer is able to implement a DSL to model any process or language that they
wish, ultimately enabling us to build polyglot build systems. A plugin can be reused, mixed and
matched with other plugins, extended, configured, and more. Gradle’s plugin architecture lets us
build better build systems.
ABOUT GRADLE
BUILD.GRADLE
apply plugin: 'python'
apply plugin: 'python-api-server'
def insertFromFile = { filePath ->
// Read a Python requirements.txt file...
}
dependencies {
// Installation requirements from file
installRequires insertFromFile('requirements.txt')
// Installation requirements
installRequires 'pypi:Flask:0.0.0'
installRequires 'linkedin:utils:0.0.0'
// Test requirements
testsRequire 'pypi:mock:0.0.0'
// Setup requirements
setupRequires 'pypi:setuptools-git:0.0.0'
// Front end static resources requirements
resource project(path: ':ember-frontend', configuration:
'static')
}
- Dependency management for FREE!
- No need to emit metadata. The build system does that for me.
- Different languages work together.
Some cases where Gradle works better for version conflict resolution than the traditional Python build
workflow.
- Python picks up a new version on each rebuild. Gradle can reproduce the builds.
- Python gets version conflict for major version updates. Gradle picks up the highest.
- Python gets version conflict when one branch of the graph blacklists version as bad, but another
branch does not. Gradle reliably blacklists the bad version.
In complex dependency systems, we may
want to do what LinkedIn calls “semantic
version” testing. Upon a change to D, we
want to test its changes against C, F, and G.
If the application does not pin all its dependencies,
it can get into cascading version conflicts during
dependency updates (see below). In this example
we can see that C, F, and G all depend on D at dif-
ferent major versions. What should we do?
Dependency management happens on graphs, where nodes represent packages and edges represent ver-
sions or ranges of versions on other nodes. We care about dependency management because it gives us
the ability to reproduce builds and safely evolve software as it changes time over time.
Dependency management is challenging to get right, and solutions exist on a spectrum. On one side,
we can practice version pinning in which a dependency pins all direct and transitive dependencies. This
approach achieves reproducible builds, but makes safely evolving difficult. On the other side, we can
employ floating versions and only specify direct dependencies. This approach achieves fluidity in evolv-
ing software but makes reproducible builds impossible and doesn’t make evolution necessarily safe.
DEPENDENCY MANAGEMENT
A
B
E
D
C
G
F
A
B
E
D
C
G
F
A
B
E
D
C
G
F
ABOUT SEMANTIC VERSIONING
[
V 1 2 5Major Minor Patch
[
[
A {py}gradle project uses setuptools, vir-
tualenv, and pip to maintain a development
and build environment that makes use of ev-
erything that a Python developer is already fa-
miliar with: setup.py, setup.cfg, require-
ments.txt, tox.ini, and more. A {py}gradle
project looks and feels like a Python project
and produces backwards-compatible artifacts
that work with non-{py}gradle-based Python
projects.
HOW TO USE
$ tree
├── build.gradle
├── gradlew
├── backend-api
│ ├── build.gradle
│ ├── setup.cfg
│ ├── setup.py
│ ├── src
│ │ └── backend
│ │ └── __init__.py
│ ├── requirements.txt
│ └── test
│ └── test_backend.py
├── <subproject>
│ └── ...
└── settings.gradle
$ ./gradlew build
{py}gradle uses the power of Ivy for dependency
management. Then, it goes out of your way and
lets you work as a pure Python developer. After
the first build, the standard virtualenv develope-
ment workflow can be used.
BUILD SYSTEM COMPARISON
ABSTRACT
As our Python development team grew over the years and the number of packages and interdepen-
dencies grew from tens to hundreds to thousands, we found that we were struggling to maintain
our code base using the standard tooling that was available to us: setuptools, virtualenv, and pip.
At the same time, our Java development team converged on a new build system – Gradle – that al-
lowed them to write extendable build logic. We found that Gradle wasn’t just for Java, and we wrote
a powerful and idiomatic Python build system that reused much of the build logic as our Java
peers, without changing the way our Python developers work.
{py}gradle
Stephen Holsapple (sholsapp@linkedin.com, , sholsapp)
Zvezdan Petković (zpetkovic@linkedin.com, zvezdan)
Ethan Hall (ethall@linkedin.com, ethankhall)
Loren Carvalho (lcarvalho@linkedin.com, sixninetynine)
Gradle Maven Ant Setuptools Buildout Pants CMake
Powerful
Dependency Resolution
API
Decoupled Dependency
Metadata
Ivy-based
Metadata
Pluggable
Scriptable
Human-readable
Build File
Natively Polyglot
Generic Artifact
Hosting Support
(*) to a certain extent, or not easily
*
*
*
Gradle allows us to have multiple projects, each in a separate directory, for each language used. Each project
uses the gradle plugin(s) specific to that language. The artifacts produced in a build of each project can be
used in another project. The ordering of build tasks gives us the full control of the overall service build. For
advanced use, one can exclude tasks from running, or use multiple languages in the same project.

More Related Content

What's hot

Intro to Ratpack (CDJDN 2015-01-22)
Intro to Ratpack (CDJDN 2015-01-22)Intro to Ratpack (CDJDN 2015-01-22)
Intro to Ratpack (CDJDN 2015-01-22)
David Carr
 
Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)
Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)
Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)
DataWorks Summit
 
給 RD 的 Kubernetes 初體驗 (EKS version)
給 RD 的 Kubernetes 初體驗 (EKS version)給 RD 的 Kubernetes 初體驗 (EKS version)
給 RD 的 Kubernetes 初體驗 (EKS version)
William Yeh
 
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFestManageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Jarek Potiuk
 
Spinnaker Summit 2019: Where are we heading? The Future of Continuous Delivery
Spinnaker Summit 2019: Where are we heading? The Future of Continuous DeliverySpinnaker Summit 2019: Where are we heading? The Future of Continuous Delivery
Spinnaker Summit 2019: Where are we heading? The Future of Continuous Delivery
Andrew Phillips
 
Building Translate on Glass
Building Translate on GlassBuilding Translate on Glass
Building Translate on Glass
Trish Whetzel
 
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison DowdneySetting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Weaveworks
 
Importance of GCP: 30 Days of GCP
Importance of GCP: 30 Days of GCPImportance of GCP: 30 Days of GCP
Importance of GCP: 30 Days of GCP
AnshTyagi27
 
Yannis Zarkadas. Enterprise data science workflows on kubeflow
Yannis Zarkadas. Enterprise data science workflows on kubeflowYannis Zarkadas. Enterprise data science workflows on kubeflow
Yannis Zarkadas. Enterprise data science workflows on kubeflow
MarynaHoldaieva
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web Framework
Daniel Woods
 
給 RD 的 Kubernetes 初體驗
給 RD 的 Kubernetes 初體驗給 RD 的 Kubernetes 初體驗
給 RD 的 Kubernetes 初體驗
William Yeh
 
It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)
It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)
It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)
Jarek Potiuk
 
Hands-on GitOps Patterns for Helm Users
Hands-on GitOps Patterns for Helm UsersHands-on GitOps Patterns for Helm Users
Hands-on GitOps Patterns for Helm Users
Weaveworks
 
Terraform Code Reviews: Supercharged with Conftest
Terraform Code Reviews: Supercharged with ConftestTerraform Code Reviews: Supercharged with Conftest
Terraform Code Reviews: Supercharged with Conftest
Jay Wallace
 
Nanog75, Network Device Property as Code
Nanog75, Network Device Property as CodeNanog75, Network Device Property as Code
Nanog75, Network Device Property as Code
Damien Garros
 
Gitlab ci, cncf.sk
Gitlab ci, cncf.skGitlab ci, cncf.sk
Gitlab ci, cncf.sk
Juraj Hantak
 
Docker Enables DevOps
Docker Enables DevOpsDocker Enables DevOps
Docker Enables DevOps
Boyd Hemphill
 
Kube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul CzarkowskiKube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul Czarkowski
VMware Tanzu
 
はじめての JFrog Artifactory
はじめての JFrog Artifactoryはじめての JFrog Artifactory
はじめての JFrog Artifactory
Tsuyoshi Miyake
 
Netflix Open Source: Building a Distributed and Automated Open Source Program
Netflix Open Source:  Building a Distributed and Automated Open Source ProgramNetflix Open Source:  Building a Distributed and Automated Open Source Program
Netflix Open Source: Building a Distributed and Automated Open Source Program
aspyker
 

What's hot (20)

Intro to Ratpack (CDJDN 2015-01-22)
Intro to Ratpack (CDJDN 2015-01-22)Intro to Ratpack (CDJDN 2015-01-22)
Intro to Ratpack (CDJDN 2015-01-22)
 
Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)
Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)
Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)
 
給 RD 的 Kubernetes 初體驗 (EKS version)
給 RD 的 Kubernetes 初體驗 (EKS version)給 RD 的 Kubernetes 初體驗 (EKS version)
給 RD 的 Kubernetes 初體驗 (EKS version)
 
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFestManageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
 
Spinnaker Summit 2019: Where are we heading? The Future of Continuous Delivery
Spinnaker Summit 2019: Where are we heading? The Future of Continuous DeliverySpinnaker Summit 2019: Where are we heading? The Future of Continuous Delivery
Spinnaker Summit 2019: Where are we heading? The Future of Continuous Delivery
 
Building Translate on Glass
Building Translate on GlassBuilding Translate on Glass
Building Translate on Glass
 
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison DowdneySetting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
 
Importance of GCP: 30 Days of GCP
Importance of GCP: 30 Days of GCPImportance of GCP: 30 Days of GCP
Importance of GCP: 30 Days of GCP
 
Yannis Zarkadas. Enterprise data science workflows on kubeflow
Yannis Zarkadas. Enterprise data science workflows on kubeflowYannis Zarkadas. Enterprise data science workflows on kubeflow
Yannis Zarkadas. Enterprise data science workflows on kubeflow
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web Framework
 
給 RD 的 Kubernetes 初體驗
給 RD 的 Kubernetes 初體驗給 RD 的 Kubernetes 初體驗
給 RD 的 Kubernetes 初體驗
 
It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)
It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)
It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)
 
Hands-on GitOps Patterns for Helm Users
Hands-on GitOps Patterns for Helm UsersHands-on GitOps Patterns for Helm Users
Hands-on GitOps Patterns for Helm Users
 
Terraform Code Reviews: Supercharged with Conftest
Terraform Code Reviews: Supercharged with ConftestTerraform Code Reviews: Supercharged with Conftest
Terraform Code Reviews: Supercharged with Conftest
 
Nanog75, Network Device Property as Code
Nanog75, Network Device Property as CodeNanog75, Network Device Property as Code
Nanog75, Network Device Property as Code
 
Gitlab ci, cncf.sk
Gitlab ci, cncf.skGitlab ci, cncf.sk
Gitlab ci, cncf.sk
 
Docker Enables DevOps
Docker Enables DevOpsDocker Enables DevOps
Docker Enables DevOps
 
Kube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul CzarkowskiKube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul Czarkowski
 
はじめての JFrog Artifactory
はじめての JFrog Artifactoryはじめての JFrog Artifactory
はじめての JFrog Artifactory
 
Netflix Open Source: Building a Distributed and Automated Open Source Program
Netflix Open Source:  Building a Distributed and Automated Open Source ProgramNetflix Open Source:  Building a Distributed and Automated Open Source Program
Netflix Open Source: Building a Distributed and Automated Open Source Program
 

Similar to {py}gradle

APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
apidays
 
Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0
Diego Zuluaga
 
Django Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python DevelopersDjango Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python Developers
Rosario Renga
 
Introduction to Gradio library in python.pptx
Introduction to Gradio library in python.pptxIntroduction to Gradio library in python.pptx
Introduction to Gradio library in python.pptx
vahid67ebrahimian
 
.NET Application Modernization with PAS and Azure DevOps
.NET Application Modernization with PAS and Azure DevOps.NET Application Modernization with PAS and Azure DevOps
.NET Application Modernization with PAS and Azure DevOps
VMware Tanzu
 
Nitin devops
Nitin devopsNitin devops
Nitin devops
Nitin Mahajan
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
Roberto Pérez Alcolea
 
MOBILE APP DEVELOPMENT USING PYTHON
MOBILE APP DEVELOPMENT USING PYTHONMOBILE APP DEVELOPMENT USING PYTHON
MOBILE APP DEVELOPMENT USING PYTHON
PriyadharshiniVS
 
MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...
MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...
MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...
Jitendra Bafna
 
Top 10 python frameworks for web development in 2020
Top 10 python frameworks for web development in 2020Top 10 python frameworks for web development in 2020
Top 10 python frameworks for web development in 2020
Alaina Carter
 
Introduction To Development And Operations
Introduction To Development And OperationsIntroduction To Development And Operations
Introduction To Development And Operations
teekhesawaal
 
Weave GitOps - continuous delivery for any Kubernetes
Weave GitOps - continuous delivery for any KubernetesWeave GitOps - continuous delivery for any Kubernetes
Weave GitOps - continuous delivery for any Kubernetes
Weaveworks
 
Python AWS Expert Engineer (Consultant/Freelancer)
Python AWS Expert Engineer (Consultant/Freelancer)Python AWS Expert Engineer (Consultant/Freelancer)
Python AWS Expert Engineer (Consultant/Freelancer)
Saurabh Jaiswal
 
PRATIK MUNDRA
PRATIK MUNDRAPRATIK MUNDRA
PRATIK MUNDRA
pratik mundra
 
Heroku for-team-collaboration
Heroku for-team-collaborationHeroku for-team-collaboration
Heroku for-team-collaboration
John Stevenson
 
Heroku for team collaboration
Heroku for team collaborationHeroku for team collaboration
Heroku for team collaboration
John Stevenson
 
Rajiv Profile
Rajiv ProfileRajiv Profile
Rajiv Profile
Rajiv Joseph
 
Top 10 Best DevOps tools in 2020
Top 10 Best DevOps tools in 2020Top 10 Best DevOps tools in 2020
Top 10 Best DevOps tools in 2020
prafulIQBusiness
 
What's new in Gradle 4.0
What's new in Gradle 4.0What's new in Gradle 4.0
What's new in Gradle 4.0
Eric Wendelin
 
Mastinder singh visualcv_resume
Mastinder singh visualcv_resumeMastinder singh visualcv_resume
Mastinder singh visualcv_resume
Mastinder Singh
 

Similar to {py}gradle (20)

APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
 
Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0
 
Django Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python DevelopersDjango Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python Developers
 
Introduction to Gradio library in python.pptx
Introduction to Gradio library in python.pptxIntroduction to Gradio library in python.pptx
Introduction to Gradio library in python.pptx
 
.NET Application Modernization with PAS and Azure DevOps
.NET Application Modernization with PAS and Azure DevOps.NET Application Modernization with PAS and Azure DevOps
.NET Application Modernization with PAS and Azure DevOps
 
Nitin devops
Nitin devopsNitin devops
Nitin devops
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
MOBILE APP DEVELOPMENT USING PYTHON
MOBILE APP DEVELOPMENT USING PYTHONMOBILE APP DEVELOPMENT USING PYTHON
MOBILE APP DEVELOPMENT USING PYTHON
 
MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...
MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...
MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...
 
Top 10 python frameworks for web development in 2020
Top 10 python frameworks for web development in 2020Top 10 python frameworks for web development in 2020
Top 10 python frameworks for web development in 2020
 
Introduction To Development And Operations
Introduction To Development And OperationsIntroduction To Development And Operations
Introduction To Development And Operations
 
Weave GitOps - continuous delivery for any Kubernetes
Weave GitOps - continuous delivery for any KubernetesWeave GitOps - continuous delivery for any Kubernetes
Weave GitOps - continuous delivery for any Kubernetes
 
Python AWS Expert Engineer (Consultant/Freelancer)
Python AWS Expert Engineer (Consultant/Freelancer)Python AWS Expert Engineer (Consultant/Freelancer)
Python AWS Expert Engineer (Consultant/Freelancer)
 
PRATIK MUNDRA
PRATIK MUNDRAPRATIK MUNDRA
PRATIK MUNDRA
 
Heroku for-team-collaboration
Heroku for-team-collaborationHeroku for-team-collaboration
Heroku for-team-collaboration
 
Heroku for team collaboration
Heroku for team collaborationHeroku for team collaboration
Heroku for team collaboration
 
Rajiv Profile
Rajiv ProfileRajiv Profile
Rajiv Profile
 
Top 10 Best DevOps tools in 2020
Top 10 Best DevOps tools in 2020Top 10 Best DevOps tools in 2020
Top 10 Best DevOps tools in 2020
 
What's new in Gradle 4.0
What's new in Gradle 4.0What's new in Gradle 4.0
What's new in Gradle 4.0
 
Mastinder singh visualcv_resume
Mastinder singh visualcv_resumeMastinder singh visualcv_resume
Mastinder singh visualcv_resume
 

Recently uploaded

WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Jeffrey Haguewood
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
Pravash Chandra Das
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 

Recently uploaded (20)

WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 

{py}gradle

  • 1. Over the past 1.5 years LinkedIn has been using {py}gradle on over 800 different projects successfully. Given the success of these projects we are going to offer the plugin to the open source community. We plan to open source {py}gradle in it’s current state, after LinkedIn-isms are removed with a 0 major version. When it’s open sourced, we will also present the plan forward for 1.0 and beyond. OPEN SOURCE BUILDING A POLYGLOT SERVICE? A Polyglot Service has a backend API server written in Python that uses gunicorn, Flask, and other internal and external Python dependencies, it has a frontend server written in Ember.js that uses NPM under the hood, it uses Python clients generated from Rest.li interface definition language (IDL) using a Java tool, and must emit the proper metadata that our deployment system uses to configure, canary, and deploy our service. How can we build a Polyglot Service? generateJava generatePython buildJava buildEmber buildRestli buildPython build uploadMetadata publish uploadArtifacts packDeployable runPytest pipInstallDeps makeDists createVenv Gradle is an open source modular build system. Gradle started its life building JVM-based code, and gained additional traction when they moved to Android and C/C++ over the past few years. Gradle gives developers a rich API to implement plugins: the primitive units that compose a Gradle build system. A plugin developer is able to implement a DSL to model any process or language that they wish, ultimately enabling us to build polyglot build systems. A plugin can be reused, mixed and matched with other plugins, extended, configured, and more. Gradle’s plugin architecture lets us build better build systems. ABOUT GRADLE BUILD.GRADLE apply plugin: 'python' apply plugin: 'python-api-server' def insertFromFile = { filePath -> // Read a Python requirements.txt file... } dependencies { // Installation requirements from file installRequires insertFromFile('requirements.txt') // Installation requirements installRequires 'pypi:Flask:0.0.0' installRequires 'linkedin:utils:0.0.0' // Test requirements testsRequire 'pypi:mock:0.0.0' // Setup requirements setupRequires 'pypi:setuptools-git:0.0.0' // Front end static resources requirements resource project(path: ':ember-frontend', configuration: 'static') } - Dependency management for FREE! - No need to emit metadata. The build system does that for me. - Different languages work together. Some cases where Gradle works better for version conflict resolution than the traditional Python build workflow. - Python picks up a new version on each rebuild. Gradle can reproduce the builds. - Python gets version conflict for major version updates. Gradle picks up the highest. - Python gets version conflict when one branch of the graph blacklists version as bad, but another branch does not. Gradle reliably blacklists the bad version. In complex dependency systems, we may want to do what LinkedIn calls “semantic version” testing. Upon a change to D, we want to test its changes against C, F, and G. If the application does not pin all its dependencies, it can get into cascading version conflicts during dependency updates (see below). In this example we can see that C, F, and G all depend on D at dif- ferent major versions. What should we do? Dependency management happens on graphs, where nodes represent packages and edges represent ver- sions or ranges of versions on other nodes. We care about dependency management because it gives us the ability to reproduce builds and safely evolve software as it changes time over time. Dependency management is challenging to get right, and solutions exist on a spectrum. On one side, we can practice version pinning in which a dependency pins all direct and transitive dependencies. This approach achieves reproducible builds, but makes safely evolving difficult. On the other side, we can employ floating versions and only specify direct dependencies. This approach achieves fluidity in evolv- ing software but makes reproducible builds impossible and doesn’t make evolution necessarily safe. DEPENDENCY MANAGEMENT A B E D C G F A B E D C G F A B E D C G F ABOUT SEMANTIC VERSIONING [ V 1 2 5Major Minor Patch [ [ A {py}gradle project uses setuptools, vir- tualenv, and pip to maintain a development and build environment that makes use of ev- erything that a Python developer is already fa- miliar with: setup.py, setup.cfg, require- ments.txt, tox.ini, and more. A {py}gradle project looks and feels like a Python project and produces backwards-compatible artifacts that work with non-{py}gradle-based Python projects. HOW TO USE $ tree ├── build.gradle ├── gradlew ├── backend-api │ ├── build.gradle │ ├── setup.cfg │ ├── setup.py │ ├── src │ │ └── backend │ │ └── __init__.py │ ├── requirements.txt │ └── test │ └── test_backend.py ├── <subproject> │ └── ... └── settings.gradle $ ./gradlew build {py}gradle uses the power of Ivy for dependency management. Then, it goes out of your way and lets you work as a pure Python developer. After the first build, the standard virtualenv develope- ment workflow can be used. BUILD SYSTEM COMPARISON ABSTRACT As our Python development team grew over the years and the number of packages and interdepen- dencies grew from tens to hundreds to thousands, we found that we were struggling to maintain our code base using the standard tooling that was available to us: setuptools, virtualenv, and pip. At the same time, our Java development team converged on a new build system – Gradle – that al- lowed them to write extendable build logic. We found that Gradle wasn’t just for Java, and we wrote a powerful and idiomatic Python build system that reused much of the build logic as our Java peers, without changing the way our Python developers work. {py}gradle Stephen Holsapple (sholsapp@linkedin.com, , sholsapp) Zvezdan Petković (zpetkovic@linkedin.com, zvezdan) Ethan Hall (ethall@linkedin.com, ethankhall) Loren Carvalho (lcarvalho@linkedin.com, sixninetynine) Gradle Maven Ant Setuptools Buildout Pants CMake Powerful Dependency Resolution API Decoupled Dependency Metadata Ivy-based Metadata Pluggable Scriptable Human-readable Build File Natively Polyglot Generic Artifact Hosting Support (*) to a certain extent, or not easily * * * Gradle allows us to have multiple projects, each in a separate directory, for each language used. Each project uses the gradle plugin(s) specific to that language. The artifacts produced in a build of each project can be used in another project. The ordering of build tasks gives us the full control of the overall service build. For advanced use, one can exclude tasks from running, or use multiple languages in the same project.