How we use the play framework
Transcript of How we use the play framework
AutodeskHow we use Play Framework (and other cool technologies...)
Autodesk and Homestyler
• About Autodesk (what the company does, and the Tel-Aviv R&D)• Homestyler group:
• Great 3D applications for home design (iOS, Android, Web)• Serving millions of users• Active and responsive community
http://www.homestyler.com/http://www.homestyler.com/mobilehttp://www.homestyler.com/floorplan/
Homestyler Backend Team
• Responsible for the services provided to all the clients (iOS, Android, Web), and some other clients as well
• We keep a lot of data for a lot of users, so we need to be:• Robust• Scalable• Agile
• Plus, we like to enjoy writing our code, and to try out new technologies :)
Using Scala
In the last year, we’ve re-written and extended our backend, using Scala over Play Framework, to support the growing demands of the app.
Why Scala?• Functional, elegant and modern version of java• A lot of useful language features built-in• Growing and active community• Full compatibility to java code and libraries• Less code, easier for async applications• And it's more fun!
Continuous Integration
We do CI. Why?• Providing services for a several products with different timelines• Robustness• Reactive• Agile
Technologies We Use
• Scala 2.11, Play 2.3• Couchbase, MySql• Elastic Search• Swagger, jacoco• Splunk, Teamcity• CloudFront, Redis• EC2, S3, SNS, SQS, Autoscaling• ADA (Adsk internal)
Architecture (Simplified)
CouchBase
MySQL
ElasticSearch
CatalogBE
PortfolioBE
UsersBE
FP/HSMMW
InspirationMW
SeekMW
FloorPlan
Inspiration
HSM - Android
HSM - iOS
Seek
CF Redis
Play! What do we Use?
• Multi-layer: routes -> controllers -> services -> repositories• Async abilities of both Scala and Play:
• Prevents bottlenecks• Akka's actor model, should provide good performance
• Statelessness: since we are writing a REST API backend• sbt for dependency management:
• Simple to integrate new plugins• Easy deployment
• JUnit: built-in, plus great testing support
Play! What do we Use?
• Easy to create new projects:• Different backend modules, or BO apps; All created quickly.• Out of the box: routing, mvc structure, tests infrastructure
• Scala html templates (but that's not perfect)• Cool plugins (grafana, swagger, scoverage, etc)
Our case: Building a new backend
We’ve replaced our old backend with a new shining one:
• Easy to start with a proper structure• Re-writing in Scala was fun and compatible• Re-routing all the requests of a live and busy application• TDD as a productive workflow• Using Swagger plugin to ease integration with other teams• Using Grafana plugin to monitor the change and see live data!• A stack of modern technologies compatible with Play
Summary (Shall we Play)?
• For Scala, Play is a no-brainer• But even in Java:
• Spring and Struts are more J2EE driven, while Play tries to be free from that load
• Provides a lot of features to get you started fast, and write in a proper structure
• Performance is good - Not sure there’s any good comparison with the competitors.
• Play has a nice balance between things given out-of-the-box and suggested workflows, with flexibility and openness for extension
Questions?