From Pull to Push Moving from request-response to event-driven web clients Paris TechTalk 13/01/2014
May 10, 2015
From Pull to PushMoving from request-response to event-driven web clients
Paris TechTalk 13/01/2014
Agenda
A multi-brand / multi-country / multi business galaxy
A brief technical history
Current technical solution
What’s next? Innovation Day
From Pull to Push!
2From Pull to Push/ Paris TechTalk
A multi-brand / multi-country / multi business galaxy
31/14/2014 From Pull to Push/ Paris TechTalk
A brief technical history: isolated separated websites
14/01/2014 From Pull to Push/ Paris TechTalk # 4
SPORTSBOOK (PRE LIVE / LIVE)
TURF
CASINO / LIVE CASINO / GAMES
COMMON
BETCLIC.FR
(VB.Net WebFoms)BETCLIC.COM
(VB.Net WebFoms)
COMMON COMMON
SPORTSBOOK (PRE LIVE / LIVE)
SPORTSBOOK (PRE LIVE / LIVE)
POKER
CASINO / LIVE CASINO / GAMES
POKERPOKER
BETCLIC.IT
(C# MVC)
POKER MVC
SPORTSBOOK (PRE LIVE / LIVE)
POKER
CASINO / LIVE CASINO / GAMES / VEGAS
EXPEKT.COM
(Java)
Current technical solution: mutualized shared code
From Pull to Push/ Paris TechTalk # 5
BETCLIC.FR BETCLIC.COM BETCLIC.IT
SPORTSBOOK (PRE LIVE / LIVE) - (ASP.Net MVC4)
TURF - (ASP.NetMVC4)
POKER - (ASP.Net MVC4)
CASINO / LIVE CASINO / GAMES - (ASP.Net MVC4)
GLOBAL (REGISTER / PAYMENT / MY ACCOUNT) – (Portable areas)
EXPEKT.COM
Current technical solution: Onion Architecture
From Pull to Push/ Paris TechTalk # 6
User Interface
Application Services
Domain Services
Domain Model
For a White-Label strategy
How do we move forward from there?
• We achieved:– Global move to ASP.Net MVC / Onion architecture
Now easier to:
Integrate new regulated countries
Change sites’ look and feel
• But we still face the following issues due to the Polling mechanism:– Caching and latency: sport data is updated on the web site every 10
sec systematically.
– Scalability: bandwidth and server load
– User Experience could be improved to be more real-time (think sport events) - bets can be rejected if odd has changed!
7From Pull to Push/ Paris TechTalk
Innovation Day
• Event focused on Innovation
• Dev and Business mixed in small teams, for a 1-day contest
• Make a break in daily work with a fun and exciting event
8From Pull to Push/ Paris TechTalk
• Winner: Real-time Sport broadcast“Instead of polling Sport feed to display results on the Match page, build areal-time push solution from the server to the clients, with very low latency andif possible use this solution for odds update in real-time as well.”
Concept Architecture: Before
3rd Party
9From Pull to Push/ Paris TechTalk
Refresh every
10 sec average
Cache 5 secCache 2 sec
Latency 300 ms ~20 sec latency
Concept Architecture: After
3rd Party
10From Pull to Push/ Paris TechTalk
Latency 300 ms
Latency <10 ms
< 1 sec latency
Current Website
Bandwidth 16 Mo
Requests 5400 (almost 1 req/sec in average)
Push Website
Bandwidth 50 Ko
Requests 100
KPI – Watch of 1 football live for 90 mns for 1 user
Bandwidth economy :
15,950 Mo per user (~99,7% savings)
User economy: less data on Mobile
Less load whatever the traffic = less servers!
Why we chose Redis
• Pub-Sub mechanism: an easy way to broadcast something to all nodes (subscribers)
• Very low latency
• Strong scalability
12From Pull to Push/ Paris TechTalk
PUSH – How it works?
13From Pull to Push/ Paris TechTalk
WCF routing service
WCF service
PUSH – How it works on front side?
14From Pull to Push/ Paris TechTalk
The Future of Push
• Many possible usage for us:
– Sport data update: odds, score boards
– Translation updates
– Technical data update: cache invalidation, real-time configuration changes
– Flash notifications for marketing purpose
15From Pull to Push/ Paris TechTalk
Questions?
From Pull to Push/ Paris TechTalk # 16
Find out more
• Our Blog:
https://techblog.betclicgroup.com/
Contacts
Frédéric RIVAIN [email protected]
@FredericRivain
Maxime [email protected]
@__MaxS__From Pull to Push/ Paris TechTalk
18From Pull to Push/ Paris TechTalk