Introduction Spilgames & Me Old Portals Landscape Overview Evaluation Wish List Tech Wishes Taskforce Wishes Available Frameworks A Widget Platform Components The Flow Testing & Deploying Managing Widgets Holding Control Next Steps Summary Contributions A Web Widget Platform Enrique Paz Senior Backend Developer 13/06/2013 1/33
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
A Web Widget Platform
Enrique Paz
Senior Backend Developer
13/06/2013
1/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
About Me
• Passionate Erlang developer• Testing enthusiast• Love beautiful code!
2/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
Spilgames
• Gaming Platform• Serving data to 190+ countries world-wide• 180+ million unique users per month• Multiple Platforms: Desktop, Mobile Native & Web• 300+ employees• Offices in The Netherlands & China• Revenue: Advertising & EUM
3/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
Old Portals Landscape
4/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
Brands and Sites
• 5 Brands/Channels for target audiences• 1-15 Sites for different geographical regions• Strong domains
I www.spel.se for teens in SwedenI www.ojogos.pt for families in Portugal and BrazilI . . .
• Ability to develop per brand and site• Acceptable performance• Clear layer separation• Fast growth
8/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
The Bad
• Inability to share features between brand codebases• Aggressive multi-level caching needed to perform decently• Lots of logic on the client• Developers can’t switch brands easily• Long time to market
9/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
Wish List
10/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
Isolation & Performance
• Isolated requests, features and crashes• Feature toggling on runtime• Decent number of requests/s with linear
scalability• Technology aligned application and storage
layers
11/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
Increase Development Speed
• Only one modular codebase• Small features, easy to deploy and rollback• Changes testable in isolation
12/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
What’s out there
• MVC Frameworks (Chicago Boss, Zotonic. . . )I (+) Nice layer separationI (+) Mature solutionsI (+) Easy to use
• But. . .I (-) Feature isolation not key in their designI (-) A VC framework fits better (abstracted model)
13/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
What’s out there
• MVC Frameworks (Chicago Boss, Zotonic. . . )I (+) Nice layer separationI (+) Mature solutionsI (+) Easy to use
• But. . .I (-) Feature isolation not key in their designI (-) A VC framework fits better (abstracted model)
13/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
A Widget Platform
14/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
A Widget Platform
15/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
Widgets
• Isolated• Independent Erlang
applications• Use ErlyDTL for the view• Specification in the .app.src• Can only use what they
• Allows the cration of small deltas• Different prearranged sets can be requested• Different sets can be built per request
22/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
Master & Slaves In 1 VM
• The platform master node runs:I A web serverI A management interfaceI A specific set of widgets
• Each slave node runs:I Its own specific set of widgets
23/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
Master & Slaves In 1 VM
• The platform master node runs:I A web serverI A management interfaceI A specific set of widgets
• Each slave node runs:I Its own specific set of widgets
23/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
wdg1/?origins=w1,preview;w5,preview
• Widgets can be called in anynode
• Widgets can fail• Widgets can be disabled
24/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
Managing Widgets
25/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
The Need For A Widget Manager
• To manage widgets and versions in the platform nodes• To keep the clustered platforms in sync• To make changes in the cluster in an easy way
26/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
How does it work
• SWIFT as a central widgetrepository
• HTTP interface with simpleGUI
• Uses the platformmanagement interface:
I List nodesI List widgets in a nodeI Enable/disable widget in a
nodeI Change widget version in a
node
• Enforces configuration to newcluster members
27/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
What’s in the Future?
28/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
Lessons Learned
• Reinforce the concepts adoption often• Review, review, review• Measure performance from early
stages
29/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
Coming in H2
• Native widget to backend connectivity• Per widget render timeout• In req caching of the BE calls• Performance analysis and improvements• Router to be open sourced
30/33
IntroductionSpilgames & Me
Old PortalsLandscapeOverview
Evaluation
Wish ListTech Wishes
Taskforce Wishes
AvailableFrameworks
A WidgetPlatformComponents
The Flow
Testing &Deploying
ManagingWidgetsHolding Control
Next StepsSummary
Contributions
What We’ve Used
• ErlyDTL• Cowboy• Lager• Rebar
I (*) semantic versioning, i.e. [">=1.3.1", "<2.0.0"]I (*) shared dependenciesI (*) xref fixes