SlideShare une entreprise Scribd logo
1  sur  18
Accelerate
Development with
NX Build System
Present by Thien Ly
March 29, 2023
Table of content
* Intro to Nx
- Concept of Nx
- Pros and cons
- Compare Nx to other alternatives
* Demo
- How to config and use Nx in monorepo
- Inherit the caching benefits of Nx
- Write and apply a Nx task executor (ft. keystone-6 CLI)
Introduction to
NX build system
Introduction to NX build system
Nx is a smart, fast and extensible build system with first class monorepo
support and powerful integrations.
Goals:
- Speed up your existing workflow with minimum effort.
- Provide a first-rate developer experience (DX) no matter the size of the
repo.
Main concepts
Main concepts
> Nx is like the VSCode of build tools. The core of Nx enables project and
task graph creation and analysis, orchestration and execution of tasks,
computation caching, and code generation. Nx plugins extend this
functionality and are built on top of the underlying Nx Devkit
https://nx.dev/plugin-features/create-your-own-plugin#create-your-own-plugin
Main concepts
- Based on the concept of a monorepo which includes many projects
- Incremental builds
- Ability to manage dependencies (and workspace visualizations)
- Reducing the need for duplicative code (especially in setup)
- Provide tools(aka NX plugins) to help enforce best practices
- Generators: scaffolding source, updating your configuration files
- Executors: perform actions on dev’s code; can include building, linting, testing,
serving…
Pros and cons
Pros of NX
● Improved Productivity
● Scalability
● Consistency
● Customization: custom plugins, generators, and executors
Cons of NX
● Steep Learning Curve
● Higher Overhead: The added complexity of NX Build System can result in a
higher overhead, requiring more time and resources to set up and maintain
compared to simpler build systems.
Comparison
Comparison: Nx vs alternatives
1. Yarn workspaces, Lerna
Nx and Yarn workspaces are complementary, so it makes sense to use
both in some situations
Therefore, they are also complementary.
- YW main features: linking dependencies, unifize modules,...
- Lerna main features: bootstrapping and publishing library with npm
registry, npm version tooling,..
Comparison: Nx vs Turborepo
2. Nx Vs Turborepo (according to the article https://nx.dev/more-concepts/turbo-
and-nx)
Same features:
- Incremental Adoption
- Project graph visualization
- Detecting affected projects/packages
- Local task coordination
- Local computation caching
- Distributed computation caching
Comparison: Nx vs Turborepo
Not available on Turborepo:
- Distributed task execution
- Editor support
- Separate configurations
- Transparency terminal output
- Customizable workflow plugins
- Nx has bigger community
Comparison: Nx vs Turborepo
Performance:
Nx is better.
See:
- https://github.com/vsavkin/large-monorepo/#benchmarking-nx-turbo-and-lerna
- https://nx.dev/more-concepts/turbo-and-nx#tech-and-performance
Nx uses NodeJS with C++ modules and tree-diffing algo (like React.js) to restrict almost
all unnecessary IO tasks.
Turborepo uses Golang. All the caches will blow up on every update if not match cache
hashes.
Demo
Demonstrations
● Setup a Nx Package-based Repository
● Setup caching and and build separation
● Task executor with keystone CLI
Gracias ♡ ~
((Q&&A)||SIGTERM)

Contenu connexe

Tendances

The Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps ToolkitThe Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps Toolkit
Weaveworks
 
Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks.pdf
Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks.pdfRetrieval-Augmented Generation for Knowledge-Intensive NLP Tasks.pdf
Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks.pdf
Po-Chuan Chen
 

Tendances (20)

The Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps ToolkitThe Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps Toolkit
 
APACHE KAFKA / Kafka Connect / Kafka Streams
APACHE KAFKA / Kafka Connect / Kafka StreamsAPACHE KAFKA / Kafka Connect / Kafka Streams
APACHE KAFKA / Kafka Connect / Kafka Streams
 
Git flow
Git flowGit flow
Git flow
 
Gitops Hands On
Gitops Hands OnGitops Hands On
Gitops Hands On
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
 
Branching and Merging Practices
Branching and Merging Practices Branching and Merging Practices
Branching and Merging Practices
 
Building a Pipeline for State-of-the-Art Natural Language Processing Using Hu...
Building a Pipeline for State-of-the-Art Natural Language Processing Using Hu...Building a Pipeline for State-of-the-Art Natural Language Processing Using Hu...
Building a Pipeline for State-of-the-Art Natural Language Processing Using Hu...
 
Git best practices workshop
Git best practices workshopGit best practices workshop
Git best practices workshop
 
Know Your Topics – A Deep Dive on Topic IDs with KIP-516 with Justine Olshan ...
Know Your Topics – A Deep Dive on Topic IDs with KIP-516 with Justine Olshan ...Know Your Topics – A Deep Dive on Topic IDs with KIP-516 with Justine Olshan ...
Know Your Topics – A Deep Dive on Topic IDs with KIP-516 with Justine Olshan ...
 
Making Testing Easy w GitHub Copilot.pdf
Making Testing Easy w GitHub Copilot.pdfMaking Testing Easy w GitHub Copilot.pdf
Making Testing Easy w GitHub Copilot.pdf
 
REX: Cloud Native Apps on a K8S stack
REX: Cloud Native Apps on a K8S stackREX: Cloud Native Apps on a K8S stack
REX: Cloud Native Apps on a K8S stack
 
Git collaboration
Git collaborationGit collaboration
Git collaboration
 
Kafka 101
Kafka 101Kafka 101
Kafka 101
 
Gitops: the kubernetes way
Gitops: the kubernetes wayGitops: the kubernetes way
Gitops: the kubernetes way
 
Apache Kafka - Messaging System Overview
Apache Kafka - Messaging System OverviewApache Kafka - Messaging System Overview
Apache Kafka - Messaging System Overview
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Git Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-FlowGit Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-Flow
 
Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks.pdf
Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks.pdfRetrieval-Augmented Generation for Knowledge-Intensive NLP Tasks.pdf
Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks.pdf
 
Getting Started with Confluent Schema Registry
Getting Started with Confluent Schema RegistryGetting Started with Confluent Schema Registry
Getting Started with Confluent Schema Registry
 

Similaire à Accelerate Development with NX Build System

모두를 위한 MxNET - AWS Summit Seoul 2017
모두를 위한 MxNET - AWS Summit Seoul 2017모두를 위한 MxNET - AWS Summit Seoul 2017
모두를 위한 MxNET - AWS Summit Seoul 2017
Amazon Web Services Korea
 

Similaire à Accelerate Development with NX Build System (20)

Gaganjot Kaur- The Nx Workspace.docx
Gaganjot Kaur- The Nx Workspace.docxGaganjot Kaur- The Nx Workspace.docx
Gaganjot Kaur- The Nx Workspace.docx
 
Nuxeo World Session: Nuxeo Distributions
Nuxeo World Session: Nuxeo DistributionsNuxeo World Session: Nuxeo Distributions
Nuxeo World Session: Nuxeo Distributions
 
ONNX and MLflow
ONNX and MLflowONNX and MLflow
ONNX and MLflow
 
"Update on Khronos Standards for Vision and Machine Learning," a Presentation...
"Update on Khronos Standards for Vision and Machine Learning," a Presentation..."Update on Khronos Standards for Vision and Machine Learning," a Presentation...
"Update on Khronos Standards for Vision and Machine Learning," a Presentation...
 
Angular based enterprise level frontend architecture
Angular based enterprise level frontend architectureAngular based enterprise level frontend architecture
Angular based enterprise level frontend architecture
 
"New Standards for Embedded Vision and Neural Networks," a Presentation from ...
"New Standards for Embedded Vision and Neural Networks," a Presentation from ..."New Standards for Embedded Vision and Neural Networks," a Presentation from ...
"New Standards for Embedded Vision and Neural Networks," a Presentation from ...
 
모두를 위한 MxNET - AWS Summit Seoul 2017
모두를 위한 MxNET - AWS Summit Seoul 2017모두를 위한 MxNET - AWS Summit Seoul 2017
모두를 위한 MxNET - AWS Summit Seoul 2017
 
Cloud Native Applications on Kubernetes: a DevOps Approach
Cloud Native Applications on Kubernetes: a DevOps ApproachCloud Native Applications on Kubernetes: a DevOps Approach
Cloud Native Applications on Kubernetes: a DevOps Approach
 
Supercharge your next Vue app with Nuxt
Supercharge your next Vue app with NuxtSupercharge your next Vue app with Nuxt
Supercharge your next Vue app with Nuxt
 
Nuxeo Roadmap June 2012
Nuxeo Roadmap June 2012Nuxeo Roadmap June 2012
Nuxeo Roadmap June 2012
 
Google APAC Machine Learning Expert Day
Google APAC Machine Learning Expert DayGoogle APAC Machine Learning Expert Day
Google APAC Machine Learning Expert Day
 
Steps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MACSteps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MAC
 
Asterisk as a Virtual Network Function Part 1
Asterisk as a Virtual Network Function Part 1Asterisk as a Virtual Network Function Part 1
Asterisk as a Virtual Network Function Part 1
 
Differences of Deep Learning Frameworks
Differences of Deep Learning FrameworksDifferences of Deep Learning Frameworks
Differences of Deep Learning Frameworks
 
Dynamic infrastructure for development
Dynamic infrastructure for developmentDynamic infrastructure for development
Dynamic infrastructure for development
 
.Net Core
.Net Core.Net Core
.Net Core
 
Release 8.1 - Breakfast Paris
Release 8.1 - Breakfast ParisRelease 8.1 - Breakfast Paris
Release 8.1 - Breakfast Paris
 
The CNCF on Serverless
The CNCF on ServerlessThe CNCF on Serverless
The CNCF on Serverless
 
Caffe2
Caffe2Caffe2
Caffe2
 
Kubernetes presentation
Kubernetes presentationKubernetes presentation
Kubernetes presentation
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
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
 

Dernier (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
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...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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, ...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Accelerate Development with NX Build System

  • 1. Accelerate Development with NX Build System Present by Thien Ly March 29, 2023
  • 2. Table of content * Intro to Nx - Concept of Nx - Pros and cons - Compare Nx to other alternatives * Demo - How to config and use Nx in monorepo - Inherit the caching benefits of Nx - Write and apply a Nx task executor (ft. keystone-6 CLI)
  • 4. Introduction to NX build system Nx is a smart, fast and extensible build system with first class monorepo support and powerful integrations. Goals: - Speed up your existing workflow with minimum effort. - Provide a first-rate developer experience (DX) no matter the size of the repo.
  • 6. Main concepts > Nx is like the VSCode of build tools. The core of Nx enables project and task graph creation and analysis, orchestration and execution of tasks, computation caching, and code generation. Nx plugins extend this functionality and are built on top of the underlying Nx Devkit https://nx.dev/plugin-features/create-your-own-plugin#create-your-own-plugin
  • 7. Main concepts - Based on the concept of a monorepo which includes many projects - Incremental builds - Ability to manage dependencies (and workspace visualizations) - Reducing the need for duplicative code (especially in setup) - Provide tools(aka NX plugins) to help enforce best practices - Generators: scaffolding source, updating your configuration files - Executors: perform actions on dev’s code; can include building, linting, testing, serving…
  • 9. Pros of NX ● Improved Productivity ● Scalability ● Consistency ● Customization: custom plugins, generators, and executors
  • 10. Cons of NX ● Steep Learning Curve ● Higher Overhead: The added complexity of NX Build System can result in a higher overhead, requiring more time and resources to set up and maintain compared to simpler build systems.
  • 12. Comparison: Nx vs alternatives 1. Yarn workspaces, Lerna Nx and Yarn workspaces are complementary, so it makes sense to use both in some situations Therefore, they are also complementary. - YW main features: linking dependencies, unifize modules,... - Lerna main features: bootstrapping and publishing library with npm registry, npm version tooling,..
  • 13. Comparison: Nx vs Turborepo 2. Nx Vs Turborepo (according to the article https://nx.dev/more-concepts/turbo- and-nx) Same features: - Incremental Adoption - Project graph visualization - Detecting affected projects/packages - Local task coordination - Local computation caching - Distributed computation caching
  • 14. Comparison: Nx vs Turborepo Not available on Turborepo: - Distributed task execution - Editor support - Separate configurations - Transparency terminal output - Customizable workflow plugins - Nx has bigger community
  • 15. Comparison: Nx vs Turborepo Performance: Nx is better. See: - https://github.com/vsavkin/large-monorepo/#benchmarking-nx-turbo-and-lerna - https://nx.dev/more-concepts/turbo-and-nx#tech-and-performance Nx uses NodeJS with C++ modules and tree-diffing algo (like React.js) to restrict almost all unnecessary IO tasks. Turborepo uses Golang. All the caches will blow up on every update if not match cache hashes.
  • 16. Demo
  • 17. Demonstrations ● Setup a Nx Package-based Repository ● Setup caching and and build separation ● Task executor with keystone CLI

Notes de l'éditeur

  1. these projects could include the main application, libraries, and any other related projects.
  2. Improved Productivity: The modular architecture of NX Build System allows for faster and more efficient development, making it easier to build and maintain large projects. Scalability: With support for monorepos, NX Build System can handle large codebases with multiple projects, making it easier to manage dependencies and share code between projects. Consistency: By providing a consistent workflow and set of tools, NX Build System can help enforce best practices and ensure that all code is written and structured consistently. Customization: NX Build System can be easily customized using plugins, generators, and custom schematics, allowing developers to tailor the build process to their specific needs.
  3. Steep Learning Curve: Due to its complexity, NX Build System can have a steep learning curve, especially for developers who are new to monorepo architectures or the Angular framework. Higher Overhead chi phi cao: The added complexity of NX Build System can result in a higher overhead, requiring more time and resources to set up and maintain compared to simpler build systems.