SlideShare uma empresa Scribd logo
1 de 63
Baixar para ler offline
@elmanu#playframework
From PHP to the Play Framework in 3 months
Manuel Bernhardt
@elmanu
http://manuel.bernhardt.io
@elmanu#playframework
Agenda
• Background
• Building the new platform
• Data migration
• Operations
• Summary & Future
@elmanu#playframework
Your speaker
•Freelance software consultant
based in Vienna
!
•Web, web, web
•Scala, Akka, Play Framework
!
•Vienna Scala User Group
!
•Open-Source
@elmanu#playframework
Agenda
• Background
• Building the new platform
• Data migration
• Operations
• Summary & Future
@elmanu#playframework
Talenthouse
•www.talenthouse.com
!
•based in Los Angeles
!
•connecting brands and artists
!
•3+ million users
@elmanu#playframework
Background
•Problems with the old site
• Slow
• Developed by an external company
• Hard to evolve
@elmanu#playframework
Background
•Solution: new site!
• Scala
• Play Framework
• AngularJS
• elasticsearch
• …
@elmanu#playframework
Background
•A few interesting aspects
• Source code may not be available
• Data spread out in many places
• Only 3 months time
@elmanu#playframework
Background
•A few interesting aspects
• Source code may not be available
• Data spread out in many places
• Only 3 months time
@elmanu#playframework
Agenda
• Background
• Building the new platform
• Data migration
• Operations
• Methodologies & Tools
• Summary & Future
@elmanu#playframework
Building the new platform
@elmanu#playframework
Building the new platform
@elmanu#playframework
@elmanu#playframework
• MVC framework
!
• Compile as much as possible
• “Reactive”
@elmanu#playframework
http://www.reactive-manifesto.org
@elmanu#playframework
Load balancer
@elmanu#playframework
Load balancer
@elmanu#playframework
Building the new platform
Data access?
@elmanu#playframework
Building the new platform
Anorm
Data access?
Squeryl
@elmanu#playframework
Building the new platform
Anorm
Data access?
Squeryl
@elmanu#playframework
Building the new platform
Anorm
Data access?
Squeryl
SORM Tiramisu
@elmanu#playframework
Building the new platform
• Started with Anorm
• Too verbose
!
• Switched to Slick
• Plain SQL with neat string interpolation
• DSL for composing queries
@elmanu#playframework
Building the new platform
def fetchItemWithRelevanceSort(userId: Long, skip: Int, limit: Int)!
(implicit s: Session): List[Item] = {!
val q = for {!
i <- items if !i.deleted!
! && i.visible_on_profile!
! && i.user_id === userId!
} yield i!
!
q.sortBy(item => (item.selected.desc, item.created_on.desc))!
.drop(skip)!
.take(limit)!
.list!
!
}
val query = sql"""!
with invites_for_market as (!
select #$inviteSL, #$inviteMarketSL!
from invite i!
inner join invite_market im!
on i.id = im.invite_id!
and im.market_id = ${marketId.id}!
where i.art_type = ${artType.toString}!
and i.visibility_state = ${InviteVisibilityState.Public}!
and i.deleted = false!
order by i.submission_start desc, i.id desc!
limit $limit!
offset $skip!
)!
!
select ifm.*, #$localInviteSL!
from invites_for_market ifm!
inner join local_invite li!
on ifm.id = li.invite_id!
and li.completed = true!
order by ifm.submission_start desc, ifm.id asc!
"""!
val queryResults = query.as[(Invite, InviteMarket, LocalInvite)].list!
@elmanu#playframework
Building the new platform
Front-end & UI
@elmanu#playframework
Building the new platform
Front-end & UI
@elmanu#playframework
Building the new platform
Front-end & UI
@elmanu#playframework
Building the new platform
• Recently open-sourced by Facebook
!
• Virtual DOM, fast
!
• Very easy to integrate in a page
(less invasive than Angular)
ReactJS
@elmanu#playframework
Building the new platform
Front-end & UI
@elmanu#playframework
Building the new platform
• Build pipeline using gulp.js & bower
!
• Assets pipeline
• LESS compilation
• JS minification
• Upload assets to Cloudfront
• Integrates translations from Crowdin
• Washes the dishes
@elmanu#playframework
Agenda
• Background
• Building the new platform
• Data migration
• Operations
• Summary & Future
@elmanu#playframework
Data migration: source system(s)
@elmanu#playframework
Data migration: source system(s)
@elmanu#playframework
Data migration: source system(s)
@elmanu#playframework
Data migration: source system(s)
@elmanu#playframework
Data migration: source system(s)
@elmanu#playframework
Data migration: source system(s)
@elmanu#playframework
Data migration: source system(s)
@elmanu#playframework
Data migration: source system(s)
@elmanu#playframework
Data migration: migration schedule
@elmanu#playframework
Data migration
• Akka to the rescue!
!
• Concurrent user migration
!
• Concurrent item migration
• Using Play’s WS library for async
calls to Youtube and friends
@elmanu#playframework
Data migration
User migrator
Worker Worker Worker Worker Worker
@elmanu#playframework
Data migration
Item migrator
@elmanu#playframework
Data migration
Item migrator
User item
migrator
User item
migrator
User item
migrator
@elmanu#playframework
Data migration
Item migrator
Item
migration
worker
User item
migrator
User item
migrator
User item
migrator
Item
migration
worker
Item
migration
worker
Item
migration
worker
Item
migration
worker
Item
migration
worker
@elmanu#playframework
Data migration
Item migrator
Item
migration
worker
User item
migrator
User item
migrator
User item
migrator
Item
migration
worker
Item
migration
worker
Item
migration
worker
Item
migration
worker
Item
migration
worker
File
fetcher
File
fetcher
@elmanu#playframework
Data migration
Item migrator
Item
migration
worker
User item
migrator
User item
migrator
User item
migrator
Item
migration
worker
Item
migration
worker
Item
migration
worker
Item
migration
worker
Item
migration
worker
File
fetcher
File
fetcher
File
uploader
File
uploader
@elmanu#playframework
Data migration
Item migrator
Item
migration
worker
User item
migrator
User item
migrator
User item
migrator
Item
migration
worker
Item
migration
worker
Item
migration
worker
Item
migration
worker
Item
migration
worker
File
fetcher
File
fetcher
File
uploader
Soundcloud
worker
File
uploader
@elmanu#playframework
Data migration
@elmanu#playframework
Agenda
• Background
• Building the new platform
• Data migration
• Operations
• Summary & Future
@elmanu#playframework
Operations
Operations
@elmanu#playframework
Operations
@YourTwitterHandle#DVXFR14{session hashtag} @elmanu#playframework
Sum
m
ary
&
Future
@elmanu#playframework
Summary & Future
• Play Framework does not get in the way
• Easy to deploy and operate
• Many, many integrations
!
• Many plans for the future
• Live activity feed
• Similarity search
!
• Talenthouse is hiring!
@YourTwitterHandle#DVXFR14{session hashtag} @elmanu#playframework
Q
&
A

Mais conteúdo relacionado

Mais procurados

Web, Native iOS and Native Android with One Ember.js App
Web, Native iOS and Native Android with One Ember.js AppWeb, Native iOS and Native Android with One Ember.js App
Web, Native iOS and Native Android with One Ember.js App
FITC
 

Mais procurados (11)

Creating cross-platform mobile apps
Creating cross-platform mobile apps Creating cross-platform mobile apps
Creating cross-platform mobile apps
 
Cross-Platform Desktop Apps with Electron
Cross-Platform Desktop Apps with ElectronCross-Platform Desktop Apps with Electron
Cross-Platform Desktop Apps with Electron
 
Managing SharePoint Anywhere with Windows PowerShell
Managing SharePoint Anywhere with Windows PowerShellManaging SharePoint Anywhere with Windows PowerShell
Managing SharePoint Anywhere with Windows PowerShell
 
Web, Native iOS and Native Android with One Ember.js App
Web, Native iOS and Native Android with One Ember.js AppWeb, Native iOS and Native Android with One Ember.js App
Web, Native iOS and Native Android with One Ember.js App
 
Website design & developemet
Website design & developemetWebsite design & developemet
Website design & developemet
 
Famo.us introduction
Famo.us introductionFamo.us introduction
Famo.us introduction
 
Net as an awesome startup platform
Net as an awesome startup platformNet as an awesome startup platform
Net as an awesome startup platform
 
Build a serverless distributed Pong game with Azure
Build a serverless distributed Pong game with AzureBuild a serverless distributed Pong game with Azure
Build a serverless distributed Pong game with Azure
 
Simplicity - develop modern web apps with tiny frameworks and tools
Simplicity - develop modern web apps with tiny frameworks and toolsSimplicity - develop modern web apps with tiny frameworks and tools
Simplicity - develop modern web apps with tiny frameworks and tools
 
Ecommerce World, WooCommerce
Ecommerce World, WooCommerceEcommerce World, WooCommerce
Ecommerce World, WooCommerce
 
DNN Connect - Mobile Development With Xamarin
DNN Connect - Mobile Development With XamarinDNN Connect - Mobile Development With Xamarin
DNN Connect - Mobile Development With Xamarin
 

Semelhante a Project Phoenix - From PHP to the Play Framework in 3 months

Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium Intro
Nicholas Jansma
 
Fast, concurrent ruby web applications with EventMachine and EM::Synchrony
Fast, concurrent ruby web applications with EventMachine and EM::SynchronyFast, concurrent ruby web applications with EventMachine and EM::Synchrony
Fast, concurrent ruby web applications with EventMachine and EM::Synchrony
Kyle Drake
 

Semelhante a Project Phoenix - From PHP to the Play Framework in 3 months (20)

Mobile native-hacks
Mobile native-hacksMobile native-hacks
Mobile native-hacks
 
Txjs
TxjsTxjs
Txjs
 
Kickstart android development with xamarin
Kickstart android development with xamarinKickstart android development with xamarin
Kickstart android development with xamarin
 
Webhooks with Azure Functions - Live 360 Conference
Webhooks with Azure Functions - Live 360 ConferenceWebhooks with Azure Functions - Live 360 Conference
Webhooks with Azure Functions - Live 360 Conference
 
Great Tools Heavily Used In Japan, You Don't Know.
Great Tools Heavily Used In Japan, You Don't Know.Great Tools Heavily Used In Japan, You Don't Know.
Great Tools Heavily Used In Japan, You Don't Know.
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium Intro
 
PhoneGap Talk @ Sencha Con 2010
PhoneGap Talk @ Sencha Con 2010PhoneGap Talk @ Sencha Con 2010
PhoneGap Talk @ Sencha Con 2010
 
Make Cross Platform Apps that Suck Less
Make Cross Platform Apps that Suck LessMake Cross Platform Apps that Suck Less
Make Cross Platform Apps that Suck Less
 
Game On With NativeScript
Game On With NativeScriptGame On With NativeScript
Game On With NativeScript
 
Fast, concurrent ruby web applications with EventMachine and EM::Synchrony
Fast, concurrent ruby web applications with EventMachine and EM::SynchronyFast, concurrent ruby web applications with EventMachine and EM::Synchrony
Fast, concurrent ruby web applications with EventMachine and EM::Synchrony
 
Programming for the Internet of Things
Programming for the Internet of ThingsProgramming for the Internet of Things
Programming for the Internet of Things
 
From Web to Mobile with Stage 3D
From Web to Mobile with Stage 3DFrom Web to Mobile with Stage 3D
From Web to Mobile with Stage 3D
 
Angular 2 and NativeScript
Angular 2 and NativeScriptAngular 2 and NativeScript
Angular 2 and NativeScript
 
Future of Mobile
Future of MobileFuture of Mobile
Future of Mobile
 
Kendo UI - Mikita Manko at Mobile Optimized
Kendo UI - Mikita Manko at Mobile OptimizedKendo UI - Mikita Manko at Mobile Optimized
Kendo UI - Mikita Manko at Mobile Optimized
 
Managing and Using Assets in Rich Flash Experiences
Managing and Using Assets in Rich Flash ExperiencesManaging and Using Assets in Rich Flash Experiences
Managing and Using Assets in Rich Flash Experiences
 
German introduction to sp framework
German   introduction to sp frameworkGerman   introduction to sp framework
German introduction to sp framework
 
Making an independend MMO - The Albion Online Story
Making an independend MMO - The Albion Online StoryMaking an independend MMO - The Albion Online Story
Making an independend MMO - The Albion Online Story
 
Rapid and Responsive - UX to Prototype with Bootstrap
Rapid and Responsive - UX to Prototype with BootstrapRapid and Responsive - UX to Prototype with Bootstrap
Rapid and Responsive - UX to Prototype with Bootstrap
 
Untangling spring week11
Untangling spring week11Untangling spring week11
Untangling spring week11
 

Mais de Manuel Bernhardt

Mais de Manuel Bernhardt (19)

Is there anybody out there? Reactive Systems Hamburg
Is there anybody out there? Reactive Systems HamburgIs there anybody out there? Reactive Systems Hamburg
Is there anybody out there? Reactive Systems Hamburg
 
Is there anybody out there? Scala Days Berlin 2018
Is there anybody out there? Scala Days Berlin 2018Is there anybody out there? Scala Days Berlin 2018
Is there anybody out there? Scala Days Berlin 2018
 
Is there anybody out there?
Is there anybody out there?Is there anybody out there?
Is there anybody out there?
 
Is there anybody out there?
Is there anybody out there?Is there anybody out there?
Is there anybody out there?
 
8 akka anti-patterns you'd better be aware of - Reactive Summit Austin 2017
8 akka anti-patterns you'd better be aware of - Reactive Summit Austin 20178 akka anti-patterns you'd better be aware of - Reactive Summit Austin 2017
8 akka anti-patterns you'd better be aware of - Reactive Summit Austin 2017
 
Scala Days Copenhagen - 8 Akka anti-patterns you'd better be aware of
Scala Days Copenhagen - 8 Akka anti-patterns you'd better be aware ofScala Days Copenhagen - 8 Akka anti-patterns you'd better be aware of
Scala Days Copenhagen - 8 Akka anti-patterns you'd better be aware of
 
8 Akka anti-patterns you'd better be aware of
8 Akka anti-patterns you'd better be aware of8 Akka anti-patterns you'd better be aware of
8 Akka anti-patterns you'd better be aware of
 
Beyond the buzzword: a reactive web-appliction in practice
Beyond the buzzword: a reactive web-appliction in practiceBeyond the buzzword: a reactive web-appliction in practice
Beyond the buzzword: a reactive web-appliction in practice
 
Beyond the Buzzword - a reactive application in practice
Beyond the Buzzword - a reactive application in practiceBeyond the Buzzword - a reactive application in practice
Beyond the Buzzword - a reactive application in practice
 
Six years of Scala and counting
Six years of Scala and countingSix years of Scala and counting
Six years of Scala and counting
 
3 things you must know to think reactive - Geecon Kraków 2015
3 things you must know to think reactive - Geecon Kraków 20153 things you must know to think reactive - Geecon Kraków 2015
3 things you must know to think reactive - Geecon Kraków 2015
 
Reactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDaysReactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDays
 
Writing a technical book
Writing a technical bookWriting a technical book
Writing a technical book
 
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMVoxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
 
Back to the futures, actors and pipes: using Akka for large-scale data migration
Back to the futures, actors and pipes: using Akka for large-scale data migrationBack to the futures, actors and pipes: using Akka for large-scale data migration
Back to the futures, actors and pipes: using Akka for large-scale data migration
 
Scala - Java2Days Sofia
Scala - Java2Days SofiaScala - Java2Days Sofia
Scala - Java2Days Sofia
 
Tips and tricks for setting up a Play 2 project
Tips and tricks for setting up a Play 2 projectTips and tricks for setting up a Play 2 project
Tips and tricks for setting up a Play 2 project
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
Scala pitfalls
Scala pitfallsScala pitfalls
Scala pitfalls
 

Último

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Último (20)

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 

Project Phoenix - From PHP to the Play Framework in 3 months