paris tech talk #5: from pull to push

18
From Pull to Push Moving from request-response to event-driven web clients Paris TechTalk 13/01/2014

Upload: betclic-everest-group-tech-team

Post on 10-May-2015

3.447 views

Category:

Technology


2 download

DESCRIPTION

We presented our Betclic approach on moving towards a Push event-driven architecture during the Paris Tech Talk meetup, hosted at Google HQ in Paris on 13/01/2014.

TRANSCRIPT

Page 1: Paris Tech Talk #5: From Pull to Push

From Pull to PushMoving from request-response to event-driven web clients

Paris TechTalk 13/01/2014

Page 2: Paris Tech Talk #5: From Pull to Push

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

Page 3: Paris Tech Talk #5: From Pull to Push

A multi-brand / multi-country / multi business galaxy

31/14/2014 From Pull to Push/ Paris TechTalk

Page 4: Paris Tech Talk #5: From Pull to Push

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)

Page 5: Paris Tech Talk #5: From Pull to Push

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

Page 6: Paris Tech Talk #5: From Pull to Push

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

Page 7: Paris Tech Talk #5: From Pull to Push

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

Page 8: Paris Tech Talk #5: From Pull to Push

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.”

Page 9: Paris Tech Talk #5: From Pull to Push

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

Page 10: Paris Tech Talk #5: From Pull to Push

Concept Architecture: After

3rd Party

10From Pull to Push/ Paris TechTalk

Latency 300 ms

Latency <10 ms

< 1 sec latency

Page 11: Paris Tech Talk #5: From Pull to Push

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!

Page 12: Paris Tech Talk #5: From Pull to Push

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

Page 13: Paris Tech Talk #5: From Pull to Push

PUSH – How it works?

13From Pull to Push/ Paris TechTalk

WCF routing service

WCF service

Page 14: Paris Tech Talk #5: From Pull to Push

PUSH – How it works on front side?

14From Pull to Push/ Paris TechTalk

Page 15: Paris Tech Talk #5: From Pull to Push

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

Page 16: Paris Tech Talk #5: From Pull to Push

Questions?

From Pull to Push/ Paris TechTalk # 16

Page 17: Paris Tech Talk #5: From Pull to Push

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

Page 18: Paris Tech Talk #5: From Pull to Push

18From Pull to Push/ Paris TechTalk