Making the case for Play Framework and Scala- Budapest Ping-Conf (2014)


Published on

Published in: Technology, Business
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Making the case for Play Framework and Scala- Budapest Ping-Conf (2014)

  1. 1. Making the case for Play Children’s interactive
  2. 2. Adam Evans CBeebies Tech Lead Asher Glynn Technical Architect Children’s interactive
  3. 3. CBeebies Children’s interactive
  4. 4. What is it? • • • • • Website for children aged 4-6 An aggregate view of BBC content 2 million unique users a week High UX demands, our audience cry’s Built using PHP and a long forked version of Zend MVC Children’s interactive
  5. 5. The (old) Architecture CBEEBIES PAL SOLR ELECTRON RESTFUL SERVICES FORGE Children’s interactive NITRO GAMES GRID
  6. 6. • • • • • • • Large legacy codebase The Issues Cutting edge in BBC at time Original developers long gone Hard to work on new features with confidence Quality of tests vary • • Retro fitted on top Hard to do well with the existing codebase PHP’s not designed for aggregating data from multiple restful services Business needs have changed Children’s interactive
  7. 7. The Opportunity “Responsive” Children’s interactive
  8. 8. What we done on our summer holiday • • • Clear message to management • • • What the problems were What we should do about it What they should expect Used experience and judgement for recommendations • • • Time critical - we were in trouble No beauty competitions Had clear justifications Confidence and decisiveness gave management confidence for a spike Children’s interactive
  9. 9. Play framework Why did we choose it? • • • Scala Full stack Web Framework Reactive architecture is great when calling web services, non blocking - fits exactly our problem type • • Typed template system is amazing Lots of industry buzz Children’s interactive
  10. 10. The First Spike • • • • Addressed stakeholder concerns: • • • Business value of the product is in the front end Could show (visually) immediate progress Backends aren’t (visually) impressive Created responsive templates from a mocked data layer Setup basic build pipeline to AWS - immediate productivity impact Demonstrated skills transfer to existing team members Children’s interactive
  11. 11. The First Spike • • • Success!!! Compelling enough to have our stakeholders commitment A 2 man team of Java/Scala + PHP/Javascript • • Collaborate effectively Become productive quickly Children’s interactive
  12. 12. Moving forward • • • How do we take a team of developers into Scala? How do we resource? How do we manage the risks? AND • How to migrate smoothly from the previous Apache/Tomcat platform??? Children’s interactive
  13. 13. The Team • • • • • Started small - 3 developers Split frontend/backend PHP focused on front end to get familiar (avoid Scala overload) Backend started out Java-like with Scala’s syntactical sugar Big recruitment drive Children’s interactive
  14. 14. The New Architecture [Should be pretty diagram here] • • • • • Version Control - GIT Build - Jenkins Deployment - AWS Continuous Delivery (almost) App and Web server - Play 2 Children’s interactive
  15. 15. … after rethinking Started with Ended with Varnish AWS ELB Nginx + mod_pageseed Nginx + mod_pageseed Play Play …overthought the problem Children’s interactive Play Play
  16. 16. Risky business We’re doing things differently not necessarily new (Going outlaw but in a nice Robin Hood kind of way) • • • Heavy use of Java in the BBC. Extensive expertise on the JVM Already some use of AWS for internal systems Extensive change was unavoidable - regardless of the change was Children’s interactive
  17. 17. The approach No more tears - set by Editorial children's not developers tears (or product managers or development managers) • • • • • Children’s interactive Iterative Discrete Tough editorial demands Tough editorial timeframes Tough audience!
  18. 18. The approach • • • Distinct vertical sections • Index pages after content pages A section at a time Updated content item pages first Children’s interactive
  19. 19. The approach Vertical Plugins DAO/ DAO/ DAO/ DAO/ DAO/ DAO/ DAO/ Templates Templates Templates Templates Templates Templates Templates Play allows modularisation • Can develop in isolation • Game Songs Makes Storie Watch Radio Shows • Can deploy in isolation • Can test in isolation Default Theme Templates Data Access Libraries/Templates Horizontal Plugins Children’s interactive
  20. 20. Keeping it real (simple) • • • • Local in memory cache Used Guice rather than Cake Simpler, less boilerplate More familiar for Java devs Runtime configuration changes possible Opted out of some “kitchen sink” components in Play Started at the view/templates to drive design • • • Children’s interactive
  21. 21. Where we are now • • • • We have our first live release. First public facing AWS + Scala Application Management buy in for new model with Continuous Delivery Stakeholders very happy with turnaround of features Children’s interactive
  22. 22. Things we’ve learnt • • • • • Hit a few small bugs in Play • • Open source makes it easier to find root cause Vast number of base libraries/products Constantly learning Scala’s cool factor makes it easier to recruit Some things are hard to test in Play out the box It’s easy to get carried away with idiomatic Scala Children’s interactive
  23. 23. • • • Constant engagement with stake holders managing a risky move PHP Developers have found it hard • • • Syntax / FP concepts appear scary/overwhelming Patterns such as DI are new Lots of Scala tries to be academically clever Java developers • • Find certain aspects hard being different (testing) Can sometimes get carried away with new power sacrificing simplicity Children’s interactive