Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

toksdotdev/trust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔑 Trust Chat

A very basic chat server in Rust.

Running the example

Open up your terminal, and run the following command.

cargo run

Open up another terminal, and telnet to the corresponding ip and port (default port is 1234).

telnet 0.0.0.0 1234

Configuring the port

cargo run -- --port=9090

Support commands

To join a room

NOTE: You can only join only 1 room in the entire client lifetime.

JOIN {room_name} {username}

To send message

NOTE: You'll get an error message if you attempt to send a message without joining a room.

Any random message.

Digging Deeper

Stack

Entities

All entities in the system are running as actors, and they include:

Protocol

The communication between an external client(e.g. telnet) and the server adopts a very simple Codec which can ve found here.

Further improvements

  • To handle more scale, we can leverage on actix-redis to persist user sessions to redis (possibly, a redis cluster).

Contributing

If you see any area this could be improved upon, kindly feel free to open a PR. Cheers!!!.

Releases

No releases published

Packages

No packages published

Languages