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

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.

主站蜘蛛池模板: 东阳市| 塘沽区| 宁武县| 济南市| 枣阳市| 兴国县| 南丰县| 孙吴县| 兴隆县| 平罗县| 永兴县| 长岛县| 仪征市| 黄龙县| 福泉市| 宜兴市| 绥江县| 扶余县| 弥勒县| 沁源县| 惠东县| 斗六市| 松江区| 孟津县| 韩城市| 囊谦县| 深水埗区| 墨竹工卡县| 临沂市| 紫阳县| 沙雅县| 新田县| 南昌县| 金门县| 农安县| 桐庐县| 古交市| 兴隆县| 南部县| 罗山县| 门源|