With the development of the Internet, more and more services can be carried by not only a single node (or a single language), but also multi-language distributed collaborative development (such as the access layer is completed by Node.js, ) Layer is implemented by C ++ / GO / Python) and from this form a large heterogeneous system.
We developed Tars.js based on the Tars system so that users can quickly build (migrate) Node.js services without changing the overall architecture of heterogeneous systems, and it is very convenient Split the original single service into multiple (logical) subservices.
Tars.js has been accumulated and iterated in Tencent for more than 5 years (supported by the Node.js@0.10 version), and is widely used in Tencent QQ browser, Tencent desktop browser, Tencent map, App treasure, Tencent mobile butler, Internet +, Tens Medical, Tencent Medical, insurance, lottery and other dozens of important businesses, Japan has undertaken tens of billions of traffic.
In other words:
You can use any framework you are familiar with (such as Express.js / Koa.js, including but not limited to web frameworks), and you don't need to modify the framework (without introducing any middleware). You can run it through Tars.js and enjoy the various monitoring and management features provided by the platform.
At the same time, the modules provided by Tars.js can also be imported according to your needs (or not imported if not used).
Tars.js is designed for high performance and large concurrency, and uses a large number of front-end (V8) optimization techniques (such as FlattenString / FastProperties, etc.) to minimize the impact of the capabilities provided on business performance.
After our testing (Web Server), the default impact of bypass reporting and monitoring on service performance is ≤ 5%, and the performance of commonly used modules (RPC, logs, etc.) is among the best in the industry.
Tars.js provides differentiated operation solutions according to different business types:
Due to the limited space, I can't show all the capabilities. If you have more requirements (such as RPC calls, etc.), you can use the modules provided by Tars.js (as follows):
Each module (click the name to jump) has extremely detailed documentation (README) for you to consult at any time.
npm i -g @ tars / deploy
const http = require('http');
const hostname = process.env.IP || '127.0.0.1';
const port = process.env.PORT || 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World\n');
});
server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});
The above is an example of HTTP Server on the official website of Node.js. It only needs to modify the IP and port to run on the Tars.js
platform.
The IP and PORT obtained in the environment variables here are the IP and port in the OBJ deployment information you configured in the first step.
tars-deploy HelloWorld
On the Tars platform, select the service you just created-> Release Management-> Manually upload the release package, and then publish this version.
You can access your services through the IP and port you configured in the first step.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. Open source ecosystem
2. Collaboration, People, Software
3. Evaluation model