SlideShare uma empresa Scribd logo
1 de 39
Baixar para ler offline
Carton
                            Tatsuhiko Miyagawa
                           YAPC::Asia 2011 Tokyo




Friday, October 14, 2011
Managing CPAN
                            Dependencies


Friday, October 14, 2011
Case Study:
                           (Poor) Web Development




Friday, October 14, 2011
You’re writing a new web app.
                           You don’t wanna reinvent wheels.
                           Want to use as many CPAN deps.




Friday, October 14, 2011
Fine.
                            Get them from CPAN,
                           install on your machine.



Friday, October 14, 2011
>	
  cpanm	
  Web::Framework
               installed	
  LWP-­‐5.912
               installed	
  Plack-­‐0.9980
               installed	
  Web-­‐Framework-­‐1.20
               >	
  cpanm	
  JSON::Fast
               installed	
  JSON-­‐Fast-­‐1.91
               >	
  cpanm	
  MIME::Parser::XS
               installed	
  MIME-­‐Parser-­‐XS-­‐0.20




Friday, October 14, 2011
Test it...



Friday, October 14, 2011
Works? Ship it!



Friday, October 14, 2011
Deployment
                           Set up new production servers.
                                Install CPAN modules
                             (until the errors are gone)




Friday, October 14, 2011
Few weeks later...



Friday, October 14, 2011
Your website is popular!
                           Need more web servers!




Friday, October 14, 2011
Re-Deployment
                           Set up new production servers.
                                Install CPAN modules
                             (until the errors are gone)




Friday, October 14, 2011
“Crap, Web::Framework has been
                              updated to 1.4 and many APIs
                           have been changed or deprecated!”




Friday, October 14, 2011
Rollback
                            Log in to the old web server.
                            Check Perl module versions.
                           Install them on the new server.




Friday, October 14, 2011
“Crap, this author deleted
                           the version 1.20 we want.
                             Let’s go to BackPAN...”




Friday, October 14, 2011
“Crap, version 1.20 doesn’t actually work
                      with the newer LWP 6 that we just
                   installed! Have to downgrade this too...”




Friday, October 14, 2011
and so on.



Friday, October 14, 2011
What was wrong?



Friday, October 14, 2011
• Dependency declaration
                     • Isolated Perl environments
                     • Version controls/history
                     • Dependency analysis
                     • Repeatable deployments
                     • etc.

Friday, October 14, 2011
Many existing solutions
                           MyCPAN, DPAN, CPAN::Mini::Inject,
                                OrePAN, Shipwright




Friday, October 14, 2011
None of those
                           didn’t quite work for me.
                                (Or I haven’t even tried)




Friday, October 14, 2011
So I wrote a new one.



Friday, October 14, 2011
Carton
                           https://github.com/miyagawa/carton




Friday, October 14, 2011
Inspired by...



Friday, October 14, 2011
Friday, October 14, 2011
• App-specific local environment
                     • Fast and safe install
                     • Dep-tree analysis, including versions
                     • Locking module versions
                     • Easy Redeployment
                     • Single-file,VCS friendly
                     • Safe and easy rollback
Friday, October 14, 2011
Local perl environment
                                 Using local::lib and cpanm -L
                           Each app has an isolated local library path




Friday, October 14, 2011
Fast and safe install
                                       cpanm 1.5
                           Saves MYMETA.json and install meta info




Friday, October 14, 2011
Dep tree analysis
                      Rebuild the dependency tree from meta info
                        Checks if anything is missing/superflous




Friday, October 14, 2011
Locking versions
                           Versions are saved in carton.lock
                                including dependencies




Friday, October 14, 2011
Easy Redeployment
                           Reinstall exactly the same set of modules
                           on another prod/development machines.




Friday, October 14, 2011
Single-file,VCS friendly
                              You can add carton.lock to git
                           update whenever you update modules




Friday, October 14, 2011
Safe and easy rollback
                             revert the lock file and redeploy




Friday, October 14, 2011
DEMO



Friday, October 14, 2011
>	
  cpanm	
  Carton



Friday, October 14, 2011
WARNING
                           It is beta software, some features are
                           missing or not working correctly (yet).




Friday, October 14, 2011
github.com/miyagawa/carton
                                irc.perl.org #carton




Friday, October 14, 2011
Questions?



Friday, October 14, 2011
Thanks!
                           twitter.com/miyagawa




Friday, October 14, 2011

Mais conteúdo relacionado

Destaque

Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryTatsuhiko Miyagawa
 
Deploying Plack Web Applications: OSCON 2011
Deploying Plack Web Applications: OSCON 2011Deploying Plack Web Applications: OSCON 2011
Deploying Plack Web Applications: OSCON 2011Tatsuhiko Miyagawa
 
Network Programming With Anyevent
Network Programming With AnyeventNetwork Programming With Anyevent
Network Programming With AnyeventPedro Melo
 
No Hugging, No Learning
No Hugging, No LearningNo Hugging, No Learning
No Hugging, No LearningOlaf Alders
 
Wight: Phantom’s Perl friend - YAPC::Asia 2012
Wight: Phantom’s Perl friend - YAPC::Asia 2012Wight: Phantom’s Perl friend - YAPC::Asia 2012
Wight: Phantom’s Perl friend - YAPC::Asia 2012Hiroshi Shibamura
 

Destaque (9)

Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
 
Deploying Plack Web Applications: OSCON 2011
Deploying Plack Web Applications: OSCON 2011Deploying Plack Web Applications: OSCON 2011
Deploying Plack Web Applications: OSCON 2011
 
CPAN Realtime feed
CPAN Realtime feedCPAN Realtime feed
CPAN Realtime feed
 
Intro to PSGI and Plack
Intro to PSGI and PlackIntro to PSGI and Plack
Intro to PSGI and Plack
 
Tatsumaki
TatsumakiTatsumaki
Tatsumaki
 
Network Programming With Anyevent
Network Programming With AnyeventNetwork Programming With Anyevent
Network Programming With Anyevent
 
No Hugging, No Learning
No Hugging, No LearningNo Hugging, No Learning
No Hugging, No Learning
 
ZeroMQ in PHP
ZeroMQ in PHPZeroMQ in PHP
ZeroMQ in PHP
 
Wight: Phantom’s Perl friend - YAPC::Asia 2012
Wight: Phantom’s Perl friend - YAPC::Asia 2012Wight: Phantom’s Perl friend - YAPC::Asia 2012
Wight: Phantom’s Perl friend - YAPC::Asia 2012
 

Semelhante a Carton CPAN dependency manager

DevOps Introduction @Cegeka
DevOps Introduction @CegekaDevOps Introduction @Cegeka
DevOps Introduction @Cegekadieterdm
 
Oop design magma rails 2011
Oop design   magma rails 2011Oop design   magma rails 2011
Oop design magma rails 2011MagmaConf
 
Conquistando el Servidor con Node.JS
Conquistando el Servidor con Node.JSConquistando el Servidor con Node.JS
Conquistando el Servidor con Node.JSCaridy Patino
 
Puppet camp europe 2011 hackability
Puppet camp europe 2011   hackabilityPuppet camp europe 2011   hackability
Puppet camp europe 2011 hackabilityPuppet
 
Ruby hollywood
Ruby hollywoodRuby hollywood
Ruby hollywoodehuard
 
The Fast, The Slow and the Lazy
The Fast, The Slow and the LazyThe Fast, The Slow and the Lazy
The Fast, The Slow and the LazyMaurício Linhares
 
Intro to Micro-frameworks
Intro to Micro-frameworksIntro to Micro-frameworks
Intro to Micro-frameworksjsmith92
 
Debugging LAMP Apps on Linux/UNIX Using Open Source Tools - Jess Portnot - OS...
Debugging LAMP Apps on Linux/UNIX Using Open Source Tools - Jess Portnot - OS...Debugging LAMP Apps on Linux/UNIX Using Open Source Tools - Jess Portnot - OS...
Debugging LAMP Apps on Linux/UNIX Using Open Source Tools - Jess Portnot - OS...Zohar Babin
 
WTF Is Messaging And Why You Should Use It?
WTF Is Messaging And Why You Should Use It?WTF Is Messaging And Why You Should Use It?
WTF Is Messaging And Why You Should Use It?James Russell
 
Introduction to JavaScriptMVC
Introduction to JavaScriptMVCIntroduction to JavaScriptMVC
Introduction to JavaScriptMVCPedro Pimentel
 
node.js for front-end developers
node.js for front-end developersnode.js for front-end developers
node.js for front-end developersGarann Means
 
Errors and handling them. YOW nights Sydney 2011
Errors and handling them. YOW nights Sydney 2011Errors and handling them. YOW nights Sydney 2011
Errors and handling them. YOW nights Sydney 2011Michael Neale
 
Error Handling Done Differently
Error Handling Done DifferentlyError Handling Done Differently
Error Handling Done DifferentlyCloudBees
 
JavaSE - The road forward
JavaSE - The road forwardJavaSE - The road forward
JavaSE - The road forwardeug3n_cojocaru
 
AppScale Talk at SBonRails
AppScale Talk at SBonRailsAppScale Talk at SBonRails
AppScale Talk at SBonRailsChris Bunch
 

Semelhante a Carton CPAN dependency manager (20)

DevOps Introduction @Cegeka
DevOps Introduction @CegekaDevOps Introduction @Cegeka
DevOps Introduction @Cegeka
 
Oop design magma rails 2011
Oop design   magma rails 2011Oop design   magma rails 2011
Oop design magma rails 2011
 
Caridy patino - node-js
Caridy patino - node-jsCaridy patino - node-js
Caridy patino - node-js
 
Conquistando el Servidor con Node.JS
Conquistando el Servidor con Node.JSConquistando el Servidor con Node.JS
Conquistando el Servidor con Node.JS
 
Puppet camp europe 2011 hackability
Puppet camp europe 2011   hackabilityPuppet camp europe 2011   hackability
Puppet camp europe 2011 hackability
 
Ruby hollywood
Ruby hollywoodRuby hollywood
Ruby hollywood
 
The Fast, The Slow and the Lazy
The Fast, The Slow and the LazyThe Fast, The Slow and the Lazy
The Fast, The Slow and the Lazy
 
Intro to Micro-frameworks
Intro to Micro-frameworksIntro to Micro-frameworks
Intro to Micro-frameworks
 
Debugging LAMP Apps on Linux/UNIX Using Open Source Tools - Jess Portnot - OS...
Debugging LAMP Apps on Linux/UNIX Using Open Source Tools - Jess Portnot - OS...Debugging LAMP Apps on Linux/UNIX Using Open Source Tools - Jess Portnot - OS...
Debugging LAMP Apps on Linux/UNIX Using Open Source Tools - Jess Portnot - OS...
 
WTF Is Messaging And Why You Should Use It?
WTF Is Messaging And Why You Should Use It?WTF Is Messaging And Why You Should Use It?
WTF Is Messaging And Why You Should Use It?
 
Introduction to JavaScriptMVC
Introduction to JavaScriptMVCIntroduction to JavaScriptMVC
Introduction to JavaScriptMVC
 
Groke
GrokeGroke
Groke
 
node.js for front-end developers
node.js for front-end developersnode.js for front-end developers
node.js for front-end developers
 
Secrets of the GWT
Secrets of the GWTSecrets of the GWT
Secrets of the GWT
 
Errors and handling them. YOW nights Sydney 2011
Errors and handling them. YOW nights Sydney 2011Errors and handling them. YOW nights Sydney 2011
Errors and handling them. YOW nights Sydney 2011
 
Error Handling Done Differently
Error Handling Done DifferentlyError Handling Done Differently
Error Handling Done Differently
 
JavaSE - The road forward
JavaSE - The road forwardJavaSE - The road forward
JavaSE - The road forward
 
Namesmatter
NamesmatterNamesmatter
Namesmatter
 
AppScale Talk at SBonRails
AppScale Talk at SBonRailsAppScale Talk at SBonRails
AppScale Talk at SBonRails
 
CommonJS Frameworks
CommonJS FrameworksCommonJS Frameworks
CommonJS Frameworks
 

Mais de Tatsuhiko Miyagawa

Plack perl superglue for web frameworks and servers
Plack perl superglue for web frameworks and serversPlack perl superglue for web frameworks and servers
Plack perl superglue for web frameworks and serversTatsuhiko Miyagawa
 
Asynchronous programming with AnyEvent
Asynchronous programming with AnyEventAsynchronous programming with AnyEvent
Asynchronous programming with AnyEventTatsuhiko Miyagawa
 
Building a desktop app with HTTP::Engine, SQLite and jQuery
Building a desktop app with HTTP::Engine, SQLite and jQueryBuilding a desktop app with HTTP::Engine, SQLite and jQuery
Building a desktop app with HTTP::Engine, SQLite and jQueryTatsuhiko Miyagawa
 
Why Open Matters It Pro Challenge 2008
Why Open Matters It Pro Challenge 2008Why Open Matters It Pro Challenge 2008
Why Open Matters It Pro Challenge 2008Tatsuhiko Miyagawa
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked aboutTatsuhiko Miyagawa
 
Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Tatsuhiko Miyagawa
 
Plagger the duct tape of internet
Plagger the duct tape of internetPlagger the duct tape of internet
Plagger the duct tape of internetTatsuhiko Miyagawa
 
Tilting Google Maps and MissileLauncher
Tilting Google Maps and MissileLauncherTilting Google Maps and MissileLauncher
Tilting Google Maps and MissileLauncherTatsuhiko Miyagawa
 

Mais de Tatsuhiko Miyagawa (20)

Plack at OSCON 2010
Plack at OSCON 2010Plack at OSCON 2010
Plack at OSCON 2010
 
cpanminus at YAPC::NA 2010
cpanminus at YAPC::NA 2010cpanminus at YAPC::NA 2010
cpanminus at YAPC::NA 2010
 
Plack at YAPC::NA 2010
Plack at YAPC::NA 2010Plack at YAPC::NA 2010
Plack at YAPC::NA 2010
 
PSGI/Plack OSDC.TW
PSGI/Plack OSDC.TWPSGI/Plack OSDC.TW
PSGI/Plack OSDC.TW
 
Plack perl superglue for web frameworks and servers
Plack perl superglue for web frameworks and serversPlack perl superglue for web frameworks and servers
Plack perl superglue for web frameworks and servers
 
Plack - LPW 2009
Plack - LPW 2009Plack - LPW 2009
Plack - LPW 2009
 
Asynchronous programming with AnyEvent
Asynchronous programming with AnyEventAsynchronous programming with AnyEvent
Asynchronous programming with AnyEvent
 
Building a desktop app with HTTP::Engine, SQLite and jQuery
Building a desktop app with HTTP::Engine, SQLite and jQueryBuilding a desktop app with HTTP::Engine, SQLite and jQuery
Building a desktop app with HTTP::Engine, SQLite and jQuery
 
Remedie OSDC.TW
Remedie OSDC.TWRemedie OSDC.TW
Remedie OSDC.TW
 
Why Open Matters It Pro Challenge 2008
Why Open Matters It Pro Challenge 2008Why Open Matters It Pro Challenge 2008
Why Open Matters It Pro Challenge 2008
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked about
 
Web::Scraper for SF.pm LT
Web::Scraper for SF.pm LTWeb::Scraper for SF.pm LT
Web::Scraper for SF.pm LT
 
Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8
 
Web::Scraper
Web::ScraperWeb::Scraper
Web::Scraper
 
XML::Liberal
XML::LiberalXML::Liberal
XML::Liberal
 
Test::Base
Test::BaseTest::Base
Test::Base
 
Hacking Vox and Plagger
Hacking Vox and PlaggerHacking Vox and Plagger
Hacking Vox and Plagger
 
Plagger the duct tape of internet
Plagger the duct tape of internetPlagger the duct tape of internet
Plagger the duct tape of internet
 
Tilting Google Maps and MissileLauncher
Tilting Google Maps and MissileLauncherTilting Google Maps and MissileLauncher
Tilting Google Maps and MissileLauncher
 
Writing Pluggable Software
Writing Pluggable SoftwareWriting Pluggable Software
Writing Pluggable Software
 

Último

[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
QMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdfQMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdfROWELL MARQUINA
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
Français Patch Tuesday - Avril
Français Patch Tuesday - AvrilFrançais Patch Tuesday - Avril
Français Patch Tuesday - AvrilIvanti
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
WomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyoneWomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyoneUiPathCommunity
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFMichael Gough
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 

Último (20)

[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
QMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdfQMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdf
 
How Tech Giants Cut Corners to Harvest Data for A.I.
How Tech Giants Cut Corners to Harvest Data for A.I.How Tech Giants Cut Corners to Harvest Data for A.I.
How Tech Giants Cut Corners to Harvest Data for A.I.
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
Français Patch Tuesday - Avril
Français Patch Tuesday - AvrilFrançais Patch Tuesday - Avril
Français Patch Tuesday - Avril
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
WomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyoneWomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyone
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 

Carton CPAN dependency manager

  • 1. Carton Tatsuhiko Miyagawa YAPC::Asia 2011 Tokyo Friday, October 14, 2011
  • 2. Managing CPAN Dependencies Friday, October 14, 2011
  • 3. Case Study: (Poor) Web Development Friday, October 14, 2011
  • 4. You’re writing a new web app. You don’t wanna reinvent wheels. Want to use as many CPAN deps. Friday, October 14, 2011
  • 5. Fine. Get them from CPAN, install on your machine. Friday, October 14, 2011
  • 6. >  cpanm  Web::Framework installed  LWP-­‐5.912 installed  Plack-­‐0.9980 installed  Web-­‐Framework-­‐1.20 >  cpanm  JSON::Fast installed  JSON-­‐Fast-­‐1.91 >  cpanm  MIME::Parser::XS installed  MIME-­‐Parser-­‐XS-­‐0.20 Friday, October 14, 2011
  • 8. Works? Ship it! Friday, October 14, 2011
  • 9. Deployment Set up new production servers. Install CPAN modules (until the errors are gone) Friday, October 14, 2011
  • 10. Few weeks later... Friday, October 14, 2011
  • 11. Your website is popular! Need more web servers! Friday, October 14, 2011
  • 12. Re-Deployment Set up new production servers. Install CPAN modules (until the errors are gone) Friday, October 14, 2011
  • 13. “Crap, Web::Framework has been updated to 1.4 and many APIs have been changed or deprecated!” Friday, October 14, 2011
  • 14. Rollback Log in to the old web server. Check Perl module versions. Install them on the new server. Friday, October 14, 2011
  • 15. “Crap, this author deleted the version 1.20 we want. Let’s go to BackPAN...” Friday, October 14, 2011
  • 16. “Crap, version 1.20 doesn’t actually work with the newer LWP 6 that we just installed! Have to downgrade this too...” Friday, October 14, 2011
  • 17. and so on. Friday, October 14, 2011
  • 18. What was wrong? Friday, October 14, 2011
  • 19. • Dependency declaration • Isolated Perl environments • Version controls/history • Dependency analysis • Repeatable deployments • etc. Friday, October 14, 2011
  • 20. Many existing solutions MyCPAN, DPAN, CPAN::Mini::Inject, OrePAN, Shipwright Friday, October 14, 2011
  • 21. None of those didn’t quite work for me. (Or I haven’t even tried) Friday, October 14, 2011
  • 22. So I wrote a new one. Friday, October 14, 2011
  • 23. Carton https://github.com/miyagawa/carton Friday, October 14, 2011
  • 26. • App-specific local environment • Fast and safe install • Dep-tree analysis, including versions • Locking module versions • Easy Redeployment • Single-file,VCS friendly • Safe and easy rollback Friday, October 14, 2011
  • 27. Local perl environment Using local::lib and cpanm -L Each app has an isolated local library path Friday, October 14, 2011
  • 28. Fast and safe install cpanm 1.5 Saves MYMETA.json and install meta info Friday, October 14, 2011
  • 29. Dep tree analysis Rebuild the dependency tree from meta info Checks if anything is missing/superflous Friday, October 14, 2011
  • 30. Locking versions Versions are saved in carton.lock including dependencies Friday, October 14, 2011
  • 31. Easy Redeployment Reinstall exactly the same set of modules on another prod/development machines. Friday, October 14, 2011
  • 32. Single-file,VCS friendly You can add carton.lock to git update whenever you update modules Friday, October 14, 2011
  • 33. Safe and easy rollback revert the lock file and redeploy Friday, October 14, 2011
  • 35. >  cpanm  Carton Friday, October 14, 2011
  • 36. WARNING It is beta software, some features are missing or not working correctly (yet). Friday, October 14, 2011
  • 37. github.com/miyagawa/carton irc.perl.org #carton Friday, October 14, 2011
  • 39. Thanks! twitter.com/miyagawa Friday, October 14, 2011