SlideShare a Scribd company logo
EXPath Packaging
 A framework to package libraries and
applications for core XML technologies



       Balisage, August 4th, 2010
               Montréal



           Florent Georges
             H2O Consulting
EXPath Packaging

●
    Introduction                ←
●   The problem
●   How to use it?
●   Write a package
●   A project structure
●   Going further
●   Conclusion
Introduction - History

●   EXSLT for XSLT 1.0
●   XSLT 2.0 and needs for new extensions
●   EXSLT 2.0, EXQuery & EXProc
●   XML Prague 2009 – EXPath
●   First modules – HTTP Client & ZIP Facility
●   Summer 2009 – the Packaging System
●   2010 – the Webapp module
Introduction - Goals

●   Collaboratively defining open standards for
    portable XPath extensions
●   The main means is extension functions
●   The main goal is defining portable
    specifications...
●   ...and convincing vendors to endorse them
●   But also providing support to open-source
    implementations
Introduction - Processes

●   More or less formal, more or less informal
    (that is a feature, not a bug)
●   The definitive goal is writing specifications
●   The main tool is the mailing list
●   Each module has one main maintainer,
    responsible of editing & achieving consensus
●   More infos about processes on the wiki
EXPath Packaging

●   Introduction
●
    The problem                 ←
●   How to use it?
●   Write a package
●   A project structure
●   Going further
●   Conclusion
The import problem

●   The way to import a module is dependent on
    the processor
●   XSLT import URI
●   XQuery evil: location hint
●   For now, there is no standard way to import a
    module in XSLT, XQuery nor XProc
●   No other modern programming language as
    this limitation
The import problem
(: in Saxon :)
import module namespace functx = "http://www.functx.com"
 at "../../../../../../xlibs/functx/src/functx.xq";

declare function local:hello($who as xs:string) as xs:string
{
  concat('Hello, ', functx:capitalize-first($who), '!')
};
...

(: in eXist :)
import module namespace functx = "http://www.functx.com"
  at "xmldb:exist:///db/modules/functx.xq";
...
The import problem
●   The ideal solution would be to get rid of the
    location hint, and see the import URI as a name
    (: portable :)
    import module namespace functx = "http://www.functx.com";

    declare function local:hello($who as xs:string) as xs:string
    {
      concat('Hello, ', functx:capitalize-first($who), '!')
    };
    ...

●   Achievable somehow through XML Catalogs,
    but the install process is not uniform and thus
    even more painful for the user
XML Catalogs
●   XML Catalogs are in the correct direction, but
    need automatization
●   Both for the final user and for the author
●   The solution needs to be used consistently,
    XML Catalogs does not give enough info
●   Even when a catalog is shipped with a library,
    it needs advanced config in order to work
●   And there is no standard release structure
●   URI resolving is only part of the solution
EXPath Packaging

●   Introduction
●   The problem
●
    How to use it?              ←
●   Write a package
●   A project structure
●   Going further
●   Conclusion
How to use it?
●   A library user has two things to do:
        –   install the package, using an automatic
              installer
        –   import it and use it, of course, by simply using
              the pubic URI
●   Installers can be command line tools, or a web
    form, or whatever is provided by the processor
●   By using the public URIs (and only the public
    URIs), the written code is portable across
    different processors
Installers
●   Command-line tool:




●   eXist's web-based install:
Import modules
●   Going back to our example:
    (: portable :)
    import module namespace functx = "http://www.functx.com";

    declare function local:hello($who as xs:string) as xs:string
    {
      concat('Hello, ', functx:capitalize-first($who), '!')
    };
    ...


●   It is now portable across processors, without
    imposing any configuration burden on the user
EXPath Packaging

●   Introduction
●   The problem
●   How to use it?
●
    Write a package             ←
●   A project structure
●   Going further
●   Conclusion
Requirements
●   Building upon and going behind XML
    Catalogs, a packaging format must:
       –   describe what is needed but is not in the X*
            specifications
       –   be understood by most processors
       –   package the components and additional
            informations in a single file
       –   be eXtensible (to allow other specs to build
            upon it, and allow processor specific infos)
●   Installation process can then be automated
Overview
Structure
●   A package is a ZIP file
●   It contains exactly one subdirectory (content)
●   It contains a package descriptor: expath-pkg.xml
●   It can contain per-processor descriptors
●   It can contain descriptors for other specs
The descriptor
●   Record some meta infos about the package
●   Record the content component's public URIs
Putting it together
●   The components and the descriptor are just
    zipped together to make the XAR package
●   The XAR file must respect the structure
    described in the descriptor
●   Any ZIP tool can be used to achieve this goal
Standard repository layout
●   How packages are installed is implementation-
    dependent
●   The spec defines an optional repository layout
●   If the implementation adopts this layout, it can
    share repositories with others
●   Management tools in the command line have
    been built to manage such repositories (install,
    remove, list packages)
●   A Java library exists for the URI resolution
EXPath Packaging

●   Introduction
●   The problem
●   How to use it?
●   Write a package
●
    A project structure        ←
●   Going further
●   Conclusion
Too much for me!
●   That's fine, but as a library author, that seems
    a lot of work to do again and again
●   Besides, most of the steps are similar every
    time
●   Creating new libraries usually involve copying
    and pasting Makefiles or other build files, and
    adapting them, over and over again
●   By using some conventions, we can actually
    automate those repetitive tasks
Project?
●   Following a consistent structure, a project can
    be built automatically
●   This structure use naming conventions for
    directories
●   As well as a project descriptor for meta data
    (title, version, etc.)
●   The public URIs are maintained within the
    components themselves
●   An XSLT stylesheet packages the project
Project!
●   The basic project structure has a build/
    directory with a project file, and a src/ directory
    with the project source files
xproj
●   A simple script wraps the stylesheet invocation
●   You call it from the project directory to build
    the project package:
Releasing
●   Why did we put the test file outside the
    project? Let's include it.
●   And let's put a nice README file




●   Can we create automatically a proper release?
xproj, relaunched
(let's make it clear)
●   Before going further, let's make it clear this
    project structure stuff is already behind the
    packaging system itself
●   It is useful, or even crucial, for the user
    experience
●   But it is behind the packaging spec
●   The spec is the minimal common piece to
    conform to
●   Tools and specs can then be built upon it
EXPath Packaging

●   Introduction
●   The problem
●   How to use it?
●   Write a package
●   A project structure
●
    Going further               ←
●   Conclusion
Repository functions
●   A set of functions to manage a package
    repository directly from within XPath expression
●   Not part of the spec (but could be in a v.Next)
●   This is the approach followed by eXist:
        –   repo:list() as xs:string*
        –   repo:install($href as xs:string) as xs:boolean
        –   repo:remove($name as xs:string) as xs:boolean

●   Could be used to build convenient managers,
    not dependent on the processor
CXAN
●   http://cxan.org/
●   Comprehensive XML Archive Network
●   Follow the same principle as well-known
    CPAN for Perl and CTAN for (La)TeX
●   Work in progress
●   Collect existing packages
●   Make them accessible and searchable from a
    single one location
CXAN
●   CXAN is composed of:
       –   the package base set on the server
       –   the website to browse and search within this
             package set
       –   a command line tool to install packages by
             downloading them directly from the server
CXAN




●   Some challenges are still to solve:
        –   versioning
        –   dependencies between packages
        –   website interface
Webapps
●   Using X* technologies end-to-end for web
    applications
●   Most existing XML databases provide
    proprietary framework for that (eXist,
    MarkLogic, Sausalito, etc.)
●   Then again, we are stuck with processor-
    locked applications
●   A standard would allow to write portable web
    applications, libraries and frameworks
Request / response
<web:request servlet="name" path="/path" method="get">
  <web:uri>http://example.org/my-app/path/one?p=v</web:uri>
  <web:authority>http://example.org</web:authority>
  <web:context-root>/my-app</web:context-root>
  <web:path>
      <web:part>path/</web:part>
      <web:match name="which">one</web:match>
  </web:path>
  <web:param name="p" value="v"/>
  <web:header name="connection" value="keep-alive"/>
  ...
</web:request>
<web:response status="200" message="Ok">
  <web:header name="..." value="..."/>
  ...
  <web:body content-type="text/html" method="xhtml"/>
</http:response>
Entry point
●   Either a:
        –   XQuery function
        –   main XQuery module
        –   XSLT function
        –   XSLT named template
        –   XSLT stylesheet
        –   XProc pipeline
●   Must accept two parameters
        –   the request element
        –   the sequence of bodies (possibly empty)
Entry point
Web descriptor
●   Map requests to entry points
●   Based on URI matching
Packaging
●   A webapp is packaged as any standard project
●   The web descriptor is inserted next to the
    package descriptor
●   All the resolution mechanism is already there
Building block
●   Once again, the webapp spec follow the same
    principle than packaging: defining only the
    strict minimum low-level mapping between an
    HTTP request and an X* component (and its
    response back to HTTP)
●
EXPath Packaging

●   Introduction
●   The problem
●   How to use it?
●   Write a package
●   A project structure
●   Going further
●
    Conclusion                  ←
●   Join the mailing list and browse the website:


                 http://expath.org/
Balisage - EXPath Packaging

More Related Content

What's hot

Fluentd meetup
Fluentd meetupFluentd meetup
Fluentd meetup
Sadayuki Furuhashi
 
Everything you ever wanted to know about lotus script
Everything you ever wanted to know about lotus scriptEverything you ever wanted to know about lotus script
Everything you ever wanted to know about lotus script
Bill Buchan
 
Like loggly using open source
Like loggly using open sourceLike loggly using open source
Like loggly using open source
Thomas Alrin
 
M|18 Architectural Overview: MariaDB MaxScale
M|18 Architectural Overview: MariaDB MaxScaleM|18 Architectural Overview: MariaDB MaxScale
M|18 Architectural Overview: MariaDB MaxScale
MariaDB plc
 
Fluentd vs. Logstash for OpenStack Log Management
Fluentd vs. Logstash for OpenStack Log ManagementFluentd vs. Logstash for OpenStack Log Management
Fluentd vs. Logstash for OpenStack Log Management
NTT Communications Technology Development
 
HornetQ Presentation On JBoss World 2009
HornetQ Presentation On JBoss World 2009HornetQ Presentation On JBoss World 2009
HornetQ Presentation On JBoss World 2009
jarfield
 
Thrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased ComparisonThrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased Comparison
Igor Anishchenko
 
Fluentd at HKOScon
Fluentd at HKOSconFluentd at HKOScon
Fluentd at HKOScon
N Masahiro
 
Fluentd v1.0 in a nutshell
Fluentd v1.0 in a nutshellFluentd v1.0 in a nutshell
Fluentd v1.0 in a nutshell
N Masahiro
 
Xml parsers
Xml parsersXml parsers
Xml parsers
Manav Prasad
 
3 apache-avro
3 apache-avro3 apache-avro
3 apache-avro
zafargilani
 
9781305078444 ppt ch04
9781305078444 ppt ch049781305078444 ppt ch04
9781305078444 ppt ch04
Terry Yoast
 
9781305078444 ppt ch02
9781305078444 ppt ch029781305078444 ppt ch02
9781305078444 ppt ch02
Terry Yoast
 
The architecture of oak
The architecture of oakThe architecture of oak
The architecture of oak
Michael Dürig
 
Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012
Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012
Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012
Treasure Data, Inc.
 
Ninja Build: Simple Guide for Beginners
Ninja Build: Simple Guide for BeginnersNinja Build: Simple Guide for Beginners
Ninja Build: Simple Guide for Beginners
Chang W. Doh
 
NoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryNoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love Story
Alexandre Morgaut
 
Tips and Tricks for Increased Development Efficiency
Tips and Tricks for Increased Development EfficiencyTips and Tricks for Increased Development Efficiency
Tips and Tricks for Increased Development Efficiency
Olivier Bourgeois
 
Benchx: An XQuery benchmarking web application
Benchx: An XQuery benchmarking web application Benchx: An XQuery benchmarking web application
Benchx: An XQuery benchmarking web application
Andy Bunce
 
The basics of fluentd
The basics of fluentdThe basics of fluentd
The basics of fluentd
Treasure Data, Inc.
 

What's hot (20)

Fluentd meetup
Fluentd meetupFluentd meetup
Fluentd meetup
 
Everything you ever wanted to know about lotus script
Everything you ever wanted to know about lotus scriptEverything you ever wanted to know about lotus script
Everything you ever wanted to know about lotus script
 
Like loggly using open source
Like loggly using open sourceLike loggly using open source
Like loggly using open source
 
M|18 Architectural Overview: MariaDB MaxScale
M|18 Architectural Overview: MariaDB MaxScaleM|18 Architectural Overview: MariaDB MaxScale
M|18 Architectural Overview: MariaDB MaxScale
 
Fluentd vs. Logstash for OpenStack Log Management
Fluentd vs. Logstash for OpenStack Log ManagementFluentd vs. Logstash for OpenStack Log Management
Fluentd vs. Logstash for OpenStack Log Management
 
HornetQ Presentation On JBoss World 2009
HornetQ Presentation On JBoss World 2009HornetQ Presentation On JBoss World 2009
HornetQ Presentation On JBoss World 2009
 
Thrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased ComparisonThrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased Comparison
 
Fluentd at HKOScon
Fluentd at HKOSconFluentd at HKOScon
Fluentd at HKOScon
 
Fluentd v1.0 in a nutshell
Fluentd v1.0 in a nutshellFluentd v1.0 in a nutshell
Fluentd v1.0 in a nutshell
 
Xml parsers
Xml parsersXml parsers
Xml parsers
 
3 apache-avro
3 apache-avro3 apache-avro
3 apache-avro
 
9781305078444 ppt ch04
9781305078444 ppt ch049781305078444 ppt ch04
9781305078444 ppt ch04
 
9781305078444 ppt ch02
9781305078444 ppt ch029781305078444 ppt ch02
9781305078444 ppt ch02
 
The architecture of oak
The architecture of oakThe architecture of oak
The architecture of oak
 
Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012
Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012
Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012
 
Ninja Build: Simple Guide for Beginners
Ninja Build: Simple Guide for BeginnersNinja Build: Simple Guide for Beginners
Ninja Build: Simple Guide for Beginners
 
NoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryNoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love Story
 
Tips and Tricks for Increased Development Efficiency
Tips and Tricks for Increased Development EfficiencyTips and Tricks for Increased Development Efficiency
Tips and Tricks for Increased Development Efficiency
 
Benchx: An XQuery benchmarking web application
Benchx: An XQuery benchmarking web application Benchx: An XQuery benchmarking web application
Benchx: An XQuery benchmarking web application
 
The basics of fluentd
The basics of fluentdThe basics of fluentd
The basics of fluentd
 

Viewers also liked

Spreekbeurt job echt cool
Spreekbeurt job echt coolSpreekbeurt job echt cool
Spreekbeurt job echt cool
jobvand
 
Quanti libri in un libro di Paola Romagnoli
Quanti libri in un libro di Paola RomagnoliQuanti libri in un libro di Paola Romagnoli
Quanti libri in un libro di Paola Romagnoli
Sistema Bibliotecario Ovest Bresciano
 
Puzzle Gigante
Puzzle GigantePuzzle Gigante
EXPath: the packaging system and the webapp framework
EXPath: the packaging system and the webapp frameworkEXPath: the packaging system and the webapp framework
EXPath: the packaging system and the webapp framework
Florent Georges
 
La narrazione in atto incroci e idee tra gioco e storie leggendo e inventanto...
La narrazione in atto incroci e idee tra gioco e storie leggendo e inventanto...La narrazione in atto incroci e idee tra gioco e storie leggendo e inventanto...
La narrazione in atto incroci e idee tra gioco e storie leggendo e inventanto...
Sistema Bibliotecario Ovest Bresciano
 
I gruppi di lettura come esperienza di salute e benessere di Roberto Spoldi
I gruppi di lettura come esperienza di salute e benessere   di Roberto SpoldiI gruppi di lettura come esperienza di salute e benessere   di Roberto Spoldi
I gruppi di lettura come esperienza di salute e benessere di Roberto Spoldi
Sistema Bibliotecario Ovest Bresciano
 
Dinosaurs
DinosaursDinosaurs
Dinosaurs
rieker9
 
What did dinosaurs eat powerpoint
What did dinosaurs eat powerpointWhat did dinosaurs eat powerpoint
What did dinosaurs eat powerpoint
Mrsjalland
 
Dinosaurs
DinosaursDinosaurs
Ppt Dino S
Ppt Dino SPpt Dino S
Ppt Dino SNienieke
 
All about dinosaurs powerpoint
All about dinosaurs powerpointAll about dinosaurs powerpoint
All about dinosaurs powerpoint
Mrsjalland
 
Dinosaur Slideshow
Dinosaur SlideshowDinosaur Slideshow
Dinosaur Slideshow
guest5ebd41
 
Dinosaurs
DinosaursDinosaurs
Dinosaurs
cpricenaik
 
Dinopresentatie van Armin
Dinopresentatie van ArminDinopresentatie van Armin
Dinopresentatie van Armin
Marc3a
 
English présentation dinosaurs
English présentation dinosaursEnglish présentation dinosaurs
English présentation dinosaurs
eftis
 
What About Dinosaurs?
What About Dinosaurs?What About Dinosaurs?
What About Dinosaurs?
Devin Roush
 

Viewers also liked (20)

De Brachiosaurus
De BrachiosaurusDe Brachiosaurus
De Brachiosaurus
 
Spreekbeurt job echt cool
Spreekbeurt job echt coolSpreekbeurt job echt cool
Spreekbeurt job echt cool
 
De Stegosaurus
De StegosaurusDe Stegosaurus
De Stegosaurus
 
De Veloceraptor
De VeloceraptorDe Veloceraptor
De Veloceraptor
 
De Tyrannosaurus Rex 01
De Tyrannosaurus Rex 01De Tyrannosaurus Rex 01
De Tyrannosaurus Rex 01
 
Quanti libri in un libro di Paola Romagnoli
Quanti libri in un libro di Paola RomagnoliQuanti libri in un libro di Paola Romagnoli
Quanti libri in un libro di Paola Romagnoli
 
Puzzle Gigante
Puzzle GigantePuzzle Gigante
Puzzle Gigante
 
EXPath: the packaging system and the webapp framework
EXPath: the packaging system and the webapp frameworkEXPath: the packaging system and the webapp framework
EXPath: the packaging system and the webapp framework
 
La narrazione in atto incroci e idee tra gioco e storie leggendo e inventanto...
La narrazione in atto incroci e idee tra gioco e storie leggendo e inventanto...La narrazione in atto incroci e idee tra gioco e storie leggendo e inventanto...
La narrazione in atto incroci e idee tra gioco e storie leggendo e inventanto...
 
I gruppi di lettura come esperienza di salute e benessere di Roberto Spoldi
I gruppi di lettura come esperienza di salute e benessere   di Roberto SpoldiI gruppi di lettura come esperienza di salute e benessere   di Roberto Spoldi
I gruppi di lettura come esperienza di salute e benessere di Roberto Spoldi
 
Dinosaurs
DinosaursDinosaurs
Dinosaurs
 
What did dinosaurs eat powerpoint
What did dinosaurs eat powerpointWhat did dinosaurs eat powerpoint
What did dinosaurs eat powerpoint
 
Dinosaurs
DinosaursDinosaurs
Dinosaurs
 
Ppt Dino S
Ppt Dino SPpt Dino S
Ppt Dino S
 
All about dinosaurs powerpoint
All about dinosaurs powerpointAll about dinosaurs powerpoint
All about dinosaurs powerpoint
 
Dinosaur Slideshow
Dinosaur SlideshowDinosaur Slideshow
Dinosaur Slideshow
 
Dinosaurs
DinosaursDinosaurs
Dinosaurs
 
Dinopresentatie van Armin
Dinopresentatie van ArminDinopresentatie van Armin
Dinopresentatie van Armin
 
English présentation dinosaurs
English présentation dinosaursEnglish présentation dinosaurs
English présentation dinosaurs
 
What About Dinosaurs?
What About Dinosaurs?What About Dinosaurs?
What About Dinosaurs?
 

Similar to Balisage - EXPath Packaging

EXPath Webapp - CXAN: a case-study for Servlex, an XML web framework
EXPath Webapp - CXAN: a case-study for Servlex, an XML web frameworkEXPath Webapp - CXAN: a case-study for Servlex, an XML web framework
EXPath Webapp - CXAN: a case-study for Servlex, an XML web framework
Florent Georges
 
UCL All of the Things (MeetBSD California 2014 Lightning Talk)
UCL All of the Things (MeetBSD California 2014 Lightning Talk)UCL All of the Things (MeetBSD California 2014 Lightning Talk)
UCL All of the Things (MeetBSD California 2014 Lightning Talk)
iXsystems
 
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
Wong Hoi Sing Edison
 
Automation tools: making things go... (March 2019)
Automation tools: making things go... (March 2019)Automation tools: making things go... (March 2019)
Automation tools: making things go... (March 2019)
Artefactual Systems - Archivematica
 
The elastic stack on docker
The elastic stack on dockerThe elastic stack on docker
The elastic stack on docker
SmartWave
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
Marcelo Ochoa
 
Containers: from development to production at DevNation 2015
Containers: from development to production at DevNation 2015Containers: from development to production at DevNation 2015
Containers: from development to production at DevNation 2015
Jérôme Petazzoni
 
Bootstrap4 x pages
Bootstrap4 x pagesBootstrap4 x pages
Bootstrap4 x pages
Philippe Riand
 
Modern web technologies
Modern web technologiesModern web technologies
Modern web technologies
Simeon Prusiyski
 
Introduction to containers a practical session using core os and docker
Introduction to containers  a practical session using core os and dockerIntroduction to containers  a practical session using core os and docker
Introduction to containers a practical session using core os and docker
Alessandro Martellone
 
Java in containers
Java in containersJava in containers
Java in containers
Martin Baez
 
Docker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xDocker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12x
rkr10
 
.NET @ apache.org
 .NET @ apache.org .NET @ apache.org
.NET @ apache.org
Ted Husted
 
Pune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCD
Prashant Rane
 
Oracle to Postgres Migration - part 1
Oracle to Postgres Migration - part 1Oracle to Postgres Migration - part 1
Oracle to Postgres Migration - part 1
PgTraining
 
The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09
Bastian Feder
 
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Antonio Peric-Mazar
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesDocker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
Introduction to Docker at the Azure Meet-up in New York
Introduction to Docker at the Azure Meet-up in New YorkIntroduction to Docker at the Azure Meet-up in New York
Introduction to Docker at the Azure Meet-up in New York
Jérôme Petazzoni
 
Introduction to containers
Introduction to containersIntroduction to containers
Introduction to containers
Nitish Jadia
 

Similar to Balisage - EXPath Packaging (20)

EXPath Webapp - CXAN: a case-study for Servlex, an XML web framework
EXPath Webapp - CXAN: a case-study for Servlex, an XML web frameworkEXPath Webapp - CXAN: a case-study for Servlex, an XML web framework
EXPath Webapp - CXAN: a case-study for Servlex, an XML web framework
 
UCL All of the Things (MeetBSD California 2014 Lightning Talk)
UCL All of the Things (MeetBSD California 2014 Lightning Talk)UCL All of the Things (MeetBSD California 2014 Lightning Talk)
UCL All of the Things (MeetBSD California 2014 Lightning Talk)
 
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
 
Automation tools: making things go... (March 2019)
Automation tools: making things go... (March 2019)Automation tools: making things go... (March 2019)
Automation tools: making things go... (March 2019)
 
The elastic stack on docker
The elastic stack on dockerThe elastic stack on docker
The elastic stack on docker
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Containers: from development to production at DevNation 2015
Containers: from development to production at DevNation 2015Containers: from development to production at DevNation 2015
Containers: from development to production at DevNation 2015
 
Bootstrap4 x pages
Bootstrap4 x pagesBootstrap4 x pages
Bootstrap4 x pages
 
Modern web technologies
Modern web technologiesModern web technologies
Modern web technologies
 
Introduction to containers a practical session using core os and docker
Introduction to containers  a practical session using core os and dockerIntroduction to containers  a practical session using core os and docker
Introduction to containers a practical session using core os and docker
 
Java in containers
Java in containersJava in containers
Java in containers
 
Docker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xDocker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12x
 
.NET @ apache.org
 .NET @ apache.org .NET @ apache.org
.NET @ apache.org
 
Pune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCD
 
Oracle to Postgres Migration - part 1
Oracle to Postgres Migration - part 1Oracle to Postgres Migration - part 1
Oracle to Postgres Migration - part 1
 
The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09
 
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesDocker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los Angeles
 
Introduction to Docker at the Azure Meet-up in New York
Introduction to Docker at the Azure Meet-up in New YorkIntroduction to Docker at the Azure Meet-up in New York
Introduction to Docker at the Azure Meet-up in New York
 
Introduction to containers
Introduction to containersIntroduction to containers
Introduction to containers
 

Recently uploaded

Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 

Recently uploaded (20)

Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 

Balisage - EXPath Packaging

  • 1. EXPath Packaging A framework to package libraries and applications for core XML technologies Balisage, August 4th, 2010 Montréal Florent Georges H2O Consulting
  • 2. EXPath Packaging ● Introduction ← ● The problem ● How to use it? ● Write a package ● A project structure ● Going further ● Conclusion
  • 3. Introduction - History ● EXSLT for XSLT 1.0 ● XSLT 2.0 and needs for new extensions ● EXSLT 2.0, EXQuery & EXProc ● XML Prague 2009 – EXPath ● First modules – HTTP Client & ZIP Facility ● Summer 2009 – the Packaging System ● 2010 – the Webapp module
  • 4. Introduction - Goals ● Collaboratively defining open standards for portable XPath extensions ● The main means is extension functions ● The main goal is defining portable specifications... ● ...and convincing vendors to endorse them ● But also providing support to open-source implementations
  • 5. Introduction - Processes ● More or less formal, more or less informal (that is a feature, not a bug) ● The definitive goal is writing specifications ● The main tool is the mailing list ● Each module has one main maintainer, responsible of editing & achieving consensus ● More infos about processes on the wiki
  • 6. EXPath Packaging ● Introduction ● The problem ← ● How to use it? ● Write a package ● A project structure ● Going further ● Conclusion
  • 7. The import problem ● The way to import a module is dependent on the processor ● XSLT import URI ● XQuery evil: location hint ● For now, there is no standard way to import a module in XSLT, XQuery nor XProc ● No other modern programming language as this limitation
  • 8. The import problem (: in Saxon :) import module namespace functx = "http://www.functx.com" at "../../../../../../xlibs/functx/src/functx.xq"; declare function local:hello($who as xs:string) as xs:string { concat('Hello, ', functx:capitalize-first($who), '!') }; ... (: in eXist :) import module namespace functx = "http://www.functx.com" at "xmldb:exist:///db/modules/functx.xq"; ...
  • 9. The import problem ● The ideal solution would be to get rid of the location hint, and see the import URI as a name (: portable :) import module namespace functx = "http://www.functx.com"; declare function local:hello($who as xs:string) as xs:string { concat('Hello, ', functx:capitalize-first($who), '!') }; ... ● Achievable somehow through XML Catalogs, but the install process is not uniform and thus even more painful for the user
  • 10. XML Catalogs ● XML Catalogs are in the correct direction, but need automatization ● Both for the final user and for the author ● The solution needs to be used consistently, XML Catalogs does not give enough info ● Even when a catalog is shipped with a library, it needs advanced config in order to work ● And there is no standard release structure ● URI resolving is only part of the solution
  • 11. EXPath Packaging ● Introduction ● The problem ● How to use it? ← ● Write a package ● A project structure ● Going further ● Conclusion
  • 12. How to use it? ● A library user has two things to do: – install the package, using an automatic installer – import it and use it, of course, by simply using the pubic URI ● Installers can be command line tools, or a web form, or whatever is provided by the processor ● By using the public URIs (and only the public URIs), the written code is portable across different processors
  • 13. Installers ● Command-line tool: ● eXist's web-based install:
  • 14. Import modules ● Going back to our example: (: portable :) import module namespace functx = "http://www.functx.com"; declare function local:hello($who as xs:string) as xs:string { concat('Hello, ', functx:capitalize-first($who), '!') }; ... ● It is now portable across processors, without imposing any configuration burden on the user
  • 15. EXPath Packaging ● Introduction ● The problem ● How to use it? ● Write a package ← ● A project structure ● Going further ● Conclusion
  • 16. Requirements ● Building upon and going behind XML Catalogs, a packaging format must: – describe what is needed but is not in the X* specifications – be understood by most processors – package the components and additional informations in a single file – be eXtensible (to allow other specs to build upon it, and allow processor specific infos) ● Installation process can then be automated
  • 18. Structure ● A package is a ZIP file ● It contains exactly one subdirectory (content) ● It contains a package descriptor: expath-pkg.xml ● It can contain per-processor descriptors ● It can contain descriptors for other specs
  • 19. The descriptor ● Record some meta infos about the package ● Record the content component's public URIs
  • 20. Putting it together ● The components and the descriptor are just zipped together to make the XAR package ● The XAR file must respect the structure described in the descriptor ● Any ZIP tool can be used to achieve this goal
  • 21. Standard repository layout ● How packages are installed is implementation- dependent ● The spec defines an optional repository layout ● If the implementation adopts this layout, it can share repositories with others ● Management tools in the command line have been built to manage such repositories (install, remove, list packages) ● A Java library exists for the URI resolution
  • 22. EXPath Packaging ● Introduction ● The problem ● How to use it? ● Write a package ● A project structure ← ● Going further ● Conclusion
  • 23. Too much for me! ● That's fine, but as a library author, that seems a lot of work to do again and again ● Besides, most of the steps are similar every time ● Creating new libraries usually involve copying and pasting Makefiles or other build files, and adapting them, over and over again ● By using some conventions, we can actually automate those repetitive tasks
  • 24. Project? ● Following a consistent structure, a project can be built automatically ● This structure use naming conventions for directories ● As well as a project descriptor for meta data (title, version, etc.) ● The public URIs are maintained within the components themselves ● An XSLT stylesheet packages the project
  • 25. Project! ● The basic project structure has a build/ directory with a project file, and a src/ directory with the project source files
  • 26. xproj ● A simple script wraps the stylesheet invocation ● You call it from the project directory to build the project package:
  • 27. Releasing ● Why did we put the test file outside the project? Let's include it. ● And let's put a nice README file ● Can we create automatically a proper release?
  • 29. (let's make it clear) ● Before going further, let's make it clear this project structure stuff is already behind the packaging system itself ● It is useful, or even crucial, for the user experience ● But it is behind the packaging spec ● The spec is the minimal common piece to conform to ● Tools and specs can then be built upon it
  • 30. EXPath Packaging ● Introduction ● The problem ● How to use it? ● Write a package ● A project structure ● Going further ← ● Conclusion
  • 31. Repository functions ● A set of functions to manage a package repository directly from within XPath expression ● Not part of the spec (but could be in a v.Next) ● This is the approach followed by eXist: – repo:list() as xs:string* – repo:install($href as xs:string) as xs:boolean – repo:remove($name as xs:string) as xs:boolean ● Could be used to build convenient managers, not dependent on the processor
  • 32. CXAN ● http://cxan.org/ ● Comprehensive XML Archive Network ● Follow the same principle as well-known CPAN for Perl and CTAN for (La)TeX ● Work in progress ● Collect existing packages ● Make them accessible and searchable from a single one location
  • 33. CXAN ● CXAN is composed of: – the package base set on the server – the website to browse and search within this package set – a command line tool to install packages by downloading them directly from the server
  • 34. CXAN ● Some challenges are still to solve: – versioning – dependencies between packages – website interface
  • 35. Webapps ● Using X* technologies end-to-end for web applications ● Most existing XML databases provide proprietary framework for that (eXist, MarkLogic, Sausalito, etc.) ● Then again, we are stuck with processor- locked applications ● A standard would allow to write portable web applications, libraries and frameworks
  • 36. Request / response <web:request servlet="name" path="/path" method="get"> <web:uri>http://example.org/my-app/path/one?p=v</web:uri> <web:authority>http://example.org</web:authority> <web:context-root>/my-app</web:context-root> <web:path> <web:part>path/</web:part> <web:match name="which">one</web:match> </web:path> <web:param name="p" value="v"/> <web:header name="connection" value="keep-alive"/> ... </web:request> <web:response status="200" message="Ok"> <web:header name="..." value="..."/> ... <web:body content-type="text/html" method="xhtml"/> </http:response>
  • 37. Entry point ● Either a: – XQuery function – main XQuery module – XSLT function – XSLT named template – XSLT stylesheet – XProc pipeline ● Must accept two parameters – the request element – the sequence of bodies (possibly empty)
  • 39. Web descriptor ● Map requests to entry points ● Based on URI matching
  • 40. Packaging ● A webapp is packaged as any standard project ● The web descriptor is inserted next to the package descriptor ● All the resolution mechanism is already there
  • 41. Building block ● Once again, the webapp spec follow the same principle than packaging: defining only the strict minimum low-level mapping between an HTTP request and an X* component (and its response back to HTTP) ●
  • 42. EXPath Packaging ● Introduction ● The problem ● How to use it? ● Write a package ● A project structure ● Going further ● Conclusion ←
  • 43. Join the mailing list and browse the website: http://expath.org/