https://github.com/felipeaz/udp-chat
Chat server made using UDP connection
https://github.com/felipeaz/udp-chat
chat-application golang udp-protocol udp-server
Last synced: 3 months ago
JSON representation
Chat server made using UDP connection
- Host: GitHub
- URL: https://github.com/felipeaz/udp-chat
- Owner: felipeaz
- Created: 2021-11-27T06:54:38.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-17T20:50:51.000Z (over 3 years ago)
- Last Synced: 2025-01-07T05:22:00.397Z (4 months ago)
- Topics: chat-application, golang, udp-protocol, udp-server
- Language: Go
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# udp-chat
UDP-CHAT is a chat made in Golang which simulates a real-time chat using a UDP server.
#### Business Rules
- The last 20 messages are stored into a Redis with an expiry time of 20 minutes.
- If the server took more than 5 seconds to reply, the connection is closed (timeout set as 5 sec)## PROJECT REQUIREMENTS
This project requires ``DOCKER`` and ``GOLANG`` installed in your machine.
## Ports Availability
``6380`` - REDIS``8000`` - SERVER
## INSTALLATION
To install & run the chat is pretty simple, all the steps have been added to a shell script and we can run it as a makefile.
### STEP-BY-STEP
On the main project folder ``{project_path}/udp-chat``, run the following commands:
``make server`` -> Initialize Docker adding the ``REDIS`` container and running the ``SERVER`` on port ``8000``
``make client`` -> Runs a ``CLIENT`` instance which listen on server port 8000.If you want to stop the server, go to the project folder again and type ``make server-stop``
### Debugging cache operations
You can see every action made on REDIS using the client ``redis-cli``.
Just open a new terminal and type: ``redis-cli -p 6380`` then ``monitor``. If you get an ``OK`` you will see every action made on REDIS.