In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Original articles, welcome to reprint. Reprint please indicate: Reprint from IT people story meeting, thank you!
The original link address: "advanced article" docker's micro-service thrift installation and use (X)
From this section to start the development stage of microservices, the preferred according to the following figure, select a module to start the development of microservices, my development habit is to check some of the less dependent on people to develop, found the "information service" to the least dependent on others, began to develop this, before also said that thrift mainly said is theory, this time we direct combat, first through installation and use to start. Source code: github.com/limingios/msA-docker
Thrift installation website address: thrift.apache.org/
download and install
download address
Windows installation
Thrift Use
namespace compiled language package name
Thrift language is similar to Java syntax.
new file
java namespace java com.idig8.thrift.demonamespace py thrift.demo
service DemoService{
void sayIdig(1:string name);
}
! [](https://upload-images.jianshu.io/upload_images/11223715-453a165602f0a8f0.png? imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)``` thrift thrift-0.11.0.exe --gen java demo.thrift
py syntax thrift-0.11.0.exe --gen py demo.thrift
PS: I want to develop a fast calculation RPC service, which mainly provides services through the interface function getInt. The getInt function of this RPC service uses the parameters passed by the user, and after complex calculation, calculates a ×× value and returns it to the user. The server side is developed using java language, while the calling client can be programs developed in java, c, python, etc. In this application scenario, we only need to use Thrift IDL to describe the getInt function.(file with.thrift as suffix), and then use Thrift's multi-language compilation function to compile this IDL file into "language-specific interface files" corresponding to C, java and python languages.(Each language only needs a simple command to compile), so that after getting the "language-specific interface file" of the corresponding language, you can develop client-side and server-side code. As long as the interface remains unchanged during the development process, client-side and server-side development can be carried out independently.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.