Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
@LinkedInEng
Play on Gradle
Midtier Behind linkedin.com
JavaOne - San Francisco - 10/2017
● Yiming Wang, Szczepan Faber (L...
@LinkedInEng
Play @LI
● 300+ apps, 100s of engs
● SBT -> Gradle = productivity
● Play on Gradle project
○ How to drive dis...
@LinkedInEng
Why of Play @LI?
● Avoiding thread pool hell
● Really, really hot reload
● Unfulfilled hope for Scala
to impr...
@LinkedInEng
History of Play @LI
● Rollout in 2013
● Hitting problems of scale
○ Hot reload?
○ Dep. Mgmt.
○ Workarounds in...
@LinkedInEng
History of Play on Gradle
● Play on Gradle?
○ Dep. mgmt (ivy)
○ IDE import
○ Dual infra
○ Dominant build syst...
@LinkedInEng
Play on Gradle
● 2014 - sponsored
● 2015 - OSS completed
● 2016 - deprioritized @LI
● 2017 - in production!
@LinkedInEng
2016Q4 - restart
● Rapid prototyping
● Identify unknowns
● Getting metrics, soliciting help
● Forming cross-o...
@LinkedInEng
linkedin.com architecture
● Architecture of linkedin.com (“Flagship”),
probably the biggest Play app in the
w...
@LinkedInEng
● linkedin.com (flagship) is modern single-page app
● LinkedIn has more products than linkedin.com
● Traditio...
@LinkedInEng
2017 - Play on Gradle in Production
● 310 total play apps
○ ~40 Frontend apps (modern)
○ ~160 Frontend API + ...
@LinkedInEng
Gradle vs SBT
● Stats (all measured by
application owners)
● Very useful Gradle parallel
build (100% faster)
...
@LinkedInEng
User’s feedback
@LinkedInEng
SBT -> Gradle Migration Effort
● Most migrations take 2-4 hours, some take months
● Migrations are carried ou...
@LinkedInEng
Using and learning
Gradle
● Learning curve
● Debugging &
forking OSS
● Pull Requests
● Sponsoring more
featur...
@LinkedInEng
Gradle best practices
● Java 8 for code
● Groovy for tests (spock!) and
Gradle DSL special cases
● It’s not e...
@LinkedInEng
Our tactics
● Porting our custom SBT plugins
● Fallback strategy: side-by-side
SBT & Gradle
● Incremental ado...
@LinkedInEng
PonG future at
LinkedIn
● Play Frontends
● Gradle Distributed
Cache
● Co-ownership of OSS
● Ambition: steer P...
@LinkedInEng
Top takeaways
● Careful with frameworks
with custom build tool
● Top-down VS bottom-up
○ It’s what you don’t ...
@LinkedInEng
You deserve great tools
LinkedIn talks at JavaOne:
● Play on Gradle - Midtier behind
linkedin.com
(this talk ...
@LinkedInEng
Thank you!!! Questions?
Play on Gradle: Midtier Behind linkedin.com
JavaOne - San Francisco - 10/2017
● Yimin...
Upcoming SlideShare
Loading in …5
×

JavaOne'17 talk: Play on Gradle and the Midtier behind linkedin.com

887 views

Published on

JavaOne talk on how our team at LinkedIn maximizes developer productivity at scale with Gradle and Play Framework.

Overview of the talk: https://www.linkedin.com/pulse/javaone-talk-play-framework-gradle-productivity-linkedin-faber

This JavaOne talk was not recorded. However, we did a similar presentation at the Gradle Summit conference in June 2017. We learned and make significant progress since the Gradle Summit but you should find the video useful: https://www.youtube.com/watch?v=j0hjJ_U-0yY

Presentation abstract, as in JavaOne Session Catalog:

linkedin.com is built with EmberJS, but under the bonnet, there are midtier services built with Play Framework, coded predominantly in Java 8 with a minimum amount of Scala code. Most Play apps in the world are developed, tested, and built with SBT, the standard Scala automation tool. LinkedIn is (finally!) using Gradle and Java to drive its production Play apps. Attend this session to learn how LinkedIn significantly improved developer productivity by switching from SBT to Gradle. It believes that it is the first enterprise to develop massive production Play applications with Java 8 and Gradle instead of the traditional Scala and SBT.

Google slides: https://docs.google.com/presentation/d/1ki8-BYi6NbpTZKgCeU4KzxpQDvGLmVzKRazBT46WZjY/edit

Published in: Software
  • After many failed attempts, I almost packed in my GCSE maths altogether. But fortunately I didn't, thanks to Jeevan's guide! When I read it, I found out exactly where I was going wrong all this time! I followed his approach and achieved 90% in my next sitting. I was shocked and I thought it was a total fluke so I put his strategy to the test again. This time, I got 100%! Fantastic! If only I came across Jeevan's strategy sooner. Learn more.. ■■■ http://ishbv.com/jeevan91/pdf
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

JavaOne'17 talk: Play on Gradle and the Midtier behind linkedin.com

  1. 1. @LinkedInEng Play on Gradle Midtier Behind linkedin.com JavaOne - San Francisco - 10/2017 ● Yiming Wang, Szczepan Faber (LinkedIn Dev Tools) ● Gary Lin (LinkedIn Play team) ● Vinyas Maddi (Flagship Productivity) ● Zachary Glagola (not here today) ● We are hiring! Make the impossible possible Make the possible ellegant
  2. 2. @LinkedInEng Play @LI ● 300+ apps, 100s of engs ● SBT -> Gradle = productivity ● Play on Gradle project ○ How to drive disruptive change in a huge company? ○ How to build Gradle plugins at scale?
  3. 3. @LinkedInEng Why of Play @LI? ● Avoiding thread pool hell ● Really, really hot reload ● Unfulfilled hope for Scala to improve productivity ● https://engineering.linkedin.com/play/play-framework-linkedin ● https://www.youtube.com/watch?v=8z3h4Uv9YbE&t=3s
  4. 4. @LinkedInEng History of Play @LI ● Rollout in 2013 ● Hitting problems of scale ○ Hot reload? ○ Dep. Mgmt. ○ Workarounds in build logic (SBT)
  5. 5. @LinkedInEng History of Play on Gradle ● Play on Gradle? ○ Dep. mgmt (ivy) ○ IDE import ○ Dual infra ○ Dominant build system @LI (c++, python, go, mobile, Java) ○ Gradle partnership
  6. 6. @LinkedInEng Play on Gradle ● 2014 - sponsored ● 2015 - OSS completed ● 2016 - deprioritized @LI ● 2017 - in production!
  7. 7. @LinkedInEng 2016Q4 - restart ● Rapid prototyping ● Identify unknowns ● Getting metrics, soliciting help ● Forming cross-org team ○ Foundation + Product teams ● Engaging with OSS
  8. 8. @LinkedInEng linkedin.com architecture ● Architecture of linkedin.com (“Flagship”), probably the biggest Play app in the world ○ Frontend: Play (serves index.html) + emberJS ○ Frontend API: Play (serves JSON) ○ Mid tiers: Play (serves JSON) ● Linkedin.com Frontend API is the biggest to migrate - 3-quarter effort
  9. 9. @LinkedInEng ● linkedin.com (flagship) is modern single-page app ● LinkedIn has more products than linkedin.com ● Traditional multi-page apps from LinkedIn: Play + Dust ● The hardest to migrate to Gradle Beyond flagship
  10. 10. @LinkedInEng 2017 - Play on Gradle in Production ● 310 total play apps ○ ~40 Frontend apps (modern) ○ ~160 Frontend API + Mid tier ○ ~110 Frontend apps (Play+Dust) ● 110 already migrated to Gradle ○ ~40 Frontend apps (modern) ○ ~60 Frontend API + Mid tier ○ ~10 Frontend apps (Play+Dust) ○ Examples: LinkedIn, LinkedIn Learning, LinkedIn Lite ○ Linkedin.com Frontend API - coming soon!
  11. 11. @LinkedInEng Gradle vs SBT ● Stats (all measured by application owners) ● Very useful Gradle parallel build (100% faster) ● Gradle “-x” is the king (highly flexible) Speed up Large scale app example Build 2-5 x 36 min -> 9 min IDE refresh 5-8 x 30 min -> 4 min Hot reload 2-5 x 7 min -> 1.5 min
  12. 12. @LinkedInEng User’s feedback
  13. 13. @LinkedInEng SBT -> Gradle Migration Effort ● Most migrations take 2-4 hours, some take months ● Migrations are carried out by application owners (decentralized efforts) ● Provide good migration guides (self-service) ● Set a few good example projects to cover all SBT use cases ● Provide great tools so that teams are motivated to adopt and experiment
  14. 14. @LinkedInEng Using and learning Gradle ● Learning curve ● Debugging & forking OSS ● Pull Requests ● Sponsoring more features
  15. 15. @LinkedInEng Gradle best practices ● Java 8 for code ● Groovy for tests (spock!) and Gradle DSL special cases ● It’s not enough that the task works, it needs to be incremental ● Modular tasks, well architected, rewrite when required ● Push with high confidence - automatically testing with all apps ● Equally important: build code, test code, production code
  16. 16. @LinkedInEng Our tactics ● Porting our custom SBT plugins ● Fallback strategy: side-by-side SBT & Gradle ● Incremental adoption: first developers, then deployment ● Rewriting existing Gradle plugins @LI for quality/incremental ● Avoiding new Gradle configuration model
  17. 17. @LinkedInEng PonG future at LinkedIn ● Play Frontends ● Gradle Distributed Cache ● Co-ownership of OSS ● Ambition: steer Play towards Gradle
  18. 18. @LinkedInEng Top takeaways ● Careful with frameworks with custom build tool ● Top-down VS bottom-up ○ It’s what you don’t know that you don’t know that gets you into trouble ● Gradle: make impossible possible, make possible ellegant. ● Cross-org teams rock! ● Pragmatism
  19. 19. @LinkedInEng You deserve great tools LinkedIn talks at JavaOne: ● Play on Gradle - Midtier behind linkedin.com (this talk - hope you liked it!) ● Commit-to-production pipeline at LinkedIn (slides+video on slideshare.net) Stay tuned for videos and summaries at LinkedIn Engineering Blog (@LinkedInEng)
  20. 20. @LinkedInEng Thank you!!! Questions? Play on Gradle: Midtier Behind linkedin.com JavaOne - San Francisco - 10/2017 ● Yiming Wang, Szczepan Faber (LinkedIn Dev Tools) ● Gary Lin (LinkedIn Play team) ● Vinyas Maddi (Flagship Productivity) ● Zachary Glagola (not here today) ● We are hiring! Make the impossible possible Make the possible ellegant

×