DEgraissons
le
Mammouth
Je suis pas gros,
j'ai une
ossature lourde!
Arnauld Loyer
@aloyer
29ème semaine de Conférences Tec...
Back To The PAST!
2008
2010
2010
2008-2009
PMU Turf
Partner Paddy Power
Paris Sportifs
https://info.pmu.fr/entreprise/partenariats-et-sponsoring
Paris Hippiques
Poke...
ooo
ooo
Portlet
Portal: A Good Promise!
The
Next-Gen
Architect
An Enterprise Solution
ooo
Portlet
Portal: A Good Promise!
Portlet
App 2
Portlet
App 1
Portlet
App 3
P
O
R
T
A
L
Portlet
Container
Portlet
API
Page JS
Content
Portal: A Good Promise!
User
Auth
+1
Enterprise Portal
Portlet
CMS
Content
Management
System
Marketing
+1
...
Page JS
Content
Business Logic
User
Auth
Enterprise Portal
PortletSSO
User
Auth
Page JS
Content
Business Logic
Enterprise Portal
PortletSSO
SI
Auth
How to Plug our own
Authentication
Search
doc.
Do It
Yourself
Google
stack
overflow
MAN/API
Sample
Just kidding!
obsolete
...
Customization
Enterprise Portal
User
Auth
Page
Content
Business Logic
SI
Auth
PortletSSO
JS
Customization
Enterprise Portal
User
Auth
Page
Content
Business Logic
SI
Auth
PortletSSO
JS
User
Portal
User
SI
Customization
Enterprise Portal
User
Auth
Page
Content
Business Logic
SI
Auth
PortletSSO
JS
User
Portal
User
SI
Customization
Enterprise Portal
User
Auth
Page
Content
Business Logic
SI
Auth
PortletSSO
JS
User
Portal
User
SI
Customization
Enterprise Portal
User
Auth
Page
Content
Business Logic
SI
Auth
PortletSSO
JS
User
Portal
User
SI
Framework
Library
1
Framework vs Library
Library
2
Application
Side
N
ote
Customization
Enterprise Portal
User
Auth
Page JS
Content
Business Logic
API
Mobile
App.Portal: A Good Promise!… euh… no
S...
LEGACY...
LEGACY...
It’s OLD
It’s Crapy
It’s complicated
It’s not understandable
It does not reflect what it does
It’s not Tested
It...
Accidental Complexity
Cost of understanding
Cost of understanding
Knowledge scattering
Cost of understanding
Knowledge scattering
Ripple Effect
« Big Ball of Mud »
http://www.laputan.org/mud/
http://akvo.org/b...
time
Productivity / Cost of Ownership
Understanding
Onboarding
time
Velocity
Productivity
Productivity / Cost of Ownership
Understanding
Onboarding
Scaling
Customization
Enterprise Portal
User
Auth
Page JS
Conte
nt
Business Logic
API
SI
Auth
3rd
Party
Logic
PortletSSO
Customiza...
Customization
Enterprise Portal
User
Auth
Page JS
Conte
nt
Business Logic
API
SI
Auth
3rd
Party
Logic
PortletSSO
Customiza...
Customization
Enterprise Portal
User
Auth
Page JS
Conte
nt
Business Logic
API
SI
Auth
3rd
Party
Logic
PortletSSO
Customiza...
Customization
Enterprise Portal
User
Auth
Page JS
Conte
nt
Business Logic
API
SI
Auth
3rd
Party
Logic
PortletSSO
Customiza...
€
#procs
Multiple servers
Single server
Scaling
Mammouth is Seducing
but
does not
Scale well
© 2014 Gartner, Inc. and/or its affiliates. All rights reserved.
Monolithic design
Over-provisioning and
hoarding of resou...
© 2014 Gartner, Inc. and/or its affiliates. All rights reserved.
Monolithic design
Over-provisioning and
hoarding of resou...
« It is not the strongest of the species that survives,
nor the most intelligent,
but the one most responsive to change. »...
cockroaches may not look really sexy at first,
but they survive
http://www.faqs.org/docs/artu/ch01s06.html
Write programs that do one thing and do it well. Write
programs to work togethe...
http://www.faqs.org/docs/artu/ch01s06.html
Write programs that do one thing and do it well. Write
programs to work togethe...
Rule of Modularity: Write simple parts connected by clean interfaces.
Rule of Clarity: Clarity is better than cleverness.
...
http://www.faqs.org/docs/artu/ch01s06.html
Write programs that do one thing and do it well. Write
programs to work togethe...
EVOLUTION
Learn From THE PAST
Learn from the ELDERs
Components
Components
Account management
Racing & Horse
Information Distribution
Horse RACE Betting
Extra CONTENT
MANAGEMENT
Authentication
Info...
Components
Shared Libs
Components
micro-services
10-100 LOC!!!
Mammouth
cockroach
Tardigrade
hhttp://vimeo.com/79866979
http://martinfowler.com/a...
Message
Bus
Communication
Communication
Communication
Broker less approach
e.g.: HTTP/REST, ZeroMQ,
distributed actors/process, …
http://zeromq.org/whitepapers:br...
Front End
Account management
Racing & Horse
Information Distribution
Horse RACE Betting
Extra CONTENT
MANAGEMENT
Authentication
Info...
Account
management
Racing & Horse
Information Distribution
AccountTurfInfoTurfPari
Update Listener
Horse RACE
Betting
Info...
AccountTurfInfoTurfPari
Update Listener
TurfInfo
Lib
Accoun
t
Lib
TurfPari
Lib
Update
Lib
Auth
Lib
DTO
Lib
Backend
ooo
RES...
BackEnd, fRONtEND AND CMS TEAMS
RA
A
A
A AC
LLL
LLLE
AA
Backend
CMS
FrontEnd
L
Backend
dev.
Backend
REWORK…
Frontend
Starts
using API
BUT…
IT DOES NOT
WORK AS
EXPECTED
API
STILL
NOT
USED…
A
3 Months
...
RA
A
A
A AC
LLL
LLLE
AA
Backend
CMS
FrontEnd
TEAMS ReORGANIZATIOn
R A
A
A
A AC
LL L
L
LL E
A A
A
A
Team 1 Team 2 Team 3
A
Spotify and the Feature Teams
http://blog.crisp.se/2012/11/14/henrikkniberg/scaling-agile-at-spotify
http://blog.crisp.se/...
Firewall
Traffic Manager
mysql
memcached
nginx
tomcat
tomcat
SI
http
https
http://www.couchbase.com/memcached
ooo
REST HTTP/JSON
Request -> Response
Backend
ooo
ooo
REST HTTP/JSON
Request -> Response
Backend
ooo
Traffic Manager
mysql
nginx
tomcat
tomcat
SI
http
https
ooo
GET /turf/programme/…
GET /account/…
POST /account/…
Firewall
Traffic Manager
mysql
couchbase
nginx
tomcat
tomcat
SI
http
https
ooo
GET /turf/programme/…
GET /account/…
POST /account/…...
Traffic Manager
mysql
couchbase
nginx
tomcat
tomcat
SI
http
https
Scaling
Stateless
Firewall
Traffic Manager
mysql
couchbase
nginx
tomcat
tomcat
SI
http
https
Resilience
Firewall
Traffic Manager
mysql
couchbase
nginx
tomcat
tomcat
SI
http
https
Scaling
Firewall
Traffic Manager
mysql
couchbase
apache/varnishnginx
drupaltomcat
tomcat
SI
http
New
Requirement
https
Firewall
ooo
ooo
REST HTTP/JSON
Request -> Response
Backend
ooo
REST HTTP/JSON
Request -> Response
Backend
ooo
ooo
REST HTTP/JSON
Request -> Response
Backend
ooo
REST HTTP/JSON
Request -> Response
WebSocket
bidirectional
Backend
Traffic Manager
SI
http
https
Firewall
Traffic Manager
LVS
stunnel
haproxy
Vert.x
SI
https/ssl
http
Firewall
Traffic Manager
LVS
stunnel
haproxy
Vert.x
redis
subscribepublish
SI
https/ssl
http
Firewall
ooo
REST HTTP/JSON
Request -> Response
WebSocket
bidirectional
APN
Backend
Be CAREFUL OF ARCHITECT
BE CAREFUL OF FRAMEWORK
AVOID MONOLITHIC APPLICATION
LEGACY IS NEXT DOOR
THINK SMALL
PREFER STATEL...
Be CAREFUL OF ARCHITECT
BE CAREFUL OF FRAMEWORK
AVOID MONOLITHIC APPLICATION
LEGACY IS NEXT DOOR
THINK SMALL
PREFER STATEL...
Questions?
Gartner Presentation May 8th, 2014
http://public.brighttalk.com/resource/core/36753/may_8_software_designed_arch_ynatis_54...
Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution appliquée au développement informatique
Upcoming SlideShare
Loading in...5
×

Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution appliquée au développement informatique

789

Published on

Dégraissons le mammouth ou Darwin a encore frappé
La théorie de l'évolution appliquée au développement informatique - cas pratique de l'architecture du site PMU.fr

Depuis 1980, Lehman nous avertit: un programme doit évoluer ou péricliter, mais alors qu'il devient de plus en plus gros, la complexité résultante tend à limiter son évolution. Comment remédier à cela? Quelle architecture adopter pour un site à fort trafic comme celui du PMU?
Après avoir abordé les problématiques d'évolution et de maintenance d'une application monolithique, nous verrons pourquoi et surtout comment séparer les composants et les comportements de notre application.
Du monolithe aux micro services, du distribué, des messages, du publish/subscribe, du REST, une approche polyglotte, ... au cours de cet exposé, nous verrons quelques uns des choix retenus pour garantir la survie et l'évolution de notre application. Nous verrons comment nous avons construit un socle solide permettant de répondre aux nouvelles manières de faire du Web, d'être adapté aux applications mobiles et aux télés connectées. Ce sera l'occasion d'aborder aussi bien les principes architecturaux et les principes organisationnels qui nous ont permis d'atteindre cet objectif.

Published in: Software, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
789
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution appliquée au développement informatique

  1. 1. DEgraissons le Mammouth Je suis pas gros, j'ai une ossature lourde! Arnauld Loyer @aloyer 29ème semaine de Conférences Technologiques 2014
  2. 2. Back To The PAST!
  3. 3. 2008 2010
  4. 4. 2010 2008-2009
  5. 5. PMU Turf Partner Paddy Power Paris Sportifs https://info.pmu.fr/entreprise/partenariats-et-sponsoring Paris Hippiques Poker Partner PartyGaming PMU Entreprise
  6. 6. ooo
  7. 7. ooo Portlet Portal: A Good Promise! The Next-Gen Architect An Enterprise Solution
  8. 8. ooo Portlet Portal: A Good Promise! Portlet App 2 Portlet App 1 Portlet App 3 P O R T A L Portlet Container Portlet API
  9. 9. Page JS Content Portal: A Good Promise! User Auth +1 Enterprise Portal Portlet CMS Content Management System Marketing +1 SSO
  10. 10. Page JS Content Business Logic User Auth Enterprise Portal PortletSSO
  11. 11. User Auth Page JS Content Business Logic Enterprise Portal PortletSSO SI Auth
  12. 12. How to Plug our own Authentication Search doc. Do It Yourself Google stack overflow MAN/API Sample Just kidding! obsolete Give UP ! ⁉ ️ ⚠ ️⚡ ️& B X p D U g I o a n Hack Framework Does Not Work
  13. 13. Customization Enterprise Portal User Auth Page Content Business Logic SI Auth PortletSSO JS
  14. 14. Customization Enterprise Portal User Auth Page Content Business Logic SI Auth PortletSSO JS User Portal User SI
  15. 15. Customization Enterprise Portal User Auth Page Content Business Logic SI Auth PortletSSO JS User Portal User SI
  16. 16. Customization Enterprise Portal User Auth Page Content Business Logic SI Auth PortletSSO JS User Portal User SI
  17. 17. Customization Enterprise Portal User Auth Page Content Business Logic SI Auth PortletSSO JS User Portal User SI
  18. 18. Framework Library 1 Framework vs Library Library 2 Application Side N ote
  19. 19. Customization Enterprise Portal User Auth Page JS Content Business Logic API Mobile App.Portal: A Good Promise!… euh… no SI Auth 3rd Party Logic PortletSSO
  20. 20. LEGACY...
  21. 21. LEGACY... It’s OLD It’s Crapy It’s complicated It’s not understandable It does not reflect what it does It’s not Tested It’s not Testable ! Someone else wrote it!
  22. 22. Accidental Complexity
  23. 23. Cost of understanding
  24. 24. Cost of understanding Knowledge scattering
  25. 25. Cost of understanding Knowledge scattering Ripple Effect « Big Ball of Mud » http://www.laputan.org/mud/ http://akvo.org/blog/the-ball-of-mud-transition/ h
  26. 26. time Productivity / Cost of Ownership Understanding Onboarding
  27. 27. time Velocity Productivity Productivity / Cost of Ownership Understanding Onboarding
  28. 28. Scaling
  29. 29. Customization Enterprise Portal User Auth Page JS Conte nt Business Logic API SI Auth 3rd Party Logic PortletSSO Customization Enterprise Portal User Auth Page JS Conte nt Business Logic API SI Auth 3rd Party Logic PortletSSO User « Manny » 1.1 1.2 Load Balancer Session 1.3
  30. 30. Customization Enterprise Portal User Auth Page JS Conte nt Business Logic API SI Auth 3rd Party Logic PortletSSO Customization Enterprise Portal User Auth Page JS Conte nt Business Logic API SI Auth 3rd Party Logic PortletSSO User « Manny » Load Balancer Session 1.4 1.5 1.1 1.2 1.3
  31. 31. Customization Enterprise Portal User Auth Page JS Conte nt Business Logic API SI Auth 3rd Party Logic PortletSSO Customization Enterprise Portal User Auth Page JS Conte nt Business Logic API SI Auth 3rd Party Logic PortletSSO User « Manny » 2.1 Load Balancer ?
  32. 32. Customization Enterprise Portal User Auth Page JS Conte nt Business Logic API SI Auth 3rd Party Logic PortletSSO Customization Enterprise Portal User Auth Page JS Conte nt Business Logic API SI Auth 3rd Party Logic PortletSSO User « Manny » 2.1 Load Balancer ? Session Sticky Session
  33. 33. € #procs Multiple servers Single server Scaling
  34. 34. Mammouth is Seducing but does not Scale well
  35. 35. © 2014 Gartner, Inc. and/or its affiliates. All rights reserved. Monolithic design Over-provisioning and hoarding of resources Stateful No support of parallel or in-memory computing Not open for programmatic access Tightly-coupled Not modular Not designed for 24/7 use Discontinuous versioning Not horizontally-scalable Not instrumented for governance Single-channel front-end Complex Expensive Locked into platforms and vendors The Old Architecture Does Not Measure Up http://public.brighttalk.com/resource/core/36753/may_8_software_designed_arch_ynatis_54295.pdf may 8, 2014h
  36. 36. © 2014 Gartner, Inc. and/or its affiliates. All rights reserved. Monolithic design Over-provisioning and hoarding of resources Stateful No support of parallel or in-memory computing Not open for programmatic access Tightly-coupled Not modular Not designed for 24/7 use Discontinuous versioning Not horizontally-scalable Not instrumented for governance Single-channel front-end Complex Expensive Locked into platforms and vendors The Old Architecture Does Not Measure Up http://public.brighttalk.com/resource/core/36753/may_8_software_designed_arch_ynatis_54295.pdf may 8, 2014 dEVOPS movement
  37. 37. « It is not the strongest of the species that survives, nor the most intelligent, but the one most responsive to change. » ! Charles Darwin
  38. 38. cockroaches may not look really sexy at first, but they survive
  39. 39. http://www.faqs.org/docs/artu/ch01s06.html Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface. Unix Philosophy
  40. 40. http://www.faqs.org/docs/artu/ch01s06.html Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface. Unix Philosophy • Small is beautiful • Make each program do one thing and one thing well • Favor simplicity and portability over feature completeness • Write programs to work together
  41. 41. Rule of Modularity: Write simple parts connected by clean interfaces. Rule of Clarity: Clarity is better than cleverness. Rule of Composition: Design programs to be connected to other programs. Rule of Separation: Separate policy from mechanism; separate interfaces from engines. Rule of Simplicity: Design for simplicity; add complexity only where you must. Rule of Parsimony: Write a big program only when it is clear by demonstration that nothing else will do. Rule of Transparency: Design for visibility to make inspection and debugging easier. Rule of Robustness: Robustness is the child of transparency and simplicity. Rule of Representation: Fold knowledge into data so program logic can be stupid and robust. Rule of Least Surprise: In interface design, always do the least surprising thing. Rule of Silence: When a program has nothing surprising to say, it should say nothing. Rule of Repair: When you must fail, fail noisily and as soon as possible. Rule of Economy: Programmer time is expensive; conserve it in preference to machine time. Rule of Generation: Avoid hand-hacking; write programs to write programs when you can. Rule of Optimization: Prototype before polishing. Get it working before you optimize it. Rule of Diversity: Distrust all claims for “one true way”. Rule of Extensibility: Design for the future, because it will be here sooner than you think. http://www.faqs.org/docs/artu/ch01s06.html Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface. Unix Philosophy
  42. 42. http://www.faqs.org/docs/artu/ch01s06.html Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface. Unix Philosophy « Read a file of text, determine the n most frequently used words, and print out a sorted list of those words along with their frequencies. » ! http://www.leancrew.com/all-this/2011/12/more-shell-less-egg/ http://franklinchen.com/blog/2011/12/08/revisiting-knuth-and-mcilroys-word-count-programs/h
  43. 43. EVOLUTION Learn From THE PAST Learn from the ELDERs
  44. 44. Components
  45. 45. Components
  46. 46. Account management Racing & Horse Information Distribution Horse RACE Betting Extra CONTENT MANAGEMENT Authentication Information Updates RACE Status WINNERS RUNNERS METEO Odds… update Login/OUT Profile… G Y N U2 H E u
  47. 47. Components Shared Libs
  48. 48. Components micro-services 10-100 LOC!!! Mammouth cockroach Tardigrade hhttp://vimeo.com/79866979 http://martinfowler.com/articles/microservices.html
  49. 49. Message Bus Communication
  50. 50. Communication
  51. 51. Communication Broker less approach e.g.: HTTP/REST, ZeroMQ, distributed actors/process, … http://zeromq.org/whitepapers:brokerless http://www.openstack.org/assets/presentation-media/zmqslides2.pdf h
  52. 52. Front End
  53. 53. Account management Racing & Horse Information Distribution Horse RACE Betting Extra CONTENT MANAGEMENT Authentication Information Updates RACE Status WINNERS RUNNERS METEO Odds… update Login/OUT Profile… G Y N U2 H E u
  54. 54. Account management Racing & Horse Information Distribution AccountTurfInfoTurfPari Update Listener Horse RACE Betting Information Updates TurfInfo Lib Account Lib TurfPari Lib Update Lib Auth Lib DTO Lib
  55. 55. AccountTurfInfoTurfPari Update Listener TurfInfo Lib Accoun t Lib TurfPari Lib Update Lib Auth Lib DTO Lib Backend ooo REST HTTP/JSON Request -> Response RIA backbone jquery underscore less …
  56. 56. BackEnd, fRONtEND AND CMS TEAMS RA A A A AC LLL LLLE AA Backend CMS FrontEnd
  57. 57. L Backend dev. Backend REWORK… Frontend Starts using API BUT… IT DOES NOT WORK AS EXPECTED API STILL NOT USED… A 3 Months LaTER
  58. 58. RA A A A AC LLL LLLE AA Backend CMS FrontEnd TEAMS ReORGANIZATIOn
  59. 59. R A A A A AC LL L L LL E A A A A Team 1 Team 2 Team 3 A
  60. 60. Spotify and the Feature Teams http://blog.crisp.se/2012/11/14/henrikkniberg/scaling-agile-at-spotify http://blog.crisp.se/2012/11/14/henrikkniberg/scaling-agile-at-spotify
  61. 61. Firewall Traffic Manager mysql memcached nginx tomcat tomcat SI http https http://www.couchbase.com/memcached
  62. 62. ooo REST HTTP/JSON Request -> Response Backend
  63. 63. ooo ooo REST HTTP/JSON Request -> Response Backend ooo
  64. 64. Traffic Manager mysql nginx tomcat tomcat SI http https ooo GET /turf/programme/… GET /account/… POST /account/… Firewall
  65. 65. Traffic Manager mysql couchbase nginx tomcat tomcat SI http https ooo GET /turf/programme/… GET /account/… POST /account/… Stateless Firewall
  66. 66. Traffic Manager mysql couchbase nginx tomcat tomcat SI http https Scaling Stateless Firewall
  67. 67. Traffic Manager mysql couchbase nginx tomcat tomcat SI http https Resilience Firewall
  68. 68. Traffic Manager mysql couchbase nginx tomcat tomcat SI http https Scaling Firewall
  69. 69. Traffic Manager mysql couchbase apache/varnishnginx drupaltomcat tomcat SI http New Requirement https Firewall
  70. 70. ooo ooo REST HTTP/JSON Request -> Response Backend ooo
  71. 71. REST HTTP/JSON Request -> Response Backend ooo
  72. 72. ooo REST HTTP/JSON Request -> Response Backend
  73. 73. ooo REST HTTP/JSON Request -> Response WebSocket bidirectional Backend
  74. 74. Traffic Manager SI http https Firewall
  75. 75. Traffic Manager LVS stunnel haproxy Vert.x SI https/ssl http Firewall
  76. 76. Traffic Manager LVS stunnel haproxy Vert.x redis subscribepublish SI https/ssl http Firewall
  77. 77. ooo REST HTTP/JSON Request -> Response WebSocket bidirectional APN Backend
  78. 78. Be CAREFUL OF ARCHITECT BE CAREFUL OF FRAMEWORK AVOID MONOLITHIC APPLICATION LEGACY IS NEXT DOOR THINK SMALL PREFER STATELESS Some Heuristics
  79. 79. Be CAREFUL OF ARCHITECT BE CAREFUL OF FRAMEWORK AVOID MONOLITHIC APPLICATION LEGACY IS NEXT DOOR THINK SMALL PREFER STATELESS Some Heuristics
  80. 80. Questions?
  81. 81. Gartner Presentation May 8th, 2014 http://public.brighttalk.com/resource/core/36753/may_8_software_designed_arch_ynatis_54295.pdf Some Resources PMU website https://www.pmu.fr/ Vert.x http://vertx.io/ redis http://redis.io/ No Silver Bullet http://en.wikipedia.org/wiki/No_Silver_Bullet Lehman's laws of software evolution http://users.ece.utexas.edu/~perry/work/papers/feast1.pdf Microservices http://vimeo.com/79866979 http://martinfowler.com/articles/microservices.html liferay https://www.liferay.com/ The Big Ball of Mud http://www.laputan.org/mud/mud.html http://blog.codinghorror.com/the-big-ball-of-mud-and-other-architectural-disasters/ http://www.arolla.fr/ SockJS http://sockjs.org/
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×