Skip to content

This project implements a Unix Domain Socket (UDS) server to manage inter-process communication (IPC) for a peer-to-peer (P2P) note-taking application.

Notifications You must be signed in to change notification settings

nexhero/mercury-socket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mercury Unix Domain Socket

Mercury UDS.

The Mercury Unix Domain Socket project is designed to manage notes using a Unix Domain Socket (UDS) communication protocol. It consists of three main components:

  • mercury-core is responsible for managign storage, network communication, and peer-to-peer operations for sync notes.
  • mercury-usd is the communication protocol that allows others processes on the same machine to have access to the notes.
  • mercury-cli privides a command-line interface to interact with the mercury-core server through Unix Domain Socket.

This is a Unix Domain Socket for managing notes using the Mercury framework, enable to syncronize P2P notes. It provides IPC commands to create, retrieve, and manage documents and repositories.

Features.

  • Create, read, update, and delete notes, and tags
  • Manage repositories ( sync with other devices )
  • Unix socket communication

Installation.

This application is designed for GNU/Linux only.

  • Download:
    git clone https://github.com/nexhero/mercury-socket.git
    cd mercury-socket
    npm install
        

Run the socket daemon

node index.js

Command-Line Options

  • -s, –socket <string>: Path for the Unix socket (default: /tmp/mercury.socket)
  • -d, –dir <string>: Directory to save database (default: ~/.config/mercury/)
  • -b, –database <string>: Database name (default: mercury_db.db)
  • -o, –verbose Display information in the console.
  • -h, –help, It’s just a normal help.

Use mercury terminal client

node mercury-cli.js --help

Create a Note Document

node mercury-cli.js -s '/tmp/mercury.socket' create --title 'My Game project --content 'I need ideas...'

IPC Commands

The commands are in index.js

  1. `create-note` - Create a new note
  2. `all-documents` - List all documents
  3. `document-id` - Get document by ID
  4. `remove-document` - Remove document by ID
  5. `get-local-repository` - Get the local repository key
  6. `get-all-repository` - List all appended repositories
  7. `append-repository` - Add remote repository
  8. `remove-repository` - Remove repository by ID

Notes

  • Default socket path: /tmp/mercury.socket
  • Default storage directory: ~/.config/mercury/

License

MIT License

About

This project implements a Unix Domain Socket (UDS) server to manage inter-process communication (IPC) for a peer-to-peer (P2P) note-taking application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published