f56cf239c6cee551242d04d86efa930c.ppt
- Количество слайдов: 67
CPAN 6 Bottom - UP German Perl Workshop, 21 feb 2007 Mark Overmeer
CPAN is. . “CPAN is the best thing that ever happened to Perl” GDB#1
CPAN is. . “CPAN is the best thing that ever happened to Perl”
CPAN is. . “CPAN is the best thing that ever happened to Perl 5”
CPAN is. . . Just over 10 years younger than Perl 5 WWW UNIX
CPAN is. . . Just over 10 years younger than Perl 5 WWW UNIX . . . developed before break-through of XML/SOAP/WSDL CVS/SVN/SVK/GIT spam, viruses unicode
. . . concerns. . . 11 k distributions, a lot is bad quality or poorly maintained 5700 authors, who is who? who is making the rules of CPAN?
. . . concerns. . . 11 k modules, a lot is bad quality or poorly maintained 5700 authors, who is who? who is making the rules of CPAN? GBD#2 What will happen when infected code is detected on CPAN? Will Perl loose its best thing?
. . . future. . . Where will we store Perl 6 modules pir, pbc, pod only, let the big name-space battles commence! Par. Tcl? Brainf*ck? etc
C Perl 6 Pod Pir Pie. Ton Par. Tcl Pbc 6 AN = CP AN 6 CPAN 6
The Beginning
The process Autho r CPAN modules Users
The process Autho r Read ers Store Books
Release Why do you release material? to share with many people
Release Why do you release material? to share with many people When do you release material? when it is ready
Release Why do you release material? When do you release material? to share with many people when it is ready What can be “released”? coherent collections of bytes in files
Release Why do you release material? When do you release material? when it is ready What can be “released”? to share with many people coherent collections of bytes in files How do we release materials? ftp-servers (CPAN), CDs/DVDs,
Releases ≠ Revisions a logical sequence of development steps of a file each step may solve some bugs each step extends the code and documentation steps are created by a single person Releases are created to be distributed a defined `frozen' state of the software (some combination of file versions) published by someone who is responsible
CPAN ≠ YA VCS CPAN is a collection of releases distributing information name-spaces and trust searching in the collection Version Control Systems manage (related) (development) revisions of files collecting pieces of information traceable changes tracing and solving bugs selected revisions of selected file are released
What is interesting? publish the information authors, publisher
What is interesting? publish the information authors, publisher storing the information stored where for how long who sets the rules
What is interesting? publish the information storing the information authors, publisher stored where for how long who sets the rules download the information search, distinguish who can download: user
What is interesting? publish the information signatures storing the information authors, publisher stored where for how long who sets the rules archive rules trust download the information search, distinguish who can download name-spaces access
What is interesting? publish the information signatures pause-id archive rules trust ftp. cpan. org ever Andreas & co storing the information authors, publisher [CPAN] stored where for how long who sets the rules download the information search, distinguish who can download name-spaces one access everyone
Out of scope for the end-users: how the release was created, as long as it is “stable” and “trustable” for the authors: what the end-user is doing with it, as long as he/she has access permissions.
Out of scope for the end-users: how the release was created, as long as it is “stable” and “trustable” packaging tools: Maker/Module: : Build development versions: CVS, . . . for the authors: what the end-user is doing with it, as long as he/she has access permissions. installation tools: CPAN. pm/CPANPLUS
Out of scope for the end-users: how the release was created, as long as it is “stable” and “trustable” packaging tools: Maker/Module: : Build development versions: CVS, . . . for the authors: what the end-user is doing with it, as long as he/she has access permissions. installation tools: CPAN. pm/CPANPLUS Data distribution can be content independent
Really unimportant how the data it is packaged tar, zip, separate files
Really unimportant how the data it is packaged tar, zip, separate files how it is compressed gzip, bzip 2, diff
Really unimportant how the data it is packaged how it is compressed tar, zip, separate files gzip, bzip 2, diff how it is transported ftp, http, mail, tape, printed
Really unimportant how the data it is packaged how it is compressed gzip, bzip 2, diff how it is transported tar, zip, separate files ftp, http, mail, tape, printed where it is actually located ftp mirror, cd/dvd distribution, git depot
Really unimportant how the data it is packaged how it is compressed gzip, bzip 2, diff how it is transported tar, zip, separate files ftp, http, mail, tape, printed These could best all be hidden to publishers and end-users where it is actually located ftp mirror, cd/dvd distribution, git depot
Needs for Perl 6 place for Perl 6, Pir, Pasm, Par. Tcl, . . . requires Perl 5 to install Perl 6? extended versioning scheme explicit version parallel authoring no deletions: huge pkg list DBI-TIMB, DBI-MARKOV
Problems with Perl 5 Interface breaking changes spamassassin 2 vs. spamassassin 3 Version of distribution/which distribution contains installed package. Long @INC search paths for pm files Impossible to oversee effect of an install request to the system
NO QUICK FIX! but a good alternative
CPAN 6 because Compared to CPAN a wish for information independent: reuse of coding effort more name-spaces: DBI for perl 5, DBI for perl 6 more security; PGP/SSL authentication clear maintenance rules; no GBD archive “tricks” like subsets (cpan-mini) remove ad-hoc configuration of mirrors complex search, server-side know before download: license, nested dependencies, . . . release deprecation, release under embargo and more
CPAN 6 definitions Release: a set of files distributed for a specific purpose to end-users. Project: a set of releases, sharing the name but with different version identifiers. in Perl 5: “a distribution” a name-space entry Archive: a set of projects, collected for some purpose. storage, rules, entry-point an URI
Collections Perl 5 distributions Perl 6 (& friends) distributions conference materials wikipedia articles linux distributions photo or music collections company's press releases newspaper articles cooking recipes pgp public keys use case
Split CPAN 6: idea of having a collection of releases, combined into archives uploading releases downloading releases distributing the archives combining archives filtering archives like mirrors like ftp sites like cpan-mini CPAN 6 is the DISTRIBUTING
Split CPAN 6 is the distributing (network) Pause 6: handles one archive is one name-space is set of releases with some functional relation a set of releases relate to a project(name) projects are allocated to authors have a well-defined identity an archive has well-defined rules, by a board Pause 6 is ADMINISTRATION
Split CPAN 6 is the distributing (network) Pause 6 is the administration (archives) CPAN 6. pm installs Perl 5, Perl 6 etc distributions blends into the platform collects meta-data to publish releases programming language specific component CPAN 6. pm for INSTALLATION
Split CPAN 6 is the distributing Pause 6 is the administration CPAN 6. pm installs releases locally Of course perl -MCPAN 6 'install Test: : More' will work!
Pause 6 is just one possible implementation of the CPAN 6 ideas Releases have project-name utf 8 version utf 8 state type loads of (optional) meta-data follow-up information
Release strands 0 = allocate project name and get name-space rules solid arrow: non-breaking follow-up dashed arrow: code fork
Release states Release state changes require signatures Release states are uploading, initiated by publisher published, distributable to deployers embargo, uploaded but blocked released, by the authors deprecated, by the authors expired, by the authors rejected, by the board/authors installed, by the end-user
Project types project types are: publication constitution identity archive reference license description by user, set of files archive configuration public keys, . . . therefore everything follows same release protocol one transport implementation covers all aspects
Use Cases Board writes constitution Changes in constitution Opening and restricting name-spaces Authors start project Publisher uploads a release
CPAN
CPAN 6/Pause 6 terms Commissioner search for end-users Stores point to upload to, for publishers executes constitution for the archive board Deployers CPAN Pause download locations Scribes CPAN mirrors transport processes publishers to commissioner, comm. to deployers, deployers to users, archive hierarchies
CPAN 6 concept
Pause 6 Implementation
Hierarchy Scribes can be configured to create archive hierarchies, for example: global cpan-perl 5 business level sub-set department sub-set system local personal installed personal development
CPAN 6 network
Use Case Ftp-server with mirrors: initializing a deployer User contacting new archive
Status CPAN 6/Pause 6 global design document CPAN 6 design and implementation doc Pause 6 design and implementation doc Start of an implementation: the creation of large building bricks
Promises All data handling UTF 8 All data definitions in XML schema's No new data exchange protocols use HTTP, FTP, RSYNC, . . . No new communication mechanisms use SOAP, RPC, . . . No new security systems use PGP, SSL, MD 5, SHA-1, . . .
Coherent Documentation Major parts of documentation are generated. Saved Mail: : Box 700 k characters OODoc A must for OO programs exist for many years, used for many years
Data Exchange I hate XML, but. . .
Data Exchange I hate XML, but. . . I hate SOAP: : Lite, so. . .
Data Exchange I hate XML, but. . . I hate SOAP: : Lite, so. . . XML: : Compile in usable state, for this CPAN 6 purpose
XML: : Compile Under control of a schema pure Perl real XML real XML pure Perl perl template (example) XML template (example) Validating, name-spaces, any/any. Attribute, substitution. Groups, WSDL, SOAP, fast No XML in your Perl program!
Platform independence OS independence File: : Spec File: : Basename File: : Copy File: : Remove File: : Temp File: : Path File: : Find often used, OS related Cwd Slurp tainting delete $ENV{PATH} $^O IO: : File: : stat Sys: : Hostname $0 $PROGRAM
Platform independence No File: : Spec, File: : Basename, File: : Find, etc Path: : Class: my $dir = dir 'foo', 'bar'; # Path: : Class: : Dir my $file = file 'bob', 'file. txt'; # Path: : Class: : File # 'bob/file. txt' on Unix, 'bobfile. txt' on Windows print "file: $filen"; my $subdir = $dir->subdir('baz'); # foo/bar/baz my $parent = $subdir->parent; # foo/bar my $parent 2 = $parent->parent; # foo my $dir 2 my $text = $file->dir; = $file->slurp; # dirname = bob
Platform Independence No File: : Spec, File: : Basename, . . . Path: : Class super-set: No Cwd, $^O, delete $ENV{PATH}, etc Sys: : Indep first steps made
Sys: : Indep use Sys: : Indep devel => 'linux'; my $dir = dir '/etc/'; my $f 1 = file '/etc/passwd'; # abs my $f 2 = file 'here. txt'; # rel my $cwd = program->cwd; my $f 3 = file os->home, '. ssh', 'known_keys'; print os->family; # 'unix' my @m = os->volumes; # mount-points # filename mutilated based on file-system rules my $fh = $f 3 ->open('r'); program->find(. . . ); OS Program File/Dir Filesys
User Interaction Would like to have command-line for scripting (many options) interactive commands, like IOS Curses: : UI Tk / wx. Widgets Gtk / Qt XHTML / XUL Transparently based on GNU gettext() schema generated components set of standard code building bricks ?
where we are. . . . discussion and attention contacts with other potential user groups signing, licensing, trust algorithms still a lot of detailed design to do funding to create base implementation money, man-power, test setups 30 k€
f56cf239c6cee551242d04d86efa930c.ppt