TarsCloud / Tars

Tars is a high-performance RPC framework based on name service and Tars protocol, also integrated administration platform, and implemented hosting-service via flexible schedule.
BSD 3-Clause "New" or "Revised" License
9.8k stars 2.08k forks source link

What is the internal scene of gateway? #740

Closed TARS-Question closed 4 years ago

TARS-Answer commented 4 years ago

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.

TARS-Answer commented 4 years ago

提供给客户端http协议能力的时候,可以使用这个网关,不需要自己启动一个http服务了,统一给所有的tars服务提供了 http的能力。

TARS-Question commented 4 years ago

Is it just the HTTP protocol?

TARS-Question commented 4 years ago

只是http协议吗?

TARS-Answer commented 4 years ago

There are still current limiting, fusing, JSON, tup.

TARS-Answer commented 4 years ago

还有限流,熔断,json,tup。

TARS-Question commented 4 years ago

What's the difference from other HTTP gateways?

TARS-Question commented 4 years ago

那跟其他http网关的区别是什么?

TARS-Answer commented 4 years ago

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.

TARS-Answer commented 4 years ago

入口http, 出口tars,就不需要转协议什么的。 服务本身管理也在tars平台上,所以后端tars服务扩容之类的,都能完全无缝感知。 同时也支持普通http的转发,取代部分nginx的功能。网关的转发配置在tars-web上统一管理。

TARS-Question commented 4 years ago

Is the server-side protocol to be changed to JSON?

TARS-Question commented 4 years ago

那么服务端的协议是不是要改为json之类的?

TARS-Answer commented 4 years ago

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.

TARS-Answer commented 4 years ago

并不用,使用新版本的语言lib, 重新编译即可。 apigateway带了协议转换了,部署到平台后,客户端安apigateway定义好的url和json格式就可以请求到后端制定的tars服务了。

TARS-Question commented 4 years ago

Can the request body be directly JSON when calling HTTP?

TARS-Question commented 4 years ago

http调的时候请求体可以直接json吗?

TARS-Answer commented 4 years ago

HTTP request, put JSON in the package, and take a look at the document.

TARS-Answer commented 4 years ago

http请求,包体里面放json,看一下文档。

TARS-Question commented 4 years ago

Does the server need to upgrade to 1.7.2?

TARS-Question commented 4 years ago

服务端需要升级到1.7.2吗?

TARS-Answer commented 4 years ago

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.

TARS-Answer commented 4 years ago

java版本的支持是1.7.2以上,若是原本给客户端使用springboot提供了http的服务的,那么需要看一下使用场景,需要切换成apigateway的请求模式,ios和android等业务掉用端,需要做相应的改变。

TARS-Question commented 4 years ago

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?

TARS-Question commented 4 years ago

看了一下文档说post的body为BasePacket包tars序列化的内容。还想问下:BasePacket这个包可以在哪里看到?有没有tars通信协议和序列化协议的文档?

TARS-Answer commented 4 years ago

The official document of protocol design is available. You can have a look at the document.

TARS-Answer commented 4 years ago

协议的设计官方的文档有,可以看一下文档。