Software development • Several users work on a same project – Remote or collocated users – Each one works on its own computer Groupware and Collaborative Interaction (asynchronous) Collaborative Software Development • Work on different tasks • Work at different times ! • Collaboration is hard to organize M2R Interaction - Université Paris-Sud - Année 2013-2014 – Versioning, synchronization between users Cédric Fleury (cedric.fleury@lri.fr) – Tasks distribution, social aspects Collaborative Software Development - M2R Interaction - Cédric Fleury ! 2 Outline Outline • Collaborative software development • Collaborative software development ! ! – Version control – Version control ! ! – Continuous integration – Continuous integration ! ! – Agile methods – Agile methods Collaborative Software Development - M2R Interaction - Cédric Fleury ! 3 Collaborative Software Development - M2R Interaction - Cédric Fleury ! 4 Version control Version control • Problematic • Problematic – We want to avoid this: – We want to avoid: • Manually share the files (USB key, email, Dropbox) • Delete or overwrite the files of other users • Broke all the project by making a mistake ! – We want to able to: • Edit the project at the same time • Keep an history of the modification • Keep the older version of the files + hierarchy [“Piled Higher and Deeper” by Jorge Cham: www.phdcomics.com] Collaborative Software Development - M2R Interaction - Cédric Fleury ! 5 Collaborative Software Development - M2R Interaction - Cédric Fleury ! 6
Version control Version control • Version control software • 2 kinds of architecture – Save & restore different versions of the files – Centralized – Synchronize users’ versions • CVS, SVN, … – Keep track of modifications and their authors – Decentralized (peer-to-peer): – Manage Branching and merging • GNU Arch, Mercurial, Bazaar, Git,… ! ! • Not only for software development – Decentralized can be used as a Hybrid Architecture – Report, images, data from experiments • One peer can be a central server Collaborative Software Development - M2R Interaction - Cédric Fleury ! 7 Collaborative Software Development - M2R Interaction - Cédric Fleury ! 8 Version control Version control • Centralized • Decentralized architecture architecture Collaborative Software Development - M2R Interaction - Cédric Fleury ! 9 Collaborative Software Development - M2R Interaction - Cédric Fleury ! 10 Version control Version control • Hybrid • Vocabulary (SVN) Centralized Architecture architecture – Architecture • Repository • Working copy – Actions • Checkout • Update • Commit • Revert • Diff, log, status Collaborative Software Development - M2R Interaction - Cédric Fleury ! 11 Collaborative Software Development - M2R Interaction - Cédric Fleury ! 12
Version control Version control • Vocabulary (Git) Hybrid Architecture – Architecture • Drawbacks of the centralized architecture • Remote and local repository – Just one access point to the data • Working copy – Just one communication point between users – Actions – Just one historic of the files • Clone – Versioning and sharing are the same operation • Pull, Push • Need to have a stable state before "committing" • Commit • Reset • Diff, log, status Collaborative Software Development - M2R Interaction - Cédric Fleury ! 13 Collaborative Software Development - M2R Interaction - Cédric Fleury ! 14 Version control Version control • Users can modify the same file • Good practices – But at different part/section of the files – Work on the local copy ! – Send the modification • If they modify the same part of a file • Check if the code compiles locally – A conflict appends • Check for updates from the other users • Usually, it cannot be resolve automatically – Manage conflicts if there are some • Users have to fix the conflit • Check if the code compiles with the updates – By telling to the system, which version is correct • Commit the code on the shared version (server) – By merging the modifications of the users Collaborative Software Development - M2R Interaction - Cédric Fleury ! 15 Collaborative Software Development - M2R Interaction - Cédric Fleury ! 16 Version control Version control • Conflicts management • Conflicts management 08/10/2010 11:44 AM 94 test.txt 08/10/2010 11:44 AM 26 test.txt.mine C:\workspace\test>svn up 08/10/2010 11:44 AM 27 test.txt.r2 Conflict discovered in 'test.txt'. 08/10/2010 11:44 AM 31 test.txt.r3 Select: (p) postpone, (df) diff-full, (e) edit, (r) resolved, (mc) mine-conflict, (tc) theirs-conflict, (s) show all options: p C test.txt test.txt Updated to revision 3. Summary of conflicts: <<<<<<< .mine Text conflicts: 1 test User2 making conflict ======= User1 am making a conflict test >>>>>>> .r3 Collaborative Software Development - M2R Interaction - Cédric Fleury ! 17 Collaborative Software Development - M2R Interaction - Cédric Fleury ! 18
Version control Version control • Tools for conflict management (TortoiseMerge) • Tools for conflict management (TortoiseMerge) Collaborative Software Development - M2R Interaction - Cédric Fleury ! 19 Collaborative Software Development - M2R Interaction - Cédric Fleury ! 20 Version control Version control • Tools for conflict management (SmartGit) • Tools for conflict management (SmartGit) Collaborative Software Development - M2R Interaction - Cédric Fleury ! 21 Collaborative Software Development - M2R Interaction - Cédric Fleury ! 22 Version control Version control • Conflicts management • Collaboration scenario : centralized (SVN) – To avoid conflict: ! • Users are able to "lock" a file – Only the user who locks the file can modify it – If another user try to lock a file while it is locked by another user, he receives an error message ! • Users have to manually unlock the file when they have finished to work on it. Collaborative Software Development - M2R Interaction - Cédric Fleury ! 23 Collaborative Software Development - M2R Interaction - Cédric Fleury ! 24
Version control Version control • Collaboration scenario : decentralized (Git) • Collaboration scenario : decentralized (Git) – Integrator mode • A repository is in charge of the test Inter-personal communications Collaborative Software Development - M2R Interaction - Cédric Fleury ! 25 Collaborative Software Development - M2R Interaction - Cédric Fleury ! 26 Version control Version control • Collaboration scenario : decentralized (Git) • Collaboration scenario : decentralized (Git) – Dictator mode – Multi-location team • Open-source • Each team can work independently projects • Regular integration of the work of each team • "Lieutenants" can be done make a first check before sending to the "dictator" Collaborative Software Development - M2R Interaction - Cédric Fleury ! 27 Collaborative Software Development - M2R Interaction - Cédric Fleury ! 28 Version control Version control • Historic management • Historic management – Computation of the historic is linear – SVN assigns a revision according to the « commit" order number to all the project ! – Git assigns a revision number peer file ! – This difference has a strong impact on collaboration • Using branch for collaboration is easier with Git Collaborative Software Development - M2R Interaction - Cédric Fleury ! 29 Collaborative Software Development - M2R Interaction - Cédric Fleury ! 30
Version Control Version Control • Branch management • Branch management – Merging branch (very complex to achieve with SVN) ! ! ! ! ! – SVN make a copy of the all repository – Git make a link to a particular state of the files Collaborative Software Development - M2R Interaction - Cédric Fleury ! 31 Collaborative Software Development - M2R Interaction - Cédric Fleury ! 32 Version Control Version Control • Branch management • Branch management – Each user can work on particular branches – Classical organisation – Branches can be synchronized between users of a project into branches ! http://nvie.com/posts/a- successful-git-branching-model/ Collaborative Software Development - M2R Interaction - Cédric Fleury ! 33 Collaborative Software Development - M2R Interaction - Cédric Fleury ! 34 Outline Continuous integration • Integration • Collaborative software development – Merging the work of several developers ! – Version control • Goals ! – Test modifications form the beginning – Continuous integration – Detect integration problems at an early stage ! – Avoid fastidious integration phases – Agile methods – Always have the system running • Tests, demos, discussion with the customers http://martinfowler.com/articles/continuousIntegration.html Collaborative Software Development - M2R Interaction - Cédric Fleury ! 35 Collaborative Software Development - M2R Interaction - Cédric Fleury ! 36
Recommend
More recommend