SlideShare a Scribd company logo
1 of 15
Download to read offline
DevOps and Node.js
Chetan Desai, Intuit
DevOps Architect, TurboTax
@chetanddesai 11/17/2015
Intuit’s SOA
Application Services
Capability Services
Utility Services
User Experience Multi-device user experiences (cares about layout)
Application specific services (data interaction for UX)
Re-usable capabilities across applications (tax engine)
Data platform type services (login & identity)
My First Reaction
•  I come from deploying in containers like JBoss &
Tomcat
•  What do you mean the whole thing dies if there is an
exception?!
–  Run 30 million+ customers through it.
•  Consult some experts: NodeSource
•  Our DevOps practices was integral to our success
Enterprise Considerations
1.  Shared build farms
2.  Build once / deploy multiple times
3.  Minimize failure points during deployment
4.  Availability
Shared Build Farms
Problem: global npm dependencies
•  npm WARN prefer global <pkgName>@<ver> should be
installed with –g
–  No root access or sudo privileges
–  Other node services with different versions
CLI Tools
•  Solution: package.json
npm scripts!
•  Add global
dependencies to
devDependencies
section
•  Add your CLI calls as
npm scripts
•  Execute Scripts
–  npm run <script>
The power of the package.json
Other Benefits
1.  Local setup documentation:
- scripts for building, testing, running.
2.  Obtain consistency between developer workstations
- at least compatible
3.  Works in shared build environments!
- dependencies localized
Build Once / Deploy Multiple
•  Reproducibility is a requirement
•  Problem: Transitive Dependencies in package.json
•  semver major.minor.patch
–  ~1.1.1 "Approximately equivalent to version”
–  ^1.1.1 "Compatible with version”
–  1.1.1 "Specific version”
•  Did you install version 2.0.0 or version 2.0.0?
npm shrinkwrap
•  Solution: npm shrinkwrap –dev
–  Full transitive dependency list and versions installed
•  Somewhere in the middle
–  Don’t check in shrinkwrap.json
–  Generate it once at build time
•  How to balance dev speed and compliance?
|-----------------------------------------|
Developer Speed Reproducibility / Compliance
Fast & Reliable Deployments
•  Problem:
–  massive node_modules folder compared to the code size
–  dependency on an npm registry
•  Solution:
–  Our build OS (RHEL) is same as runtime OS
–  Reduce size of node_modules with npm prune –production
–  Zip up the remaining contents with service code
•  Never run npm at deployment time
Availability
•  Problem: Process
Management
–  Let it die and restart
–  Lots of options: pm2,
forever, strongloop pm,
cluster
•  http://strong-pm.io/
compare/
Availability
•  Solution: Who can manage processes better than the OS
itself?
–  RHEL6 upstart & RHEL7 systemd
–  Enterprises have heterogeneous set of languages
•  Deploy & monitor features needs to work across stack
•  Upstart Approach
–  Multiple stateless processes, 1:1 with CPUs
–  Load balanced & SSL termination with nginx
–  If the process dies, upstart restarts it
•  Configurable respawn window
•  Splunk for log monitoring
Recap: Enterprise Considerations
1.  Shared build farms
- local dependencies and npm scripts
2.  Build once / deploy multiple times
- zip and version deployable with modules
- shrinkwrap for reproducibility
3.  Minimize failure points during deployment
- only run npm at build time
4.  Availability
- upstart (RHEL6), systemd (RHEL7)
The solutions will evolve…
continue the conversation.
Thank you!
Chetan Desai, Intuit
DevOps Architect
@chetanddesai

More Related Content

Viewers also liked

MySQL 5.7: Focus on Replication
MySQL 5.7: Focus on ReplicationMySQL 5.7: Focus on Replication
MySQL 5.7: Focus on ReplicationMario Beck
 
Self evaluation
Self evaluationSelf evaluation
Self evaluationMulkacE147
 
UTE_Marco Teran _Gonzalo Remache_Fortalecer las Capacidades y Potencialidades...
UTE_Marco Teran _Gonzalo Remache_Fortalecer las Capacidades y Potencialidades...UTE_Marco Teran _Gonzalo Remache_Fortalecer las Capacidades y Potencialidades...
UTE_Marco Teran _Gonzalo Remache_Fortalecer las Capacidades y Potencialidades...Marco Terán
 
食品と科学Vol.54 no.10「迷路から抜け出す問題解決の第一歩」
食品と科学Vol.54 no.10「迷路から抜け出す問題解決の第一歩」食品と科学Vol.54 no.10「迷路から抜け出す問題解決の第一歩」
食品と科学Vol.54 no.10「迷路から抜け出す問題解決の第一歩」YUMIKO HIRAI
 
10 Amazon Sponsored Ads Myths You Show Know About
10 Amazon Sponsored Ads Myths You Show Know About10 Amazon Sponsored Ads Myths You Show Know About
10 Amazon Sponsored Ads Myths You Show Know AboutDanny Mac
 
Amazon VPC Best Practices 2016
Amazon VPC Best Practices 2016Amazon VPC Best Practices 2016
Amazon VPC Best Practices 2016AWSBulgaria
 
Active teaching quick learning 8th Class Maths
Active teaching  quick learning 8th Class Maths Active teaching  quick learning 8th Class Maths
Active teaching quick learning 8th Class Maths Karnataka OER
 
(DEV202) Under the Desk to the AWS Cloud with Windows PowerShell
(DEV202) Under the Desk to the AWS Cloud with Windows PowerShell(DEV202) Under the Desk to the AWS Cloud with Windows PowerShell
(DEV202) Under the Desk to the AWS Cloud with Windows PowerShellAmazon Web Services
 
Network Security and Access Control in AWS
Network Security and Access Control in AWSNetwork Security and Access Control in AWS
Network Security and Access Control in AWSAmazon Web Services
 
Building Scalable Services with Amazon API Gateway - Technical 201
Building Scalable Services with Amazon API Gateway - Technical 201Building Scalable Services with Amazon API Gateway - Technical 201
Building Scalable Services with Amazon API Gateway - Technical 201Amazon Web Services
 
Rol del ingeniero industrial del peru frente a
Rol del ingeniero industrial del peru  frente aRol del ingeniero industrial del peru  frente a
Rol del ingeniero industrial del peru frente aluisc1001
 
Women's Access to Healthcare - Georgia CORE Presentation
Women's Access to Healthcare - Georgia CORE PresentationWomen's Access to Healthcare - Georgia CORE Presentation
Women's Access to Healthcare - Georgia CORE PresentationGeorgia Commission on Women
 

Viewers also liked (12)

MySQL 5.7: Focus on Replication
MySQL 5.7: Focus on ReplicationMySQL 5.7: Focus on Replication
MySQL 5.7: Focus on Replication
 
Self evaluation
Self evaluationSelf evaluation
Self evaluation
 
UTE_Marco Teran _Gonzalo Remache_Fortalecer las Capacidades y Potencialidades...
UTE_Marco Teran _Gonzalo Remache_Fortalecer las Capacidades y Potencialidades...UTE_Marco Teran _Gonzalo Remache_Fortalecer las Capacidades y Potencialidades...
UTE_Marco Teran _Gonzalo Remache_Fortalecer las Capacidades y Potencialidades...
 
食品と科学Vol.54 no.10「迷路から抜け出す問題解決の第一歩」
食品と科学Vol.54 no.10「迷路から抜け出す問題解決の第一歩」食品と科学Vol.54 no.10「迷路から抜け出す問題解決の第一歩」
食品と科学Vol.54 no.10「迷路から抜け出す問題解決の第一歩」
 
10 Amazon Sponsored Ads Myths You Show Know About
10 Amazon Sponsored Ads Myths You Show Know About10 Amazon Sponsored Ads Myths You Show Know About
10 Amazon Sponsored Ads Myths You Show Know About
 
Amazon VPC Best Practices 2016
Amazon VPC Best Practices 2016Amazon VPC Best Practices 2016
Amazon VPC Best Practices 2016
 
Active teaching quick learning 8th Class Maths
Active teaching  quick learning 8th Class Maths Active teaching  quick learning 8th Class Maths
Active teaching quick learning 8th Class Maths
 
(DEV202) Under the Desk to the AWS Cloud with Windows PowerShell
(DEV202) Under the Desk to the AWS Cloud with Windows PowerShell(DEV202) Under the Desk to the AWS Cloud with Windows PowerShell
(DEV202) Under the Desk to the AWS Cloud with Windows PowerShell
 
Network Security and Access Control in AWS
Network Security and Access Control in AWSNetwork Security and Access Control in AWS
Network Security and Access Control in AWS
 
Building Scalable Services with Amazon API Gateway - Technical 201
Building Scalable Services with Amazon API Gateway - Technical 201Building Scalable Services with Amazon API Gateway - Technical 201
Building Scalable Services with Amazon API Gateway - Technical 201
 
Rol del ingeniero industrial del peru frente a
Rol del ingeniero industrial del peru  frente aRol del ingeniero industrial del peru  frente a
Rol del ingeniero industrial del peru frente a
 
Women's Access to Healthcare - Georgia CORE Presentation
Women's Access to Healthcare - Georgia CORE PresentationWomen's Access to Healthcare - Georgia CORE Presentation
Women's Access to Healthcare - Georgia CORE Presentation
 

Recently uploaded

WSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration ToolingWSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration ToolingWSO2
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AIAGATSoftware
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Eraconfluent
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNeo4j
 
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2
 
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...WSO2
 

Recently uploaded (20)

Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
 
WSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration ToolingWSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration Tooling
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital Businesses
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMs
 
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
 
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
 

DevOps and Node.js

  • 1. DevOps and Node.js Chetan Desai, Intuit DevOps Architect, TurboTax @chetanddesai 11/17/2015
  • 2. Intuit’s SOA Application Services Capability Services Utility Services User Experience Multi-device user experiences (cares about layout) Application specific services (data interaction for UX) Re-usable capabilities across applications (tax engine) Data platform type services (login & identity)
  • 3. My First Reaction •  I come from deploying in containers like JBoss & Tomcat •  What do you mean the whole thing dies if there is an exception?! –  Run 30 million+ customers through it. •  Consult some experts: NodeSource •  Our DevOps practices was integral to our success
  • 4. Enterprise Considerations 1.  Shared build farms 2.  Build once / deploy multiple times 3.  Minimize failure points during deployment 4.  Availability
  • 5. Shared Build Farms Problem: global npm dependencies •  npm WARN prefer global <pkgName>@<ver> should be installed with –g –  No root access or sudo privileges –  Other node services with different versions
  • 6. CLI Tools •  Solution: package.json npm scripts! •  Add global dependencies to devDependencies section •  Add your CLI calls as npm scripts •  Execute Scripts –  npm run <script>
  • 7. The power of the package.json Other Benefits 1.  Local setup documentation: - scripts for building, testing, running. 2.  Obtain consistency between developer workstations - at least compatible 3.  Works in shared build environments! - dependencies localized
  • 8. Build Once / Deploy Multiple •  Reproducibility is a requirement •  Problem: Transitive Dependencies in package.json •  semver major.minor.patch –  ~1.1.1 "Approximately equivalent to version” –  ^1.1.1 "Compatible with version” –  1.1.1 "Specific version” •  Did you install version 2.0.0 or version 2.0.0?
  • 9. npm shrinkwrap •  Solution: npm shrinkwrap –dev –  Full transitive dependency list and versions installed •  Somewhere in the middle –  Don’t check in shrinkwrap.json –  Generate it once at build time •  How to balance dev speed and compliance? |-----------------------------------------| Developer Speed Reproducibility / Compliance
  • 10. Fast & Reliable Deployments •  Problem: –  massive node_modules folder compared to the code size –  dependency on an npm registry •  Solution: –  Our build OS (RHEL) is same as runtime OS –  Reduce size of node_modules with npm prune –production –  Zip up the remaining contents with service code •  Never run npm at deployment time
  • 11. Availability •  Problem: Process Management –  Let it die and restart –  Lots of options: pm2, forever, strongloop pm, cluster •  http://strong-pm.io/ compare/
  • 12. Availability •  Solution: Who can manage processes better than the OS itself? –  RHEL6 upstart & RHEL7 systemd –  Enterprises have heterogeneous set of languages •  Deploy & monitor features needs to work across stack •  Upstart Approach –  Multiple stateless processes, 1:1 with CPUs –  Load balanced & SSL termination with nginx –  If the process dies, upstart restarts it •  Configurable respawn window •  Splunk for log monitoring
  • 13. Recap: Enterprise Considerations 1.  Shared build farms - local dependencies and npm scripts 2.  Build once / deploy multiple times - zip and version deployable with modules - shrinkwrap for reproducibility 3.  Minimize failure points during deployment - only run npm at build time 4.  Availability - upstart (RHEL6), systemd (RHEL7)
  • 14. The solutions will evolve… continue the conversation.
  • 15. Thank you! Chetan Desai, Intuit DevOps Architect @chetanddesai