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

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.

主站蜘蛛池模板: 安多县| 邢台市| 灌云县| 云南省| 郑州市| 义乌市| 玉龙| 昌乐县| 环江| 石首市| 永胜县| 宜春市| 明光市| 甘洛县| 石景山区| 唐河县| 炎陵县| 尖扎县| 宁晋县| 牟定县| 思茅市| 黑水县| 兴义市| 湖口县| 大邑县| 寻乌县| 新丰县| 昌江| 洪雅县| 长垣县| 崇信县| 杭锦旗| 武穴市| 民县| 永寿县| 苏尼特右旗| 藁城市| 海盐县| 沧州市| 峨山| 阳曲县|