AskDoctorsの13年目を支える技術

25c1cc63b5c02f22195035fb6dd49b36?s=47 Owl
March 22, 2019

 AskDoctorsの13年目を支える技術

RailsDM2019 Day1 B-7 登壇資料 『AskDoctorsの13年目を支える技術』

25c1cc63b5c02f22195035fb6dd49b36?s=128

Owl

March 22, 2019
Tweet

Transcript

  1. Technologies supporting for 13 years @RailsDM 2019

  2. > Web Engineer @M3, inc > Love Ruby, Vim, Gopher

    > Board-game Geek About Me Owl (@owl_works)
  3. Changing the World of Medicine Using the Internet

  4. Central Service: m3.com 270,000 In Japan 4,500,000 Worldwide Member Doctors

  5. Our Services 1/2 NDPN Medical News ΤϜεϦʔ ΩϟϦΞ Job Recruitment

    .3܅ Pharmaceutical Promotion
  6. Our Services 2/2 And over 20 other services σδΧϧ Cloud

    Electronic Medical Records "TL%PDUPST Medical Consultation
  7. And over 20 other services σδΧϧ Our Services 2/2 Cloud

    Electronic Medical Records "TL%PDUPST Medical Consultation
  8. You Can Ask Doctors 5,900 Doctors 2,000,000 Q&A

  9. Back To the 2005 First release: 2005 (Dec) Now: 2019

    (Mar)
  10. Back To the 2005 First release: 2005 (Dec) Now: 2019

    (Mar) 13years
  11. Back To the 2005 !!

  12. 2019

  13. 2015

  14. 2011

  15. 2005

  16. None
  17. ( ).present? (2005) => True -Rails (v.1 Release) -Git (v.1

    Release) -PHP 5.0 (Release) -Feature phone
  18. ( ).present? (2005) => False -iPhone (2008) -Chrome (2008) -jQuery

    (2006)
  19. Tech Stack in 2005 Version Control System => CVS Bug

    Tracker => Mantis JS Framework => prototype.js
  20. I have never heard of those (I became an engineer

    3 years ago)
  21. We also used Generator, a framework for developing web apps

    with xmls. xml…Pardon?
  22. Version Control System 1.CVS 2.SVN (subversion) 3.Git (now!)

  23. Bug Tracker 1.Mantis 2.REDMINE 3.Jira (now!)

  24. JS Framework 1.Prototype 2.jQuery 3.Vue (now!)

  25. App History

  26. App Structure (ancient) Apps PC Smart phone Feature phone For

    women DB Java Java Perl Java
  27. Apps Constitution (ancient) Apps PC Smart phone Feature phone For

    women DB Java Java Perl Java DB structures are NOT shared.
  28. Historical Background Feature Phone Outsourced to external organizations. For Women

    (AskMoon) Launched as a service with a different concept.
  29. New Requirement Let's share content data between services! Sounds good.

  30. PC Smart phone Feature phone For women CoreAPI New! Topic

    Q&A Patient Web API
  31. 3 years later…

  32. New Requirement We need to develop Views faster. How about

    integrating PC with SP? LGTM !
  33. PC & SP Apps Constitution (middle) Apps Feature phone For

    women DB New!
  34. Pain Points

  35. New Requirement FP users must also be able to use

    PC sites. Right.
  36. Membership integration Apps Feature phone DB PC & SP Insert

    User Data
  37. Membership integration Apps Feature phone DB PC & SP Insert

    User Data User model has become complicated…
  38. DB has longevity Applications Replaced Replaced Replaced DB is unchanged

  39. Pain Points #2

  40. Back To the 2005 First release: 2005 (Dec) Now: 2019

    (Mar) 13years
  41. Version Control System 1.CVS 2.SVN (subversion) 3.Git (now!)

  42. Bug Tracker 1.Mantis 2.REDMINE 3.Jira (now!)

  43. No one knows Is this batch still working? Oh, this

    is ten years old. I was a high school student at that time.
  44. History rhymes 1/2 It’s inconvenient if we don't have a

    batch list. I made one. It’s all right now.
  45. 3 years later…

  46. History rhymes 1/2 It’s inconvenient if we don't have a

    batch list. I made one. It’s all right now.
  47. Now batches are consolidated in Digdag.

  48. Get back on track…

  49. PC & SP Apps Constitution (middle) Apps Feature phone For

    women DB Stop active development
  50. PC & SP Feature phone For women CoreAPI Web API

    Stop active development ……
  51. Problems with CoreAPI 1. Increased volume of coding 2. Data

    integrity problem
 (API transaction) 3. API design difficulties
  52. It’s micro-service !

  53. At that time the best practices were not yet known.

  54. Keyword Trend on Google Keyword: microservice (ϚΠΫϩαʔϏεΞʔΩςΫνϟ) 2014 2016

  55. Keyword Trend on Google Keyword: microservice (ϚΠΫϩαʔϏεΞʔΩςΫνϟ) 2014 CoreAPI 2009

  56. Too many services V1 V2 Askmn CoreAPI Inspection Manage Admin

    smartphone Payment Apps developed by our team FP M3com
  57. Let’s reduce V1 V2 Askmn CoreAPI Inspection Manage Admin smartphone

    Payment FP Replace and remove M3com
  58. Admin Let’s reduce V1 V2 Askmn CoreAPI Inspection Manage smartphone

    Payment FP Stop active development M3com
  59. Admin Let’s reduce V2 Inspection Manage M3com Konmari !

  60. Wait. Why did we have so many services?

  61. Step By Step We cannot replace all systems at once.

    Step By Step!
  62. Step By Step, and zombie And zombie services are born.

  63. Step By Step, and zombie The replacement is almost over.

    But an old app is still alive.
  64. Step By Step, and zombie Reason 1: 99% complete! But

    a few complicated batches are running….
  65. Step By Step, and zombie Reason 2: 99% complete! But

    the http server config is complex and we need to leave the redirectors...
  66. Progress of replacement 1 month later: 2 months later: 12

    months later: 50% 95% 99%
  67. Nonetheless, the replacement will be over soon. Thank you for

    everything! Rest in peace.
  68. Next step ? 2005-2009 : Let's just release anyway! 2009-2017

    : Calm down. Let's reorganize.
  69. Next step is SCALING. Env and Application

  70. Background 2009-2017(Reorganize Age) The number of users was flat. And

    scalability was not important. But recently we have started offering services for companies.
  71. More users! Surely. Scalability !

  72. Development Env 1. Add E2E tests 2. DB migration (flyway)

    3. Consolidate batches
 (Digdag)
  73. Application 1. Replace Full-text search
 (Solr => Elasticsearch) 2. Cache

    strategy 3. DB ScaleUp 4. Docker
  74. But environmental improvement tends to be postponed… RoI is a

    top priority…
  75. Engineer’s Time Within our team, engineers have time to make

    technical improvements. Many improvements were made by this system.
  76. Learn the history of your services

  77. History Tells Us 1. How hard our predecessors
 worked 2.

    What was the concept of the service 3. Where we are in history