BUYMAã®Personal Shopper APIïŒPS-APIïŒããgRPCãSQSãWebhookãéåæåŠçãæŽ»çšããŠããã€ã¯ããµãŒãã¹ãšã¢ããªã¹ãã€ãªããªããã¹ã±ãŒã«ããä»çµã¿ã玹ä»ããŸãã ããã«ã¡ã¯ããšãã°ã¢ã®ãã§ã«ãã³ãã§ãã SELLããŒã ã«æå±ããåºåè
åãæ©èœã®éçºãæ
åœããŠããŸãã ä»åã¯ãç§ãã¡ã®ããŒã ã§éçšããŠãããPS-APIãã«ã€ããŠã玹ä»ããŸãã æ¥ã
å¢ãç¶ãããªã¯ãšã¹ããã©ã®ããã«åŠçããŠããã®ãããã®ã¢ãŒããã¯ãã£ã®è£åŽã«ã€ããŠã話ãããããšæããŸãã ð English version is also available below. BUYMAã§ã¯ãããŒãœãã«ã·ã§ãããŒïŒåºåè
ïŒãååãåºåããæ¹æ³ãããã€ããããŸãã ãã€ããŒãž ããçŽæ¥ååãç»é²ããæ¹æ³ãããã°ã CSVã€ã³ããŒã ã䜿ã£ãŠäžæ¬ç»é²ããæ¹æ³ããããŸãã ããã«ãèªç€Ÿã·ã¹ãã ãéçšããŠããå€§èŠæš¡ãªããŒãããŒãäºæ¥è
åãã«ã¯ã Personal Shopper APIïŒéç§°ïŒPS-APIïŒ ãå©çšãã飿ºææ®µãæäŸããŠããŸãã éçšèŠä»¶ã«ãã£ãŠã¯ãããæ·±ãã«ã¹ã¿ã 飿ºãè¡ãã±ãŒã¹ããããŸãã ãããã®æ©èœãå©çšããåºåè
ãå¢ããã«ã€ããŠãPSé¢é£ã·ã¹ãã ã®ä¿å®ã»æ¹åã¯ã楜ããããããåæã«ãšãŠããã£ã¬ã³ãžã³ã°ãªãã®ã«ãªã£ãŠãããŸããã åºåæ¹æ³ã®æŠèŠïŒMy PageãCSVã€ã³ããŒããPS-APIãã«ã¹ã¿ã 飿º ä»åã¯ã PS-API ã«ã€ããŠç޹ä»ããŸããPS-APIãã©ã®ããã«åããŠããã®ãããªãéåæAPIãšããŠèšèšããã®ãããããŠãã€ã¯ããµãŒãã¹ãšå€§èŠæš¡ãªã¢ããªã¹ãã€ãªãã·ã¹ãã ãéçšããäžã§åŠãã ãªã¢ã«ãªæèšã«ã€ããŠå
±æããŸãã PS-APIã®ç®çïŒBUYMAã®ã³ã¢ãã©ãããã©ãŒã ãžã®é£æºã¬ã€ã€ãŒ BUYMAã¯ããŒã±ãããã¬ã€ã¹ã§ãããååç»é²ã¯åºåè
ã«ãšã£ãŠéèŠãªæ¥åžžæ¥åã®ã²ãšã€ã§ãã 倧éã®ååã管çããŠããåºåè
ã«ãšã£ãŠã1ä»¶ãã€æåã§ååãç»é²ããã®ã¯ãšãŠã倧ããªè² æ
ã«ãªããŸãã CSVã€ã³ããŒãã§ãã®è² æ
ãæžããããšãã§ããŸãããåšåº«ã»äŸ¡æ Œã»ååæ
å ±ãèªç€Ÿã·ã¹ãã ã§ç®¡çããŠããããŒãããŒã«ãšã£ãŠã¯ãAPI飿ºãèªç¶ãªéžæè¢ã«ãªããŸãã ããã§ç»å Žããã®ãPS-APIã§ãã PS-APIã§ã¯ãåºåè
ã以äžã®ãããªæäœãè¡ããŸãã ååã®ç»é²ã»æŽæ° åšåº«ãããªãšãŒã·ã§ã³ã®ç®¡ç 泚ææ
å ±ã®ååŸ çºéäŸé Œã®åŠç PS-APIã¯ãåºåè
åŽã®ã·ã¹ãã ãšBUYMAã®ã³ã¢ãã©ãããã©ãŒã ãã€ãªãã匷åºãªé£æºã¬ã€ã€ãŒãšããŠæ©èœããŠããŸãã PS-APIã¯ãåºåè
ã·ã¹ãã ãšBUYMAã®ã³ã¢ãã©ãããã©ãŒã ãã€ãªã飿ºã¬ã€ã€ãŒ 課é¡ïŒãã€ã¯ããµãŒãã¹ãšæ¢åã¢ããªã¹ã®é£æº BUYMAã®äž»èŠãªæ¥ååŠçã®å€ãã¯ãçŸåšãã¡ã€ã³ç°å¢ãã€ãŸã巚倧ãªã¢ããªã·ãã¯ãªã·ã¹ãã äžã§åããŠããŸãã äžæ¹ã§ãPS-APIã¯ã¢ãã³ãªãã€ã¯ããµãŒãã¹ãšããŠå®è£
ãããŠããŸãã ç§ã¯ä»¥åã«ãµãŒããŒã¬ã¹éçºã®çµéšã¯ãããŸããããå€§èŠæš¡ãªãã€ã¯ããµãŒãã¹ã¢ãŒããã¯ãã£ã«æ¬æ Œçã«é¢ããã®ã¯ãããåããŠã§ããã ãã¥ãŒãã¯ãŒã«ãŒããªãã©ã€ããµãŒãã¹ééä¿¡ãWebhooké
ä¿¡ãšãã£ã忣ã·ã¹ãã ã®äžçã«å
¥ã£ãŠããã®ã¯ãæ¬åœã«ããšãŠãå匷ã«ãªããŸããã PS-APIãšBUYMAã¡ã€ã³ã·ã¹ãã ã®ã¢ãŒããã¯ãã£æŠèŠ â» ã¢ãŒããã¯ãã£ã¯ããããŸãã«èšããšãã®ãããªæ§æã«ãªã£ãŠããŸãã ããã§éèŠãªèšèšææ³ã¯æ¬¡ã®ç¹ã§ãã PS-APIã¯æçµçãªåŠçå
ã§ã¯ãªã å€éšã·ã¹ãã ãšBUYMAã®ã¢ããªã¹ãã€ãªãããªãŒã±ã¹ãã¬ãŒã·ã§ã³ã¬ã€ã€ãŒãã§ãã ãªãéåæåŠçãªã®ã PS-APIã«ãããæå€§ã®èšèšå€æã®ã²ãšã€ããå€ãã®åŠçãéåæã«ããããšã§ãã åºåè
ãååç»é²ãªã¯ãšã¹ããéä¿¡ããå Žåãã·ã¹ãã ã¯ãã¹ãŠã®åŠçãåæçã«å®è¡ããŠãæçµçµæã峿ã§è¿ãããã§ã¯ãããŸããã 代ããã«ã次ã®ãããªæµãããã©ããŸãã ãªã¯ãšã¹ããåãä»ãã åŠççšã®ãã¥ãŒã«ç©ãïŒå³æã¬ã¹ãã³ã¹ïŒ BUYMAåŽã§åŸç¶åŠçãè¡ãïŒã¯ãŒã«ãŒã«ããéåæåŠçïŒ æçµçµæãWebhookã§è¿ã ãã®æ¹åŒã«ã¯ã決å®çãªã¡ãªããããããŸãã 1. ãã©ãã£ãã¯ã¹ãã€ã¯ã®åžå åºåè
ã¯ããšãã©ã倧éã®ãªã¯ãšã¹ããäžæã«éä¿¡ããŸãã ããã§èšãã倧éããšã¯ãç£èŠããã·ã¥ããŒããæ²é³Žãäžããã¬ãã«ã®éã§ãã éåæãã¥ãŒã䜿ãããšã§ãæ¥æ¿ãªãã©ãã£ãã¯å¢å ããã®ãŸãŸã³ã¢ã·ã¹ãã ã«æµã蟌ãã®ã§ã¯ãªããäžåºŠãããã¡ãšããŠåãæ¢ããããšãã§ããŸãã ãªã¯ãšã¹ãã¯é çªãåŸ
ã¡ãã·ã¹ãã ãèããããå¶åŸ¡ãããããŒã¹ã§åŠçãããŸãã æçµçãªååç»é²åŠçãBUYMAã®ã¡ã€ã³ã·ã¹ãã ã«äŸåããŠããããããã®ãããã¡ãªã³ã°å±€ã¯éåžžã«éèŠãªåœ¹å²ãæ
ã£ãŠããŸãã éåæãã¥ãŒã«ãããå€éšããã®å€§éãªã¯ãšã¹ããäžåºŠãããã¡ãªã³ã°ãã 2. é害æã®ã°ã¬ãŒã¹ãã«ã»ãã°ã©ããŒã·ã§ã³ïŒç¢ºå®ãªãªã«ããªãŒïŒ äžæµã·ã¹ãã ãäžæçã«å©çšã§ããªãå Žåã§ããåºåè
ãåããªã¯ãšã¹ããæåã§åéããå¿
èŠã¯ãããŸããã ãªã¯ãšã¹ãã¯å®å
šã«ãã¥ãŒã«æ®ããäžæµã·ã¹ãã ã埩æ§ããããšã«èªåã§åŠçãåéã§ããŸãã ãŠãŒã¶ãŒã«ãæåãããŸã§äœåºŠããªãã©ã€ããŠãã ããããšãé¡ããããããã¯ããã«å¥å
šã§ãã ã¢ããªãžã®ä¿¡é Œãå®å
šã«å€±ã£ãŠããŸãåãã·ã¹ãã åŽã§åžåã§ããããšã¯åžåãã¹ãã§ãã 3. ã³ã¢ãã©ãããã©ãŒã ã®ä¿è· ååç»é²ã泚æé¢é£ã®äž»èŠãªåŠçã¯ãBUYMAã®ã¢ããªã·ãã¯ãªã¡ã€ã³ç°å¢ã§å®è¡ãããŠããŸãã ãã®ããããã®ã³ã¢ã·ã¹ãã ãéè² è·ããæ
éã«ä¿è·ããå¿
èŠããããŸãã PS-APIãå€éšãã©ãã£ãã¯ãåãæ¢ããã¢ããªã¹åŽãžãªã¯ãšã¹ããæž¡ãããŒã¹ïŒã¹ã«ãŒãããïŒãå¶åŸ¡ããŸãã ããã¯ããã€ã¯ããµãŒãã¹ã®æè»æ§ãšãã¢ããªã¹ã®å®å®æ§ãäž¡ç«ããããã®èšèšã§ãã gRPCãšSQSïŒéä¿¡æ¹åŒã®é©æé©æ PS-APIã§ã¯ããã¹ãŠã®éä¿¡ãåãæ¹æ³ã§æ±ã£ãŠããããã§ã¯ãããŸããã åŠçã®æ§è³ªãã€ãŸã峿æ§ãå¿
èŠããèä¹
æ§ãå¿
èŠãã«å¿ããŠãgRPCãšAmazon SQSãæç¢ºã«äœ¿ãåããŠããŸãã gRPC gRPCã¯äž»ã«ã峿ã®ã¬ã¹ãã³ã¹ãå¿
èŠãªå
éšãµãŒãã¹ééä¿¡ã§å©çšããŠããŸãã ããã¯ãPS-APIãçŸåšã®åŠçãç¶è¡ããåã«ãä¿¡é Œã§ããå
éšã¬ã¹ãã³ã¹ãå¿
èŠãšããã±ãŒã¹ã§ãã ããšãã°ã以äžã®ãããªçšéã§äœ¿ã£ãŠããŸãã ããŒãããŒã·ã¹ãã ãšLive PS-APIéã®éä¿¡ ããŒãããŒã·ã¹ãã ãšSandbox PS-APIéã®éä¿¡ ãã©ã³ãæ
å ±ãã«ããŽãªæ
å ±ãªã©ã®ãã¹ã¿ãŒããŒã¿ååŸ SQS äžæ¹ã§ãããéãæ¥ååŠçã«ã¯SQSããŒã¹ã®éåæåŠçãå©çšããŠããŸãã ããšãã°ãBUYMAã®ã¡ã€ã³ã·ã¹ãã ãšé£æºãã以äžã®ãããªåŠçã§ãã ååç»é²ã»æŽæ° 泚æã®çºéäŸé ŒåŠç ãªããã®èšèšãããŸãæ©èœããã®ã gRPCãšSQSãçµã¿åãããããšã§ãããããã®éä¿¡æ¹åŒã倿§ãªå Žé¢ã§äœ¿ãããšãã§ããŸãã gRPCã¯ãé«éãªå
éšãªã¯ãšã¹ãã»ã¬ã¹ãã³ã¹éä¿¡ã«ãSQSã¯ãèä¹
æ§ã®ããéåææ¥ååŠçã«äœ¿ããŸãã ç¹åŸŽ gRPC SQSïŒéåæãã¥ãŒïŒ äž»ãªçšé å
éšãµãŒãã¹éã®çŽæ¥éä¿¡ éãæ¥ååŠçãã¢ããªã¹é£æº åŠçã¢ãã« åæçïŒå³æã¬ã¹ãã³ã¹åŸ
ã¡ïŒ éåæçïŒEvent-DrivenïŒ ã¡ãªãã é«éãåå®å
šïŒProtobufïŒãæç¢ºãªå¥çŽ èä¹
æ§ããªãã©ã€å®¹æãã¹ãã€ã¯åžå å
·äœäŸ ãã¹ã¿ãŒããŒã¿ïŒãã©ã³ã/ã«ããŽãªïŒååŸ ååã®ç»é²ã»æŽæ°ãçºéäŸé ŒåŠç SQSãšWebhookã«ããéåæã«ãŒãã®å®æ éãåŠçã¯SQSãå©çšããŸãããªã¯ãšã¹ããåãä»ãããšããã€ããŒããä¿åãããã®åŸã®æ¥ååŠçãã¯ãŒã«ãŒãéåæã§é²ããŸãã éèŠãªã®ã¯ãSQSã¯ãåŠçã®å®äºã€ãã³ããã«ãå©çšãããŠããç¹ã§ãã ååç»é²ãå®äºãããšããã®çµæããã¥ãŒçµç±ã§PS-APIã«è¿ãããããããåºåè
ãžWebhookã¬ã¹ãã³ã¹ãéä¿¡ãããŸãã Webhookã¯åãªãAPIã®å³æã¬ã¹ãã³ã¹ã§ã¯ãªããéåæåŠçã®æçµéç¥ãªã®ã§ãã gRPCãSQSãWebhookã«ããPS-APIã®éä¿¡ãã㌠ãã®åºå¥ã«ã¯ãããã€ãã®ã¡ãªããããããŸãã BUYMAã®ã¡ã€ã³ã·ã¹ãã ãæ¥æ¿ãªãã©ãã£ãã¯å¢å ããä¿è·ã§ãã å€ãã®åºåè
ãåæã«ååæŽæ°ãªã¯ãšã¹ããéã£ãå Žåã§ãããªã¯ãšã¹ãããã¥ãŒã«ç©ã¿ã段éçã«åŠçã§ããŸãã ä¿¡é Œæ§ãåäžãã äžæµã·ã¹ãã ã®äžéšãäžæçã«å©çšã§ããªãå Žåã§ãããªã¯ãšã¹ããæ¶ããŠããŸãããšã¯ãªããåºåè
ããã¹ãŠãæåã§å詊è¡ããå¿
èŠããããŸããã ã¹ã±ãŒã«ããããåºç€ã«ãªã APIãªã¯ãšã¹ãã®åä»ããã¥ãŒåŠçãWebhooké
ä¿¡ãããããåå¥ã«æ¹åã§ããŸãã æ¬åœã®èª²é¡ïŒã¹ã±ãŒã« PS-APIã¯åœåãå°èŠæš¡ãªãŠãŒã¹ã±ãŒã¹ãæ³å®ããŠèšèšãããŠãããããçŸåšã®ãã©ãã£ãã¯èŠæš¡ã«ã¯ããããªããªã£ãŠããŸãã ãµãŒãã¹ã®æ®åã«äŒŽããAPIãå©çšããåºåè
æ°ãšãªã¯ãšã¹ãæ°ãæ¥å¢ããŸããããã®ã¹ã±ãŒã«ã¢ããã«äŒŽããã¹ã±ãŒã©ããªãã£ãéçšé¢ã§ããã€ãã®èª²é¡ã衚é¢åããŠããŸããã ã¬ãŒããªããã ãã¥ãŒã®ããã«ãã㯠åŠçç¶æ³ã®å¯èŠæ§ ããªã¯ãšã¹ãã¯æåããã®ã«ãååã¯ã©ãã«ãããŸããïŒããšããåãåãã ãã®æåŸã®è³ªåã«å¯Ÿããçãã¯ãæã
ãããªããŸãã âæè¡çã«ã¯âŠâŠãŸã ãã¥ãŒã®ã©ããã«ãããŸããâ ãŸãã¯ã âWebhookã¯ãšã©ãŒã¡ãã»ãŒãžä»ãã§éä¿¡ãããŸãããâ éåæã·ã¹ãã ã®éçšã¯ãèšèšããããããã£ãšé¢çœããªã£ãŠããã®ããã®ãããã§ãã APIãäœãããšèªäœããã¡ãã倧å€ã§ãã ãããããªã¯ãšã¹ããä»ã©ã®åŠç段éã«ããã®ãããé¢ä¿è
å
šå¡ãçè§£ã§ããããã«ããããšã¯ããŸãå¥ã®é£ããããããŸãã ãããŠå€ãã®å ŽåãåŸè
ã®æ¹ãé£ããã§ãã éåæã·ã¹ãã ã«æœãè€éã å€ããèŠããšãAPIãªã¯ãšã¹ãã¯ãšãŠãã·ã³ãã«ã«èŠããŸãã POST /api/v1/products.json ãããå
éšã§ã¯ãå®éã«ã¯ä»¥äžã®ãããªè€éãªãã€ãã©ã€ã³ãèµ°ã£ãŠããŸãã API â ããªããŒã·ã§ã³ â ããŒã¿ããŒã¹ â ãã¥ãŒ â ã¯ãŒã«ãŒ â ã¹ãã¬ãŒãž â ç»åããŠã³ããŒã â åŸç¶åŠçïŒãŸãã¯ãäžæµããã»ããµãïŒ â å®äºã€ãã³ã â ãã£ãã·ã¥ç¡å¹å â Webhooké
ä¿¡ APIã¯ãåãªããšã³ããã€ã³ããšãããããç©ºæž¯ã®æè·ç©ç®¡çã·ã¹ãã ã®ããã«ãªã£ãŠãããŸãã ã·ã¹ãã ã¯ä¿¡é ŒãããŠãããã§ãããªã¯ãšã¹ããä»ã©ãã«ããã®ããå®å
šã«ææ¡ããã®ã¯é£ããââãããªäžçã§ãã ãªã³ãã¬ãã¹ããAWSãžã®ç§»è¡ åºååŠçã«ãããããŒã¿ããŒã¹ã®ãã©ã³ã¶ã¯ã·ã§ã³éåºŠãæ¹åããããã§ã倧ããªè»¢æ©ãšãªã£ãã®ãã€ã³ãã©ã®AWSç§»è¡ãšDBã¢ããã°ã¬ãŒãã§ããAWSã®ãªãœãŒã¹ã掻çšããããšã§ãDBæ¥ç¶ã®å®å®æ§ãåŠçæ§èœãåäžããã€ã³ããŒãéåºŠãæ¹åãããŸããã ãã¡ãããAWSãžç§»è¡ãããDBãã¢ããã°ã¬ãŒãããããããããšãã£ãŠããã¹ãŠã®ããã«ããã¯ãç°¡åã«æ¶ããããã§ã¯ãããŸãããããã§ããDBæ¥ç¶ã®å®å®æ§ããã©ã³ã¶ã¯ã·ã§ã³åŠçéåºŠã®æ¹åã¯ãéåæåŠçå
šäœã®ããã©ãŒãã³ã¹ã«å€§ãã圱é¿ããŸãã ä»åŸãæ¹åããŠããããšïŒæ¬åœã®ãã¹ã±ãŒã«ãã«åã㊠PS-APIã¯ããšããšå°æ°ã®ãŠãŒã¶ãŒãæ³å®ããŠäœãããŠããŸãããããã®æ³å®ãä»ã¯æã§ãã çŸåšããåºåè
ãå®å¿ããŠéçšãä»»ãããã匷åºãªåºç€ãç®æãã以äžã®é åãç¶ç¶çã«æ¹åããŠããŸãã ããè¯ãã¬ãŒããªãããæŠç¥ã®å®è£
ãªã¯ãšã¹ãç¶æ
ã®å¯èŠæ§åäž ç»åããŠã³ããŒãåŠçã®é«éåãšã¯ãŒã«ãŒã®ãªãŒãã¹ã±ãŒãªã³ã° æè¡çãªå°éç¥èããªãåºåè
ã§ããã¹ã ãŒãºã«é£æºãéå§ã§ããããPS-APIããã¥ã¡ã³ããæ¡å
ã¢ããªã¹ãšãã€ã¯ããµãŒãã¹ããŸããéçšã®æ¹å ç§ãã¡ã®ç®æšã¯ãåã«å€§éã®ãªã¯ãšã¹ãããåãä»ãããããšã§ã¯ãããŸããã æ°åä»¶èŠæš¡ã®ã¹ãã€ã¯ã«ãå®å®ããŠå¯Ÿå¿ããåºåè
ã®ããžãã¹ãè£ãã確å®ã«æ¯ãããçã«ä¿¡é Œã§ããAPIã·ã¹ãã ãžé²åããç¶ããããšã§ãã æ³šèš: æ¬èšäºå
ã®ç»åã¯ãå
容ããããããã衚çŸããããã«AIã§çæããã€ã¡ãŒãžç»åã§ãã Building for Scale: Inside the Event-Driven Architecture of the BUYMA Personal Shopper API Good day, Iâm Fernand from Enigmo. Iâm part of the SELL team, where I work on developing features that support sellers. This time, Iâd like to talk about âPS-API,â a system operated by our team. Iâll share some insights into the architecture behind it and how we handle the continuously growing number of requests every day. At BUYMA, personal shoppers have several ways to list products on the platform. Some sellers manage listings directly from My Page . Others use CSV import for bulk operations. For larger partners and businesses that operate their own systems, we also provide integration options through the Personal Shopper API , or PS-API. In some cases, we even support deeper custom integrations depending on the sellerâs operational needs. As more sellers began using these features, maintaining and improving the PS systems became both fun and challenging. Listing options: My Page, CSV import, PS-API, and custom integrations This time, I would like to introduce PS-API : how it works, why we designed it as an asynchronous API, and what we learned from operating a system that connects a microservice with a large monolithic platform. Purpose of PS-API BUYMA is a marketplace where product registration is one of the most important daily operations for sellers. For sellers managing large catalogs, manually listing products one by one quickly becomes painful. CSV import helps, but for partners that already manage inventory, pricing, and stock through their own systems, API integration becomes the natural next step. That is where PS-API comes in. It allows sellers to: create and update products manage stock and variants receive order information handle shipment requests PS-API acts as an integration layer between personal shoppersâ systems and BUYMAâs core platform. PS-API connects seller systems with BUYMAâs core platform The Challenge: When a Microservice Meets a Monolith Most of BUYMAâs core business processes still run in the main environment, which is a monolithic system. PS-API, however, was implemented as a microservice. Although I had experience with serverless development before, this was my first time working on a microservice architecture. Moving into a world of queues, workers, retries, internal service communication, and webhook delivery was very educational. Very educational... â» The architecture looks something like this. High-level architecture of PS-API and BUYMAâs main system The key point here is: PS-API is not the final destination. It is the orchestration layer between external personal shopper systems and BUYMAâs platform. Why Asynchronous Processing One of the biggest design decisions in PS-API was to make many operations asynchronous. When a seller sends a product registration request, the system does not process everything synchronously and immediately return the final result. Instead: The request is accepted. It is queued for processing. BUYMA processes it downstream. The final result is sent back via webhook. This approach gives us several important advantages. 1. Handling Traffic Spikes Sellers sometimes send bulk requests. And by âbulk,â I mean enough requests to make the monitoring dashboard emotionally unavailable. With asynchronous queues, sudden traffic spikes can be absorbed without immediately overwhelming the core system. Requests can wait in the queue and be processed at a controlled pace. This is especially important because the final product registration still depends on BUYMAâs main system. synchronous queues buffer sudden request spikes before they reach the core platform 2. Better Failure Recovery If a downstream system is temporarily unavailable, sellers do not need to resend the same request manually. The request can remain in the queue, and processing can resume once the downstream system recovers. This is much better than asking users to keep retrying until they lose faith in the service entirely. 3. Protecting the Core Platform Because the main product registration and order processes still happen inside BUYMAâs monolithic environment, we need to protect that system carefully. PS-API absorbs external traffic and controls how requests are passed to the core platform. This allows the monolith to process requests at a safer and more predictable pace. Microservice optimism meets monolith realism. gRPC and SQS: Choosing the Right Communication Style In PS-API, not all communication is handled in the same way. Some processes require quick, direct communication between internal services. Other processes need durable asynchronous execution because they may take longer, depend on the BUYMA core platform, or require retries. For that reason, we use both gRPC and SQS, depending on the characteristics of each process. gRPC We mainly use gRPC for internal service-to-service communication where an immediate response is required. These are cases where PS-API needs a reliable internal response before continuing the current process. BUYMA Partners System â Live PS-API communication BUYMA Partners System â Sandbox PS-API communication Retrieving master data, such as brand data and category data Using gRPC gives us several advantages: fast internal communication clear service contracts through protobuf definitions better type safety between services predictable request-response behavior SQS For heavier business operations, we use SQS-based asynchronous processing. This includes communication with BUYMAâs main system for operations such as: product listing and update order shipment request processing These operations eventually affect BUYMAâs core platform, where product and order data are actually processed. Instead of forcing the original API request to wait until all downstream processing is complete, PS-API accepts the request, stores the payload, and lets the business process continue asynchronously. SQS is also used for process completion events. For example, after product listing or product update processing is completed, the completion result is sent back through the queue. PS-API then imports the result and sends the appropriate webhook response to the seller system. This is an important point: webhook delivery is not simply a response to the original API request. It is the final notification after asynchronous processing has completed. gRPC, SQS, and Webhook complete the asynchronous processing loop Why This Design Works Well Using gRPC and SQS together allows each communication pattern to be used where it fits best. gRPC is used for fast internal request-response communication. SQS is used for durable asynchronous business processing. This separation gives us several benefits. It protects BUYMAâs main system from sudden traffic spikes. If many sellers send product update requests at the same time, those requests can be queued and processed gradually. It improves reliability. If part of the downstream system is temporarily unavailable, requests do not simply disappear, and sellers do not need to retry everything manually. It gives us a better foundation for scaling. API request handling, queue processing, and webhook delivery can each be improved separately. This combination is one of the key reasons PS-API can operate as a bridge between external seller systems and BUYMAâs existing core platform. The Real Challenge: Scale Originally, PS-API was intended for a relatively small number of users. That assumption aged beautifully. As adoption increased, both the number of sellers and the number of requests grew significantly. With that growth came several familiar challenges: rate limits queue bottlenecks processing visibility issues inquiries like âThe request succeeded, but where is my product?â The answer to that last question is sometimes: "Technically⊠somewhere in the queue." Or: "The webhook was already sent, along with an error message." This is where operating asynchronous systems becomes much more interesting than designing them. Building the API is one thing. Helping everyone understand the flow of request is another. And usually, that is the harder part. The Hidden Complexity of Async Systems From the outside, an API request may look simple: POST /api/v1/products.json But internally, the flow may look more like this: API â validation â database â queue â worker â storage â image download â downstream processor â completion event â cache invalidation â webhook delivery At some point, API starts looking less like an endpoint and more like airport baggage handling. Everyone trusts the system. No one is entirely sure where the suitcase is. From On-Premise to AWS One major improvement came from moving our infrastructure from on-premise servers to AWS, along with upgrading the database. This improved the transaction speed of import-related database operations. Of course, moving to AWS and upgrading the database did not magically remove every bottleneck. Software remains committed to teaching humility. However, it gave us a much stronger foundation, especially for asynchronous processing. For systems that depend heavily on queues, workers, and scalable processing capacity, infrastructure flexibility matters a lot. What We Are Still Improving Even after these improvements, scalability remains an ongoing challenge. The API layer can scale relatively well, but many core processes still depend on the main environment, where scaling is naturally more difficult. We are continuing to improve areas such as: better rate-limit strategies faster image download processing autoscaling for workers better visibility into request status smoother operations across monolith and microservice boundaries expanded PS-API documentation so that even sellers without technical expertise can smoothly start integrating with the platform The goal is not simply to accept the request. The real goal is to make PS-API a system sellers can rely on and one that can handle thousands of requests. Note: The images in this article were created using AI-generated visuals and are intended for conceptual illustration. hrmos.co