SlideShare une entreprise Scribd logo
1  sur  28
Discovering the p2 API Pascal Rapicault Sonatype, p2 Lead © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 1
Who are the p2 committers? © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 2
History 3.4 / 3.5 provisional API 3.6 / Helios - first official release of the API 3.7 / Indigo - full backward compatibility © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 3
What’s new in 3.7? API New features to ease p2 consumption Simplification for RCP use case Simpler Headless API for simple cases SPI Pluggable transport Code Memory consumption improvements Inter-process locking of local repositories … © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 4
3 levels of API Graphical User Interface Headless Operations Core APIs + SPIs © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 5
Graphical User Interface GUI is SWT-based and designed to be reused in RCP / Eclipse applications.  Ease of reuse: Feature org.eclipse.equinox.p2.rcp.feature The p2.ui.sdk bundle provides SDK like UI for reuse in RCP. Compose from the p2.ui bundle Add extensions to hook where you want org.eclipse.equinox.p2.ui org.eclipse.equinox.p2.ui.sdk © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 6
Graphical User Interface © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 7
Reusing individual UI elements	 Most the pages / wizards can be reused Installed dialog    Repository management License manager Install/Update/Uninstall wizard o.e.e.p2.ui.InstalledSoftwarePage o.e.e.p2.ui.RepositoryManipulationPage o.e.e.p2.ui.AcceptLicensesWizardPage o.e.e.p2.ui.ProvisioningUtil#open*Wizard org.eclipse.equinox.p2.ui © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 8
Tweaking the existing UI The Policy class Show / hide repository selection Drill down Show categories Content of the restart dialog  … org.eclipse.equinox.p2.ui.Policy org.eclipse.equinox.p2.ui © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 9
Tweaking the existing UI © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 10
Extension / discovery UI © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 11 - Simpler for the end user ,[object Object],*Not API* o.e.e.i.p2.disc…. RepositoryDiscoveryStrategy org.eclipse.equinox.p2.discovery
More on UI reuse See examples on the p2 wiki http://wiki.eclipse.org/Equinox/p2/Examples Talk on the p2 UI http://www.eclipsecon.org/2010/sessions/?page=sessions&id=1205 © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 12
3 levels of API Graphical User Interface Headless Operations Core APIs + SPIs © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 13
Minimal headless p2 A “relatively” minimal headless p2 is available: org.eclipse.equinox.p2.core.feature Provide enough to install / update / uninstall A smaller subset can be created, but it is too specific (e.g. w/o ECF, w/o http client, w/o operations, etc.) © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 14
Headless operations High level operations to install / update / uninstall Focused on the Eclipse / OSGi use cases Encapsulates: Dependency resolution Download Modification of the system Restart org.eclipse.equinox.p2.operations org.eclipse.equinox.p2.operations © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 15
Headless operations example InstallOperation op = OperationHelper.create***Operation(iusToInstall, repoList, new NullProgressMonitor()); if (op.resolveModal(newNullProgressMonitor()).isOK()) op.getProvisioningJob(newNullProgressMonitor()).schedule(); © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 16 New in 3.7.  This API only works for the running instance (which is the case most of the time). To modify another instance, you need to use the InstallOperation directly.
3 levels of API Graphical User Interface Headless Operations Core APIs + SPIs © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 17
Core concepts installable unit/metadata query/ queryable planner repository agent engine profile registry/ profile © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 18
Repositories p2 Update Site Engine Eclipse/OSGi Native/OS Core concepts Metadata repo Artifact repo Data transfer Metadata fetched and constraints analyzed Transports Planner/Director Http/Https File system Volume Mirroring Provisioning operation requested IU install, uninstall, update operations Artifact availability and mirroring IUs configured into runtimes Profile updated Profile registry Runtimes © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 19
How do I get an IU? IUs can be obtained from Querying the metadata repository  Querying the profile Querying … Programmatically created org.eclipse.equinox.p2.metadata.MetadataFactory org.eclipse.equinox.p2.metadata © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 20
Queries / QueryableHow do I query? What is queryable? Almost everything is queryable (repository, repository manager, profile, …) How do I create a query? QueryUtil.create* Domain specific queries (e.g. in eclipse.touchpoint) p2 QL, p2-specific query language http://wiki.eclipse.org/Query_Language_for_p2 org.eclipse.equinox.p2.query.IQueryable org.eclipse.equinox.p2.query.QueryUtil org.eclipse.equinox.p2.metadata org.eclipse.equinox.p2.ql © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 21
The repository managerHow do I get a repository? Artifact / metadata repository manager Addition / removal of repositories Enable / disable repositories Load Artifact / metadata repository Add Remove Query org.eclipse.equinox.p2.repository.IMetadataRepository org.eclipse.equinox.p2.repository.IArtifactRepository o.e.e.p2.repository.IMetadataRepositoryManager o.e.e.p2.repository.IArtifactRepositoryManager org.eclipse.equinox.p2.repository © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 22
Provisioning agentHow do I get a repository manager or p2 components? The agent groups related services together It is the starting point of everything. It is the executable version of the p2 area (e.g the p2 folder in the eclipse install) Several agents can run at once in one VM. Groups the services together. Allows to change some services (see implementations of IAgentServiceFactory) If you are only dealing with the running instance: Obtain the IProvisioningAgent service from the OSGi registry Create it using the IProvisioningContext#createAgent(null) org.eclipse.equinox.p2.core.IProvisioningAgent org.eclipse.equinox.p2.core.IProvisioningAgentProvider org.eclipse.equinox.p2.core © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 23
Profile / profile registryHow do I know what is installed? A profile is the complete description in terms of IUs of what is installed. The profile registry knows about all the profiles in a given p2 area org.eclipse.equinox.p2.engine.IProfile org.eclipse.equinox.p2.engine.IProfileRegistry org.eclipse.equinox.p2.engine org.eclipse.equinox.p2.engine © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 24
What is not API? Repository serialized format Layout of files on disk under the p2 folder © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 25
Summary 3 levels of API tailored for different needs            Simple things should be simple         Complex things should be possible 	  This API is for YOU! Tell us what you think. © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 26
Thank you mailto:p2-dev@eclipse.org http://wiki.eclipse.org/Equinox/p2 © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 27
p2 related talks p2 savior or Achilles heel (Tues 4pm) http://www.eclipsecon.org/2011/sessions?id=2313 Raising p2 to the cloud (Wed 1:30pm) http://www.eclipsecon.org/2011/sessions?id=2102 Updates in the micro space (Thr 2:30pm) http://www.eclipsecon.org/2011/sessions?id=2196 Fireside chat on p2 (Wed 8:30pm) http://www.eclipsecon.org/2011/sessions?id=2473 © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 28

Contenu connexe

Tendances

Get ready for FRC 2015: Intro to Java 5 through 8 updates and Eclipse
Get ready for FRC 2015: Intro to Java 5 through 8 updates and EclipseGet ready for FRC 2015: Intro to Java 5 through 8 updates and Eclipse
Get ready for FRC 2015: Intro to Java 5 through 8 updates and EclipseJeanne Boyarsky
 
Maven Presentation - SureFire vs FailSafe
Maven Presentation - SureFire vs FailSafeMaven Presentation - SureFire vs FailSafe
Maven Presentation - SureFire vs FailSafeHolasz Kati
 
What is CocoaPods and how to setup?
What is CocoaPods and how to setup?What is CocoaPods and how to setup?
What is CocoaPods and how to setup?Milan Panchal
 
Log management (elk) for spring boot application
Log management (elk) for spring boot applicationLog management (elk) for spring boot application
Log management (elk) for spring boot applicationVadym Lotar
 
Java Builds with Maven and Ant
Java Builds with Maven and AntJava Builds with Maven and Ant
Java Builds with Maven and AntDavid Noble
 
Apache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentationApache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentationArnaud Héritier
 
Tips for better CI on Android
Tips for better CI on AndroidTips for better CI on Android
Tips for better CI on AndroidTomoaki Imai
 
Aleksandr Kutsan "Managing Dependencies in C++"
Aleksandr Kutsan "Managing Dependencies in C++"Aleksandr Kutsan "Managing Dependencies in C++"
Aleksandr Kutsan "Managing Dependencies in C++"LogeekNightUkraine
 
Maven 2 features
Maven 2 featuresMaven 2 features
Maven 2 featuresAngel Ruiz
 
Composer for Magento 1.x and Magento 2
Composer for Magento 1.x and Magento 2Composer for Magento 1.x and Magento 2
Composer for Magento 1.x and Magento 2Sergii Shymko
 
Using Maven 2
Using Maven 2Using Maven 2
Using Maven 2andyhot
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to MavenVadym Lotar
 
How to setup unit testing in Android Studio
How to setup unit testing in Android StudioHow to setup unit testing in Android Studio
How to setup unit testing in Android Studiotobiaspreuss
 
Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - ExplainedSmita Prasad
 

Tendances (20)

Get ready for FRC 2015: Intro to Java 5 through 8 updates and Eclipse
Get ready for FRC 2015: Intro to Java 5 through 8 updates and EclipseGet ready for FRC 2015: Intro to Java 5 through 8 updates and Eclipse
Get ready for FRC 2015: Intro to Java 5 through 8 updates and Eclipse
 
Apache Maven
Apache MavenApache Maven
Apache Maven
 
Maven Presentation - SureFire vs FailSafe
Maven Presentation - SureFire vs FailSafeMaven Presentation - SureFire vs FailSafe
Maven Presentation - SureFire vs FailSafe
 
Tips & Tricks for Maven Tycho
Tips & Tricks for Maven TychoTips & Tricks for Maven Tycho
Tips & Tricks for Maven Tycho
 
What is CocoaPods and how to setup?
What is CocoaPods and how to setup?What is CocoaPods and how to setup?
What is CocoaPods and how to setup?
 
Log management (elk) for spring boot application
Log management (elk) for spring boot applicationLog management (elk) for spring boot application
Log management (elk) for spring boot application
 
Java Builds with Maven and Ant
Java Builds with Maven and AntJava Builds with Maven and Ant
Java Builds with Maven and Ant
 
Apache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentationApache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentation
 
Tips for better CI on Android
Tips for better CI on AndroidTips for better CI on Android
Tips for better CI on Android
 
Aleksandr Kutsan "Managing Dependencies in C++"
Aleksandr Kutsan "Managing Dependencies in C++"Aleksandr Kutsan "Managing Dependencies in C++"
Aleksandr Kutsan "Managing Dependencies in C++"
 
Maven 2 Introduction
Maven 2 IntroductionMaven 2 Introduction
Maven 2 Introduction
 
Maven 2 features
Maven 2 featuresMaven 2 features
Maven 2 features
 
Maven
MavenMaven
Maven
 
Composer for Magento 1.x and Magento 2
Composer for Magento 1.x and Magento 2Composer for Magento 1.x and Magento 2
Composer for Magento 1.x and Magento 2
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
 
Using Maven 2
Using Maven 2Using Maven 2
Using Maven 2
 
Apache maven 2 overview
Apache maven 2 overviewApache maven 2 overview
Apache maven 2 overview
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
 
How to setup unit testing in Android Studio
How to setup unit testing in Android StudioHow to setup unit testing in Android Studio
How to setup unit testing in Android Studio
 
Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - Explained
 

Similaire à Discovery the p2 API (updated to Indigo)

Orion RESTful git API
Orion RESTful git APIOrion RESTful git API
Orion RESTful git APITomasz Zarna
 
ABC of Platform Workspace
ABC of Platform WorkspaceABC of Platform Workspace
ABC of Platform WorkspaceTomasz Zarna
 
Kolla - containerizing the cloud itself
Kolla - containerizing the cloud itselfKolla - containerizing the cloud itself
Kolla - containerizing the cloud itselfMichal Rostecki
 
Understanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profitUnderstanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profitPascal Rapicault
 
[apidays LIVE HONK KONG] - OAS to Managed API in Seconds
[apidays LIVE HONK KONG] - OAS to Managed API in Seconds[apidays LIVE HONK KONG] - OAS to Managed API in Seconds
[apidays LIVE HONK KONG] - OAS to Managed API in SecondsWSO2
 
Managing Your Runtime With P2
Managing Your Runtime With P2Managing Your Runtime With P2
Managing Your Runtime With P2Pascal Rapicault
 
David Rey Lessons Learned Updating Content Licensing To Be Plone 3 Compat...
David Rey   Lessons Learned   Updating Content Licensing To Be Plone 3 Compat...David Rey   Lessons Learned   Updating Content Licensing To Be Plone 3 Compat...
David Rey Lessons Learned Updating Content Licensing To Be Plone 3 Compat...Vincenzo Barone
 
CoreOS @ gluecon 2015
CoreOS @ gluecon 2015CoreOS @ gluecon 2015
CoreOS @ gluecon 2015ifup
 
한국통신학회 워크샵: SDN/NFV for Secure Services - Understanding Open Source SDN Contr...
한국통신학회 워크샵: SDN/NFV for Secure Services - Understanding Open Source SDN Contr...한국통신학회 워크샵: SDN/NFV for Secure Services - Understanding Open Source SDN Contr...
한국통신학회 워크샵: SDN/NFV for Secure Services - Understanding Open Source SDN Contr...Ian Choi
 
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusMicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusEmily Jiang
 
FISE Integration with Python and Plone
FISE Integration with Python and PloneFISE Integration with Python and Plone
FISE Integration with Python and PloneJens Klein
 
Logging & Metrics with Docker
Logging & Metrics with DockerLogging & Metrics with Docker
Logging & Metrics with DockerStefan Zier
 
Introduction and hacking OpenStack, Pycon India
Introduction and hacking OpenStack,  Pycon IndiaIntroduction and hacking OpenStack,  Pycon India
Introduction and hacking OpenStack, Pycon IndiaAtul Jha
 
Ubuntu Core 技术详解
Ubuntu Core 技术详解Ubuntu Core 技术详解
Ubuntu Core 技术详解Rex Tsai
 
Webapps development on ubuntu
Webapps development on ubuntuWebapps development on ubuntu
Webapps development on ubuntuXiaoguo Liu
 
Flex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog CcFlex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog CcFrançois Le Droff
 

Similaire à Discovery the p2 API (updated to Indigo) (20)

Discovering the p2 API
Discovering the p2 APIDiscovering the p2 API
Discovering the p2 API
 
Open stack nova reverse engineer
Open stack nova reverse engineerOpen stack nova reverse engineer
Open stack nova reverse engineer
 
Orion RESTful git API
Orion RESTful git APIOrion RESTful git API
Orion RESTful git API
 
Riena on-e4-ese2010
Riena on-e4-ese2010Riena on-e4-ese2010
Riena on-e4-ese2010
 
ABC of Platform Workspace
ABC of Platform WorkspaceABC of Platform Workspace
ABC of Platform Workspace
 
Kolla - containerizing the cloud itself
Kolla - containerizing the cloud itselfKolla - containerizing the cloud itself
Kolla - containerizing the cloud itself
 
Understanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profitUnderstanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profit
 
[apidays LIVE HONK KONG] - OAS to Managed API in Seconds
[apidays LIVE HONK KONG] - OAS to Managed API in Seconds[apidays LIVE HONK KONG] - OAS to Managed API in Seconds
[apidays LIVE HONK KONG] - OAS to Managed API in Seconds
 
What's new in p2 (2009)?
What's new in p2 (2009)?What's new in p2 (2009)?
What's new in p2 (2009)?
 
Managing Your Runtime With P2
Managing Your Runtime With P2Managing Your Runtime With P2
Managing Your Runtime With P2
 
David Rey Lessons Learned Updating Content Licensing To Be Plone 3 Compat...
David Rey   Lessons Learned   Updating Content Licensing To Be Plone 3 Compat...David Rey   Lessons Learned   Updating Content Licensing To Be Plone 3 Compat...
David Rey Lessons Learned Updating Content Licensing To Be Plone 3 Compat...
 
CoreOS @ gluecon 2015
CoreOS @ gluecon 2015CoreOS @ gluecon 2015
CoreOS @ gluecon 2015
 
한국통신학회 워크샵: SDN/NFV for Secure Services - Understanding Open Source SDN Contr...
한국통신학회 워크샵: SDN/NFV for Secure Services - Understanding Open Source SDN Contr...한국통신학회 워크샵: SDN/NFV for Secure Services - Understanding Open Source SDN Contr...
한국통신학회 워크샵: SDN/NFV for Secure Services - Understanding Open Source SDN Contr...
 
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusMicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
 
FISE Integration with Python and Plone
FISE Integration with Python and PloneFISE Integration with Python and Plone
FISE Integration with Python and Plone
 
Logging & Metrics with Docker
Logging & Metrics with DockerLogging & Metrics with Docker
Logging & Metrics with Docker
 
Introduction and hacking OpenStack, Pycon India
Introduction and hacking OpenStack,  Pycon IndiaIntroduction and hacking OpenStack,  Pycon India
Introduction and hacking OpenStack, Pycon India
 
Ubuntu Core 技术详解
Ubuntu Core 技术详解Ubuntu Core 技术详解
Ubuntu Core 技术详解
 
Webapps development on ubuntu
Webapps development on ubuntuWebapps development on ubuntu
Webapps development on ubuntu
 
Flex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog CcFlex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog Cc
 

Dernier

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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 RobisonAnna Loughnan Colquhoun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Dernier (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Discovery the p2 API (updated to Indigo)

  • 1. Discovering the p2 API Pascal Rapicault Sonatype, p2 Lead © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 1
  • 2. Who are the p2 committers? © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 2
  • 3. History 3.4 / 3.5 provisional API 3.6 / Helios - first official release of the API 3.7 / Indigo - full backward compatibility © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 3
  • 4. What’s new in 3.7? API New features to ease p2 consumption Simplification for RCP use case Simpler Headless API for simple cases SPI Pluggable transport Code Memory consumption improvements Inter-process locking of local repositories … © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 4
  • 5. 3 levels of API Graphical User Interface Headless Operations Core APIs + SPIs © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 5
  • 6. Graphical User Interface GUI is SWT-based and designed to be reused in RCP / Eclipse applications. Ease of reuse: Feature org.eclipse.equinox.p2.rcp.feature The p2.ui.sdk bundle provides SDK like UI for reuse in RCP. Compose from the p2.ui bundle Add extensions to hook where you want org.eclipse.equinox.p2.ui org.eclipse.equinox.p2.ui.sdk © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 6
  • 7. Graphical User Interface © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 7
  • 8. Reusing individual UI elements Most the pages / wizards can be reused Installed dialog Repository management License manager Install/Update/Uninstall wizard o.e.e.p2.ui.InstalledSoftwarePage o.e.e.p2.ui.RepositoryManipulationPage o.e.e.p2.ui.AcceptLicensesWizardPage o.e.e.p2.ui.ProvisioningUtil#open*Wizard org.eclipse.equinox.p2.ui © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 8
  • 9. Tweaking the existing UI The Policy class Show / hide repository selection Drill down Show categories Content of the restart dialog … org.eclipse.equinox.p2.ui.Policy org.eclipse.equinox.p2.ui © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 9
  • 10. Tweaking the existing UI © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 10
  • 11.
  • 12. More on UI reuse See examples on the p2 wiki http://wiki.eclipse.org/Equinox/p2/Examples Talk on the p2 UI http://www.eclipsecon.org/2010/sessions/?page=sessions&id=1205 © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 12
  • 13. 3 levels of API Graphical User Interface Headless Operations Core APIs + SPIs © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 13
  • 14. Minimal headless p2 A “relatively” minimal headless p2 is available: org.eclipse.equinox.p2.core.feature Provide enough to install / update / uninstall A smaller subset can be created, but it is too specific (e.g. w/o ECF, w/o http client, w/o operations, etc.) © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 14
  • 15. Headless operations High level operations to install / update / uninstall Focused on the Eclipse / OSGi use cases Encapsulates: Dependency resolution Download Modification of the system Restart org.eclipse.equinox.p2.operations org.eclipse.equinox.p2.operations © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 15
  • 16. Headless operations example InstallOperation op = OperationHelper.create***Operation(iusToInstall, repoList, new NullProgressMonitor()); if (op.resolveModal(newNullProgressMonitor()).isOK()) op.getProvisioningJob(newNullProgressMonitor()).schedule(); © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 16 New in 3.7. This API only works for the running instance (which is the case most of the time). To modify another instance, you need to use the InstallOperation directly.
  • 17. 3 levels of API Graphical User Interface Headless Operations Core APIs + SPIs © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 17
  • 18. Core concepts installable unit/metadata query/ queryable planner repository agent engine profile registry/ profile © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 18
  • 19. Repositories p2 Update Site Engine Eclipse/OSGi Native/OS Core concepts Metadata repo Artifact repo Data transfer Metadata fetched and constraints analyzed Transports Planner/Director Http/Https File system Volume Mirroring Provisioning operation requested IU install, uninstall, update operations Artifact availability and mirroring IUs configured into runtimes Profile updated Profile registry Runtimes © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 19
  • 20. How do I get an IU? IUs can be obtained from Querying the metadata repository Querying the profile Querying … Programmatically created org.eclipse.equinox.p2.metadata.MetadataFactory org.eclipse.equinox.p2.metadata © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 20
  • 21. Queries / QueryableHow do I query? What is queryable? Almost everything is queryable (repository, repository manager, profile, …) How do I create a query? QueryUtil.create* Domain specific queries (e.g. in eclipse.touchpoint) p2 QL, p2-specific query language http://wiki.eclipse.org/Query_Language_for_p2 org.eclipse.equinox.p2.query.IQueryable org.eclipse.equinox.p2.query.QueryUtil org.eclipse.equinox.p2.metadata org.eclipse.equinox.p2.ql © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 21
  • 22. The repository managerHow do I get a repository? Artifact / metadata repository manager Addition / removal of repositories Enable / disable repositories Load Artifact / metadata repository Add Remove Query org.eclipse.equinox.p2.repository.IMetadataRepository org.eclipse.equinox.p2.repository.IArtifactRepository o.e.e.p2.repository.IMetadataRepositoryManager o.e.e.p2.repository.IArtifactRepositoryManager org.eclipse.equinox.p2.repository © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 22
  • 23. Provisioning agentHow do I get a repository manager or p2 components? The agent groups related services together It is the starting point of everything. It is the executable version of the p2 area (e.g the p2 folder in the eclipse install) Several agents can run at once in one VM. Groups the services together. Allows to change some services (see implementations of IAgentServiceFactory) If you are only dealing with the running instance: Obtain the IProvisioningAgent service from the OSGi registry Create it using the IProvisioningContext#createAgent(null) org.eclipse.equinox.p2.core.IProvisioningAgent org.eclipse.equinox.p2.core.IProvisioningAgentProvider org.eclipse.equinox.p2.core © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 23
  • 24. Profile / profile registryHow do I know what is installed? A profile is the complete description in terms of IUs of what is installed. The profile registry knows about all the profiles in a given p2 area org.eclipse.equinox.p2.engine.IProfile org.eclipse.equinox.p2.engine.IProfileRegistry org.eclipse.equinox.p2.engine org.eclipse.equinox.p2.engine © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 24
  • 25. What is not API? Repository serialized format Layout of files on disk under the p2 folder © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 25
  • 26. Summary 3 levels of API tailored for different needs Simple things should be simple Complex things should be possible This API is for YOU! Tell us what you think. © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 26
  • 27. Thank you mailto:p2-dev@eclipse.org http://wiki.eclipse.org/Equinox/p2 © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 27
  • 28. p2 related talks p2 savior or Achilles heel (Tues 4pm) http://www.eclipsecon.org/2011/sessions?id=2313 Raising p2 to the cloud (Wed 1:30pm) http://www.eclipsecon.org/2011/sessions?id=2102 Updates in the micro space (Thr 2:30pm) http://www.eclipsecon.org/2011/sessions?id=2196 Fireside chat on p2 (Wed 8:30pm) http://www.eclipsecon.org/2011/sessions?id=2473 © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 28