Download Presentation

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
P4WSP: The Perforce Web
Services Platform
Hamish Reid
Software Engineer
A MANIFESTO
•  Perforce As A Platform:
• 
• 
• 
• 
Extensible – P4D is only the beginning…
Open – standards-based access and extensions
Seamless integration – Perforce? What’s Perforce?
Smart – do the right things in the right place
•  (Uniform) Access Everywhere:
•  HTTP / HTTPS access to objects and services
•  URLs are the common currency for everything
A MOTIVATING PROBLEM
Your business needs to implement workflow and
standards support across the enterprise:
• 
• 
• 
• 
• 
Standard technologies / standard developers
Drag-and-drop “grab and share” for non-techies
Policy-based – e.g. “no Open Source code submits”
Browser-based tools where possible
Open / flexible / extensible implementation
A MOTIVATING PROBLEM
•  Do you use:
• 
• 
• 
• 
Perforce triggers (with Python or shell scripts, etc.)?
The broker?
A custom standalone solution based on a P4 API?
Something else, perhaps involving bits of baling wire
and string?
•  Or do you use a hosted middleware app that’s:
•  Based on an industry-standard platform (JEE)
•  Flexible, policy-driven, configurable / updateable on the
fly… using standard patterns and technologies
•  Integrated into the Perforce world
•  Integrated into the Enterprise universe
•  Accessible using URLs only (no special APIs)?
THE SOLUTION
P4WSP: The Perforce Web Services Platform:
•  URI access to Perforce resources, objects, and
services;
•  Extensible JEE platform:
•  Extensible Perforce services and resources
•  App hosting with integrated Perforce support
P4WSP: HTTP URL ACCESS TO PERFORCE
•  Resources:
•  Full RESTful CRUD access
•  HTTP GET / PUT / POST / DELETE usage
• 
• 
• 
• 
Services – non-REST URI access
Command parameters as URI query parameters
Request and result payloads as XML, JSON, HTML
Examples:
http://localhost:8080/p4/resources/clients?user=“hreid”
http://localhost:8080/p4/resources/clients/hreid-test-111
http://localhost:8080/p4/services/list?files="//depot/dev/jteam/..."
P4WSP: THE EXTENSIBLE PERFORCE PLATFORM
•  Standard Java JEE container:
•  P4WSP proxy container mediates access to P4D
•  Multiple P4D servers possible
•  Eclipse Virgo with OSGI and Spring plumbing / support
•  Defined extension points:
• 
• 
• 
• 
OSGI bundles, Java packages
Custom agents implement actions / operations
Interceptors implement data transforms / filters
Authentication
•  Extension support:
•  P4D command / result canonicalization
•  OSGI lifecycles
P4WSP: USAGE MODELS – REST & URLS
•  Web browsers:
•  Simple depot browsers (a la p4web)
•  Complex full-feature browser-based apps
•  Javascript / JSON, HTML 5, XML support
•  Other JEE apps:
•  XML, etc.
•  Standalone apps (e.g. P4Eclipse)
P4WSP: USAGE MODELS – EXTENSIONS
•  Interceptors:
•  Form type field validators
•  Form rewrites (e.g. new / changed fields in jobs)
•  P4D command augmentation, aggregation, or
replacement, e.g.:
• 
• 
• 
• 
• 
Check for Open Source usage on submits (Black Duck)
Single-step complex integrate / resolve
Tie-ins with jobs / issues systems
Cross-server commands
Caching, events
•  New services:
•  P4D-related … or not.
A P4WSP APP EXAMPLE: “THE COMMONS”
•  “Versioning for the rest of us…”:
• 
• 
• 
• 
Hides Perforce (Perforce? What’s Perforce?!...)
Drag and drop grab and share (edit / submit)
Submit to common icon
No concept of “depot”, “server”, “client”, etc. Policybased resolves, integrates, etc.
•  URL-based access everywhere:
•  All resources and services accessed as URLs or icons.
•  URLs passed around via email, SMS, web browsers.
•  Heavily reliant on P4WSP:
•  Listing / browsing / client editing
•  App hosting
SUMMING UP
•  P4WSP presents Perforce as a platform:
ü  Standard
ü  Accessible
ü  Extensible
ü  Open
•  P4WSP enables:
• 
• 
• 
• 
Browser-based apps
Middleware apps and logic
Smart functionality factoring
A seamless user experience.
Related documents