librats: Release of version 0.7.x and rats-search 2.0

Hello everyone! I continue to develop my library for creating distributed applications, which has already become the foundation for the new version of rats-search.

It allows you to deploy your own P2P network and connect users with each other. The main feature is automatic peer discovery, which is extremely relevant in the context of constant network blocks and restrictions.

Currently, the library supports the following languages: C/C++, Android (Java), Python, and Node.js.

Since the release of the last article, a lot of pleasant changes have accumulated, which I want to talk about. Additionally, this time I will touch on the new version of rats-search itself.

The latest stable release as of today is 0.7.0. The source code and binary files are available for download for:

  • Windows (64-bit)

  • Linux (64-bit)

  • Android (32-bit / 64-bit)

  • macOS (64-bit)

https://github.com/librats/librats/releases

Access to the library's functionalities is organized through FFI (Foreign Function Interface).

This significantly distinguishes librats from libp2p where implementations in different languages are often out of sync: the same feature may work perfectly in the Go version but be absent in the JavaScript version.

Librats guarantees a unified API and full feature parity for all supported languages. No more surprises when, for example, mDNS works on one platform but is not implemented on another.

In version 0.7, the BitTorrent module has undergone significant revision. To enhance stability and performance, I integrated several proven mechanisms from the libtorrent library into it.

Furthermore, the encryption module, based on the Noise Protocol Framework, has been greatly improved. In this version, it is fully stable.

You can find more about the capabilities of librats and code examples in my previous articles. But this time, instead of dry theory, I want to present to you a full-fledged open-source project built on this library.

In the comments to past publications, I was often asked to show more real examples of usage. And now, I have stabilized the new, second version of rats-search (it is still in beta status) - https://github.com/librats/rats-search.

This is a distributed torrent search engine. It automatically scans the network, collects metadata, and stores it in large local databases. Some users have databases containing millions of torrents collected by the first version of the program. The key feature is that all these databases are interconnected through a P2P network and become available even to "fresh" participants who have just connected to the system. Backward compatibility with the 1.x database format has been maintained.

It is also worth noting the choice of technology stack. There is currently a trend where developers are massively rewriting their applications in Electron. However, my situation is the opposite: version 2.0 was rewritten from Electron to Qt (C++).

This is a conscious step toward optimization. Data exchange in key nodes is very active, and the speed of torrent collection is only increasing over time. In such conditions, the efficiency of memory and CPU usage becomes a critical factor that I have long wanted to optimize.

I hope that the code of the project itself will help you better understand the capabilities and use cases of the library.

The functionality of rats-search already offers wide possibilities:

  • Search: You can search not only by the names of torrents but also by their contents (specific files within the torrent).

  • Download: Files can be downloaded both through the built-in client and transferred to external programs, such as qBittorrent.

  • Operating Modes: The application supports both a classic graphical user interface (GUI) and a console mode (Headless) with management via REST API.

  • Filtering: A flexible filtering system is provided, including the ability to hide adult content (Adult filter).

In upcoming updates, modules for enriching torrents with metadata from external sources, including from RuTracker, will return.

The current build is already available for Linux and Windows. Support for macOS is planned to return in version 2.1.x.

Thank you all for your attention ;-)

Comments