+ All Categories
Home > Technology > [Perforce] Component Based Development in Perforce

[Perforce] Component Based Development in Perforce

Date post: 06-Dec-2014
Category:
Upload: perforce
View: 513 times
Download: 5 times
Share this document with a friend
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.
28
1 Component Based Development in Perforce Randy DeFauw Senior Product Manager Sven Erik Knop Lead Consultant
Transcript
Page 1: [Perforce] Component Based Development in Perforce

1  

Component Based Development in Perforce

Randy DeFauw Senior Product Manager

Sven Erik Knop Lead Consultant

Page 2: [Perforce] Component Based Development in Perforce

2  

What is Component Based Development? CBD Defined

Page 3: [Perforce] Component Based Development in Perforce

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

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

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

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

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

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

9  

Pieces of the Solution Building blocks

Page 10: [Perforce] Component Based Development in Perforce

10  

A framework, not a complete building

Scalable  repository  

Flexible  data  model  

Robust  extension  points  

Page 11: [Perforce] Component Based Development in Perforce

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

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

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

14  

Patterns Putting the pieces together

Page 15: [Perforce] Component Based Development in Perforce

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

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

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

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

19  

A Reference Framework A starting point with visual tools

Page 20: [Perforce] Component Based Development in Perforce

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

21  

Component Data Model

Page 22: [Perforce] Component Based Development in Perforce

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

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

24  

Configuration CRUD

Page 25: [Perforce] Component Based Development in Perforce

25  

Trace Dependencies

Page 26: [Perforce] Component Based Development in Perforce

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

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

28  

Questions? Contact us!


Recommended