| libs | ||
| src | ||
| test | ||
| .clang-format | ||
| .gitignore | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
Djumbai
A UNIX local messaging service
Components
-
Initiation of Message Sending:
- A Unix user initiates a message sending process using a Command Line Interface (CLI) tool.
-
Creation of Processes:
- The CLI tool spawns a process called
djumbai-client-send. This process runs under the context of the initiating Unix user. djumbai-client-sendspawns another process calleddjumbai-enqueue, which operates under thedjumbaiquser context.
- The CLI tool spawns a process called
-
Message Queuing:
djumbai-enqueueprocess writes the message to a message queue, which functions as a named pipe. This queue acts as an intermediary storage for the message.
-
Message Retrieval:
- The
djumbai-dequeueprocess, functioning as a daemon, runs under thedjumbaiduser context. Its purpose is to retrieve messages from the message queue.
- The
-
Message Transmission:
- Once messages are retrieved,
djumbai-dequeuesends them to thedjumbai-sendprocess. This process operates with root privileges.
- Once messages are retrieved,
-
Receiving and Delivery:
djumbai-sendspawns a process nameddjumbai-client-receive, which operates under the context of the user/group intended to receive the message.djumbai-client-receivewrites the received message to the recipient's message-box.
-
Message Retrieval by User:
- The recipient Unix user can utilize the CLI tool at any time to read messages stored in their inbox.
This structured breakdown elucidates the sequential steps involved in the Unix message sending process, including process spawning, message queuing, retrieval, transmission, and eventual delivery to the intended recipient.
Directories
Mail queue - FIFO in /djumbai/fifos/message_queue and can only be accessed by users from the djumbai_queue group, which contains djumbai_enqueue and djumbai_dequeue
Send FIFO - FIFO in /djumbai/fifos/send_fifo and can only be accessed by users in the djumbai_send group, which contains djumbai_dequeue and djumbai_send
Personal mailbox _ Directory in /djumbai/user/$uid/mailbox, which can only be accessed by the user with UID $uid
Personal SentBox - Directory in /djumbai/user/$uid/sentbox, which can only be accessed by the user with UID $uid
Group mailbox - Directory in /djumbai/group/$gid/mailbox, which can only be accessed by the group with GID $gid
Running
- Run
make - Run
make setup - The binaries will be inside the bin folder (Should run both djumbai_send and djumbai_dequeue as daemons).
- Use the client cli to send and see messages.