Building poollie wk 2014 for ios android and windows phone using xamarin and azure
Post on 24-Jun-2015
231 Views
Preview:
DESCRIPTION
Transcript
Building Poollie: WK 2014
+ = + +
Maarten SikkemaVincent Hoogendoorn
The Dream
Let’s make a fun app for the World Football Championship• To learn what it takes to make a successful app
• To show off what is possible using Xamarin, Azure and .NET
• To promote our company as an App Developer
Started seriously developing 10 weeks before the kickoff of the first match
Put up a “coming soon” webpage
Little did we know…
The “competition” in this category
Mostly webbased systems:• watgaathetworden.nl / ING Bank
• flexvoetbal.nl
• nationalevoetbalpool.nl
One mobile App:• Not free
• iOS / Android, no WP
In this category, a mobile app has many advantages over a website
Poollie features
• User registration
• Create / search pool
• Invite players
• Notifications
• View Championship Schedule and Standings
• Predict matches, predict winners and stats
• View (live) match, calculate player points
• View player points (self / others)
• View Pool standings
• …
Even an app as simple as Poollie has a lot of features
More info (in Dutch):
Het Verhaal van Poollie
Poollie technology
iOS and Android: Xamarin• Native UI
• On-device database
• REST / SignalR connection to server
• Shared Code
Windows Phone 8:• Native UI
• Shared Code
Plain-and-simple architecture
Server: Windows Azure Website• ASP.NET WebAPI + SignalR
• SQL Server + Micro ORM, Migrations
• WebJobs for background processes
• Service Bus to scale SignalR
• Notification Hub
Xamarin Platform
Apps look and feel native, because they are
Productive app development environmentLanguage Framework IDE
Client Technologies
Leveraging the .NET cross-platform ecosystemMore info:
Lessons Learned
Three native apps, one source
Three native apps, one source
Navigation logic also shared
More info: github.com/MacawNL/QuickCross
Marketing PoollieA good App doesn’t really sell itself
It takes work to market an App, make people notice…
Success! Houston, we have a problem• Peaked at 200.000 screen views per hour
• 100+ web api requests / sec
Statistics and exception logging are critical
Scaling the serverCloud makes it possible to buy yourself out of trouble quickly
Just click the buttons…
Scaling the server
More cost efficient: old-fashioned SQL data modelling and query tuning, i.e:
SELECT ROW_NUMBER() OVER(ORDER BY Points DESC) AS CurrentPosition, ROW_NUMBER() OVER(ORDER BY (Points-LastPointMutation) DESC) AS PreviousPosition, PoolId, PlayerId, DisplayName, Points, LastPointMutation FROM PoolPlayer INNER JOIN Player ON PoolPlayer.PlayerId = Player.IdWHERE PoolPlayer.PoolId = @PoolId AND PoolPlayer.PlayerStatus BETWEEN 5 AND 6ORDER BY CurrentPosition
SELECT CurrentPosition, PreviousPosition, PoolId, PlayerId, DisplayName, Points, LastPointMutation FROM PoolPlayer INNER JOIN Player ON PoolPlayer.PlayerId = Player.Id WHERE PoolId = @PoolId AND PoolPlayer.PlayerStatus > 4ORDER BY RowNumber
Scaling the server
More cost efficient: old-fashioned SQL data modelling and query tuning, i.e:
Client PerformanceEliminating all web requests from the app startupLoad minimum data from local storage for initial display.Once the app is interactive, start background load of more local dataAlso start an attempt to update with online data
Optimizing AsyncPerformance of non-UI code with ConfigureAwait(false)Poollie has 300 awaits in shared code.
Replacing sqlite-net / IQueryable with Json.NET / IenumerableEliminate mapping layers and slow IO More info:
Lessons Learned
Demo: Notifications
In-App Notifications with SignalRFaster and more reliable delivery, free, 2-way persistent
Push Notifications with Azure Notification HubAlways reach people
More info:See YouTube Video
Xamarin Experience: Grip and Freedom
Grip: not hitting a roadblockPerformance
Memory
Look & feel
Latest platform-specific functionality
Freedom: mix and matchDevelop on Mac and on Windows machines
Use Visual Studio and Xamarin Studio IDEs
Use .NET (NuGet) and native libraries
Use Shared Code Projects and Portable Class Libraries
Share view markup (Xamarin Forms) and use native markup
Achievements
We did allright
47000 users with on average 25000 users every day during the championship; 2500 concurrent users at peak times.
Voted as number one World Championship pool app by iPhoneclub.nl
Voted as best pool app for World Championship in Brazil by Androidworld.nl
Selected four times as Featured App in the Dutch Windows Phone Store
90% of the client-side code was shared across all three platforms, while each platform had its own native designed UI
We provided continuous app updates with improvements and new features in all three app stores, right up to the end of the championship
ResourcesDutch Mobile .NET Developers GroupXamarin Revolve: Tuesday, November 11, 2014 6:00 PM, Hilversumhttp://www.meetup.com/Dutch-Mobile-NET-Developers-Group
Macaw mobile solutionshttp://www.macaw.nl/
@MaartenSikkema http://www.macaw.nl/macaw/medewerkers/maarten
@VincentH_NET http://vincenth.net
top related