Skip to main content

· 3 min read
arso collective

Today we're announcing the release of Sonar 0.6!

We've been developing Sonar for more than two year, with a few breaks due to other obligations. Sonar is a peer to peer database with an integrated search engine. It is built upon the Hypercore protocol stack of peer-to-peer libraries and the Tantivy search engine.

Sonar allows to easily replicate collections of content between peers, together with a search index providing full-text search on the content repositories. It runs as a Node.js server and is suitable for running on end-user devices and web servers alike. We provide a JavaScript client SDK to develop applications that use Sonar as a data backend.

Together with the beta release, we've published two example applications that use Sonar as a backend.

  • PeerBooks is a book sharing app. Users can upload PDFs, attach metadata through an ISBN number, and share these collections of books with other peers. Sonar will also provide a search on the full text of the PDFs.
  • MediaLib is a media sharing app. It supports importing videos from YouTube and allows to upload media files. The collections can be shared with peers, and the available metadata is indexed in the full-text search engine.

Both example apps are built with Remix for the frontend. Using Remix with Sonar has been a great experience so far and is a tool we can recommend highly.

Sonar consists of several parts, which all have new releases out now:

  • @arsonar/core is the core library that handles the peer-to-peer networking and record database. It has a plugin interface that is used by two modules currently:
    • @arsonar/plugin-search provides the full-text search capabilities. It integrates the tantivy search engine into Sonar and automatically indexes all records in a collection. This means that the search index is fully replicated between peers in a streaming fashion.
    • @arsonar/plugin-relations integrates quadstore to index the relations between records. Currently, it enables simple is-related-to searches. In the future, this could expose a full SPARQL query interface onto a Sonar collection.
  • @arsonar/server is the HTTP API daemon that wraps @arsonar/core and exposes a REST API. It is intended to be run continously, and users and apps can manage collections and records through the HTTP API.
  • @arsonar/client is the JavaScript client SDK. It provides a nice API to talk to a Sonar server. It also includes @arsonar/common which has modules for schema management and dealing with records.

We recently moved the client and common modules to TypeScript, so these now have a great IDE support with full typings for all methods. We also moved APIs closer to web standard.

Finally, we published a first round of docs for the different parts of Sonar. It's still incomplete, we'll expand it continously in the next months. If things are unclear please feel invited to Discord or Matrix or open an issue on Github.

Thanks! — arso collective