Relationship between Mercari & PHP ● Mercari app’s API is written in PHP ● Migrating to microservices ○ From PHP to Go ○ Break down existing API into multiple services ○ MTC2018 - Mercari API: from Monolithic to Microservices
Detect unused APIs 1. List APIs that haven’t been recently accessed a. For a month in our case b. Use Google BigQuery & a script written in Go 2. Check if we may delete the API a. Investigate codes b. Use `git blame` and ask implementer c. Find tickets related to it
Build project team ● Collect fellows [Important] ○ backend engineer ○ QA engineer ● Decide the release procedure ○ How to do QA ○ JIRA ticket ● Hold a kick-off with ○ Better to hold it every month
Delete codes ● Check recent access log ● Check methods recursively ○ Type and type `git grep`! ○ With symbol search function by PhpStorm ○ Controller, Service, Exception, Entity, DB table, DB schema, test, etc...
Deleting code is difficult ● Need to read the code steadily or ask a senior engineer ● Do it with fellows, NOT alone ● Don’t forget to check the access log ● Check the impact on other repositories when drop tables ● Let’s hold a drinking party every month