[perforce] component based development in perforce
DESCRIPTION
Modeling a complex product built from hundreds of software components is a difficult challenge. Perforce provides all the necessary building blocks: a scalable repository, flexible data management, and robust APIs. See how component development can be modeled in Perforce.TRANSCRIPT
![Page 1: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/1.jpg)
1
Component Based Development in Perforce
Randy DeFauw Senior Product Manager
Sven Erik Knop Lead Consultant
![Page 2: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/2.jpg)
2
What is Component Based Development? CBD Defined
![Page 3: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/3.jpg)
3
What are Components?
§ Well defined interface and hidden internals § High cohesion and low coupling § Independent test and release schedules § Often developed by separate teams or third-party
§ Examples: § Drivers, Services, Car parts, Phone modules, …
![Page 4: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/4.jpg)
4
What is Component Based Development?
§ Products build out of components § Assembly and configuration
§ Separation of concerns § Specialization of skills § Agile workflow and high flexibility
![Page 5: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/5.jpg)
5
Why use CBD?
§ Break complex problems into smaller units § Reassemble and reconfigure for new products § Reduced cost through
§ Reuse § Simplified maintenance
§ Minimal impact of change
![Page 6: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/6.jpg)
6
Example of a CBD project
§ Components § Can be swapped for testing § Might need to be configured § Can be assembled locally during
development § Can be upgraded independently
MP3
Decod
er
Flash Storage
Audio PWM
Flash Storage
FAT File System
USB Mass Storage
SD Card Storage
GUI A
pplicaE
on
Touch screen controller
LCD Driver
Embedded XX Audio Project
Player
ApplicaE
on Stream
s Buff
er
Test
ApplicaE
on
MP3
Decod
er
![Page 7: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/7.jpg)
7
Challenges
§ Projects need to be prepared for components § Dependencies and interfaces § Requires special tooling
§ Creation of configurations for development and test § Reproducibility of delivered configurations
![Page 8: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/8.jpg)
8
Scale of the problem
§ Large projects can contain 1000s of components § Often grouped into super-components
§ Examples § Car Infotainment Systems § Mobile Phones § Financial services application
![Page 9: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/9.jpg)
9
Pieces of the Solution Building blocks
![Page 10: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/10.jpg)
10
A framework, not a complete building
Scalable repository
Flexible data model
Robust extension points
![Page 11: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/11.jpg)
11
Scalable repository
§ Hold all the components § Simplified management § Easy updates as the projects and components
change
![Page 12: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/12.jpg)
12
Flexible data model
§ The way that users work with data shouldn’t have to align with how you store the data
§ Respond quickly to changing code base or requirements
![Page 13: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/13.jpg)
13
Extension points
§ APIs for tooling § Building projects § Interacting with other processes
§ Process control § Triggers, broker § Enforce policies
§ User tools § Simplify workflow § Available in command line or GUI
![Page 14: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/14.jpg)
14
Patterns Putting the pieces together
![Page 15: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/15.jpg)
15
Workspace generation
§ Assemble the right view for a project § The right dependencies § The right versions
§ Update the view if the project changes
Physics package
Game engine
Animation
Physics
Engine
Art
Enterprise Repository
Workspace
View Map
![Page 16: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/16.jpg)
16
Access control
§ Beyond the protections table § Per-role, per-project permissions § Read in one project, write in another
![Page 17: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/17.jpg)
17
Merge management
§ Define pathways for merges § Based on role § Based on how a component is
used in the project § Define merge rules
§ Only bug fixes for some components
§ Regular merge down, copy up for active components
![Page 18: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/18.jpg)
18
Workspace storage
§ Leverage storage solutions for workspace cloning § ZFS clones or commercial equivalent § FUSE
§ Provides efficient data management for large workspaces (> 1 GB)
§ Fast workspace creation and duplication
![Page 19: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/19.jpg)
19
A Reference Framework A starting point with visual tools
![Page 20: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/20.jpg)
20
Goals
§ A starting point, not a complete solution § Illustrate how the tools can solve different parts
of the problem § Triggers for policy enforcement § Broker as a centralized substitute for end user tools § P4V applets for visual guidance
![Page 21: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/21.jpg)
21
Component Data Model
![Page 22: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/22.jpg)
22
Data Model Example
<configuration> <component> <depotPath>//depot/comp/audio/...</depotPath> <access>active</access> <clientLocation>audio/...</clientLocation> </component> <component> <depotPath>//depot/comp/encoder/...</depotPath> <access>write</access> <clientLocation>encoder/...</clientLocation> </component> <component> <depotPath>//depot/comp/test/...</depotPath> <view>comp.test.l</view> <access>read</access> <clientLocation>test/...</clientLocation> </component>
Depot path locaEon
Access: acEve, writable, read, binary
LocaEon in workspace
A label that narrows the set of included files, or grabs a specific version
![Page 23: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/23.jpg)
23
Use Cases
§ Configuration CRUD (CLI/P4V) § Generate workspace § Update workspace when configuration changes § Switch workspace to new configuration § Smart sync § Intercept edit/submit to enforce configuration rules § List component consumers (dependency
relationships)
![Page 24: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/24.jpg)
24
Configuration CRUD
![Page 25: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/25.jpg)
25
Trace Dependencies
![Page 26: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/26.jpg)
26
Nuts & Bolts
§ Uses triggers, broker, and P4V applets § Custom commands defined § Guard rails in place
§ Defines storage location for scripts and configuration in depot
§ Uses XML data formats § Uses spec depot and attributes § Written with P4Python
![Page 27: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/27.jpg)
27
Enhancements
§ Component hierarchies / nesting § More flexible command usage – specify file
arguments, override defaults § Support streams § Immutable / Automatic labels § Multiple depot paths per component
![Page 28: [Perforce] Component Based Development in Perforce](https://reader034.vdocument.in/reader034/viewer/2022042613/548401935906b5ad158b46ee/html5/thumbnails/28.jpg)
28
Questions? Contact us!