官术网_书友最值得收藏!

Designing a Great API

Regardless of whether you are experienced in building APIs and microservices and looking for the techniques on how you can apply them with Go or you are completely new to the world of microservices, it is worth spending the time to read this chapter.

Writing an API contract feels part art, part science and, when you discuss your design with other engineers, you will most certainly agree to disagree, not to the level of tabs versus spaces, but there is certainly something personal about API contracts.

In this chapter, we will look at the two most popular options, which are RESTful and RPC. We will examine the semantics of each approach, which will equip you with the knowledge to argue your case when the inevitable discussion (read argument) occurs. Choosing between REST or RPC may be entirely down to your current environment. If you currently have services running that implement a RESTful approach, then I suggest you stick with it, likewise if you now use RPC. One thing I would suggest is that you read the entire chapter to understand the semantics, pros, and cons of each approach.

主站蜘蛛池模板: 隆尧县| 天长市| 通山县| 都匀市| 凉山| 泗洪县| 宜章县| 揭阳市| 额济纳旗| 峡江县| 如皋市| 弋阳县| 朝阳市| 陈巴尔虎旗| 彭泽县| 鄂尔多斯市| 马鞍山市| 双辽市| 晴隆县| 福鼎市| 双辽市| 米脂县| 宁德市| 碌曲县| 廉江市| 新乐市| 城口县| 伊金霍洛旗| 吴堡县| 舟山市| 合水县| 睢宁县| 东兰县| 西充县| 高邑县| 黄山市| 上思县| 民乐县| 保定市| 营口市| 霍山县|