Closed TARS-Question closed 4 years ago
提供给客户端http协议能力的时候,可以使用这个网关,不需要自己启动一个http服务了,统一给所有的tars服务提供了 http的能力。
Is it just the HTTP protocol?
只是http协议吗?
There are still current limiting, fusing, JSON, tup.
还有限流,熔断,json,tup。
What's the difference from other HTTP gateways?
那跟其他http网关的区别是什么?
If you import HTTP and export tars, you don't need to transfer agreements.
The service itself is also managed on the tar platform, so the back-end tar service expansion and so on can be completely seamless perception.
At the same time, it also supports the forwarding of ordinary HTTP to replace some functions of nginx. The forwarding configuration of the gateway is managed uniformly on the tars web.
入口http, 出口tars,就不需要转协议什么的。 服务本身管理也在tars平台上,所以后端tars服务扩容之类的,都能完全无缝感知。 同时也支持普通http的转发,取代部分nginx的功能。网关的转发配置在tars-web上统一管理。
Is the server-side protocol to be changed to JSON?
那么服务端的协议是不是要改为json之类的?
No, use the new version of the language lib and recompile it.
The apigateway has protocol transformation. After it is deployed to the platform, the client can request the tar service specified by the backend after installing the URL and JSON format defined by apigateway.
并不用,使用新版本的语言lib, 重新编译即可。 apigateway带了协议转换了,部署到平台后,客户端安apigateway定义好的url和json格式就可以请求到后端制定的tars服务了。
Can the request body be directly JSON when calling HTTP?
http调的时候请求体可以直接json吗?
HTTP request, put JSON in the package, and take a look at the document.
http请求,包体里面放json,看一下文档。
Does the server need to upgrade to 1.7.2?
服务端需要升级到1.7.2吗?
The support of java version is above 1.7.2. If you originally provided HTTP service for the client using springboot, you need to take a look at the usage scenario, switch to the request mode of apigateway, and the business clients such as IOS and Android need to be changed accordingly.
java版本的支持是1.7.2以上,若是原本给客户端使用springboot提供了http的服务的,那么需要看一下使用场景,需要切换成apigateway的请求模式,ios和android等业务掉用端,需要做相应的改变。
After reading the document, it is said that the body of post serializes the contents of the basepacket package tars. I also want to ask: where can I see the basepacket? Is there a document on the tars communication protocol and serialization protocol?
看了一下文档说post的body为BasePacket包tars序列化的内容。还想问下:BasePacket这个包可以在哪里看到?有没有tars通信协议和序列化协议的文档?
The official document of protocol design is available. You can have a look at the document.
协议的设计官方的文档有,可以看一下文档。
When providing the client with HTTP protocol capability, you can use this gateway. You don't need to start an HTTP service by yourself. It provides HTTP capability for all tar services.