2.3 KiB
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-send
spawns another process calleddjumbai-enqueue
, which operates under thedjumbaiq
user context.
- The CLI tool spawns a process called
-
Message Queuing:
djumbai-enqueue
process 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-dequeue
process, functioning as a daemon, runs under thedjumbaid
user context. Its purpose is to retrieve messages from the message queue.
- The
-
Message Transmission:
- Once messages are retrieved,
djumbai-dequeue
sends them to thedjumbai-send
process. This process operates with root privileges.
- Once messages are retrieved,
-
Receiving and Delivery:
djumbai-send
spawns a process nameddjumbai-client-receive
, which operates under the context of the user intended to receive the message.djumbai-client-receive
writes 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.
Cenas concretas
Mail queue - FIFO em /opt/djumbai/fifos/message_queue e so pode ser acedida por users do grupo djumbai-queue, que contem djumbai-enqueue e djumbai-dequeue
Send FIFO - FIFO em /opt/djumbai/fifos/send_fifo e so pode ser acedida por users do grupo djumbai-send, que contem djumbai-dequeue e djumbai-send
Mailbox pessoal - Diretoria em /opt/djumbai/user/$uid/mailbox, que so pode ser acedida pelo user com UID $uid
SentBox pessoal - Diretoria em /opt/djumbai/user/$uid/sentbox, que so pode ser acedida pelo user com UID $uid
Mailbox grupo - Diretoria em /opt/djumbai/group/$gid/mailbox, que so pode ser acedida pelo grupo com GID $gid