SlideShare a Scribd company logo
1 of 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)

More Related Content

What's hot

What's hot (20)

API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid Rahimian
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid RahimianAPI Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid Rahimian
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid Rahimian
 
Nodejs functions & modules
Nodejs functions & modulesNodejs functions & modules
Nodejs functions & modules
 
Running Kafka as a Native Binary Using GraalVM with Ozan Günalp
Running Kafka as a Native Binary Using GraalVM with Ozan GünalpRunning Kafka as a Native Binary Using GraalVM with Ozan Günalp
Running Kafka as a Native Binary Using GraalVM with Ozan Günalp
 
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
 
Node.js Express
Node.js  ExpressNode.js  Express
Node.js Express
 
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
 
gRPC Overview
gRPC OverviewgRPC Overview
gRPC Overview
 
Go Programming Patterns
Go Programming PatternsGo Programming Patterns
Go Programming Patterns
 
ModSecurity and NGINX: Tuning the OWASP Core Rule Set
ModSecurity and NGINX: Tuning the OWASP Core Rule SetModSecurity and NGINX: Tuning the OWASP Core Rule Set
ModSecurity and NGINX: Tuning the OWASP Core Rule Set
 
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
 
Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.
 
Grokking TechTalk #33: High Concurrency Architecture at TIKI
Grokking TechTalk #33: High Concurrency Architecture at TIKIGrokking TechTalk #33: High Concurrency Architecture at TIKI
Grokking TechTalk #33: High Concurrency Architecture at TIKI
 
.NET에서 비동기 프로그래밍 배우기
.NET에서 비동기 프로그래밍 배우기.NET에서 비동기 프로그래밍 배우기
.NET에서 비동기 프로그래밍 배우기
 
Angular - Chapter 1 - Introduction
 Angular - Chapter 1 - Introduction Angular - Chapter 1 - Introduction
Angular - Chapter 1 - Introduction
 
History & Practices for UniRx(EN)
History & Practices for UniRx(EN)History & Practices for UniRx(EN)
History & Practices for UniRx(EN)
 
gRPC Design and Implementation
gRPC Design and ImplementationgRPC Design and Implementation
gRPC Design and Implementation
 
NodeJS - Server Side JS
NodeJS - Server Side JS NodeJS - Server Side JS
NodeJS - Server Side JS
 
Grokking Techtalk #40: Consistency and Availability tradeoff in database cluster
Grokking Techtalk #40: Consistency and Availability tradeoff in database clusterGrokking Techtalk #40: Consistency and Availability tradeoff in database cluster
Grokking Techtalk #40: Consistency and Availability tradeoff in database cluster
 
Build web apps with react js
Build web apps with react jsBuild web apps with react js
Build web apps with react js
 
Quarkus tips, tricks, and techniques
Quarkus tips, tricks, and techniquesQuarkus tips, tricks, and techniques
Quarkus tips, tricks, and techniques
 

Similar to 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
 

Similar to Accelerate Development with NX Build System (20)

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
 
Shree_Duth_Awasthi_Resume
Shree_Duth_Awasthi_ResumeShree_Duth_Awasthi_Resume
Shree_Duth_Awasthi_Resume
 

Recently uploaded

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Recently uploaded (20)

Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering Teams
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 

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

Editor's Notes

  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.