Guiding Diffy to the Enterprise land
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
318
On Slideshare
318
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
1
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. 1 Copyright ©2014 CollabNet, Inc. All Rights Reserved.ENTERPRISE CLOUD DEVELOPMENTENTERPRISE CLOUD DEVELOPMENT Guiding Diffy to the Enterprise land Dariusz Luksza Eryk Szymanski CollabNet Engineering, Potsdam, Germany
  • 2. 2 Copyright ©2014 CollabNet, Inc. All Rights Reserved. ● First TeamForge Gerrit integration was hacked into 2.1 – this means close to zero possibility of update ● About 1,5 year ago we started our journey … ● So we started from scratch with 2.6 and its plugin architecture ● We had only three requirements: – Keep same behaviour and API as we had in 2.1 – Keep same performance characteristics – Make it easy to update to newest upstream version
  • 3. 3 Copyright ©2014 CollabNet, Inc. All Rights Reserved. ● Few stats about our biggest plugin: – cat `find src/main/java -name "*.java"` | wc -l 11962 – du -sh src/main/java 828K src/main/java ● This is actually plugin responsible for synchronization with TeamForge
  • 4. 4 Copyright ©2014 CollabNet, Inc. All Rights Reserved. Expectations Reality The Road From 2.1 to 2.6
  • 5. 5 Copyright ©2014 CollabNet, Inc. All Rights Reserved. The Road From 2.1 to 2.6 Reality
  • 6. 6 Copyright ©2014 CollabNet, Inc. All Rights Reserved. The Road From 2.1 to 2.6
  • 7. 7 Copyright ©2014 CollabNet, Inc. All Rights Reserved. Obstacle 1 missing extension points
  • 8. 8 Copyright ©2014 CollabNet, Inc. All Rights Reserved. ● We are contributing back all our modifications to Gerrit: – Initial support for Web UI plugins (#38330, #38331, #38332), – Fix binding of @Listen annotated extensions points in HTTP and SSH module (#39293), – Bump GWT to 2.5.0 version and fix connected issues (#39540, #39610 #38962), – Prevent from deleting refs/changes/ (#40385), – Fix GitWeb Caching (#41360), – Add additional context for group name suggester API (#40123), – Initial work on making JavaSript plugins architecture more pleasant for JS developers (#39270), – Allow include external group into internal one and set external group as a owner of internal one (#46840, #47020), – Add --list-plugins and --install-pliugin parameters to init step (#47818, #47819), – Fix ChangeMergedEvent parameter for merged patch sets (#48221) – Improvements to logging subsystem (#51890, #52164) – Make plugin servlet's context path authorization aware (#51192) – Get rid of JdbcSQLException while numbers are read from cache (#51193)
  • 9. 9 Copyright ©2014 CollabNet, Inc. All Rights Reserved. ● But still some of our core contributions are in the review: – Authentication extension point – Secure store extension point – Commit verification fast path ● So what? – Instead of investing our time in new features (like Angular- Gerrit) we are burning our cycles rebasing, resolving conflicts and testing above functionalities with current stable branch
  • 10. 10 Copyright ©2014 CollabNet, Inc. All Rights Reserved. Obstacle 2 redeploy & friends
  • 11. 11 Copyright ©2014 CollabNet, Inc. All Rights Reserved. ● Each plugin runs in separate ClassLoader ● If one of your libraries is not behaving well (eg. is not cleaning thread locals like Apache Axis does) you will get out of PermGen space after 5th or 10th deploy ● Solution? Simple, always restart gerrit before next deploy ● This work for us for quite long time... since our 4th plugin appears... we loaded Axis (and other dependencies) fourth time and we need to change container.javaOptions to increase PermGen size because Gerrit was unable to load all plugins
  • 12. 12 Copyright ©2014 CollabNet, Inc. All Rights Reserved. ● What is more, separate ClassLoaders for each plugin means NO class instance sharing between plugins! ● Solution? We didn't find one. Currently we share only one single piece of information (the repository ID) between our plugins, using refs/meta/teamforge ref
  • 13. 13 Copyright ©2014 CollabNet, Inc. All Rights Reserved. Obstacle 3 extending Web UI
  • 14. 14 Copyright ©2014 CollabNet, Inc. All Rights Reserved. HistoryProtection UI: Notification UI:
  • 15. 15 Copyright ©2014 CollabNet, Inc. All Rights Reserved. ● Even after our contribution to 2.6 extending Web UI was hard (things dramatically changed in Gerrit 2.8) ● Further modifications in Gerrit were required: – GWT module for REST api – JSNI extensions for REST calls ● Can't start GWT debug session with plugin (fallback to Window.alert() “debugging”) ● GWT based development is SLOOOOW!!
  • 16. 16 Copyright ©2014 CollabNet, Inc. All Rights Reserved. Chasing the community the never ending story
  • 17. 17 Copyright ©2014 CollabNet, Inc. All Rights Reserved. ● Gerrit is a moving target ● Now we are on 2.7 ● Still with 70 additional patches ● Most of them were contributed back... but were not merged yet ● So we are rebasing them on top of upstream ● Next stop? Gerrit 2.8... ● What is the hard part? Finding balance between contributions and our internal modifications
  • 18. 18 Copyright ©2014 CollabNet, Inc. All Rights Reserved.ENTERPRISE CLOUD DEVELOPMENTENTERPRISE CLOUD DEVELOPMENT Thank you! Dariusz Luksza Eryk Szymanski CollabNet Engineering, Potsdam, Germany