Description: Fluxeron Server is a Redis-Server clone designed to help developers understand the concepts of application logic and database management.
- It provides a range of commands to interact with the database such as
SET,GET,DEL, and others. - Implements support for
listoperations such asLPUSH,LPOP, and various hash operations. - Database dump and persistence functionalities.
You need to have the following installed:
- C++ compiler (with C++17 support)
- Make utility
To compile the Fluxeron Server:
make all
This will create an executable named fluxeron_server.exe in the directory.
To run the server on the default port (6379):
make run
OR:
./fluxeron_server.exe
To specify a custom port:
./fluxeron_server.exe <custom-port>
PING: Verifies connectivity to the server. Returns+PONG.ECHO <message>: Echoes the provided message. Returns+<message>.
SET <key> <value>: Assigns a value to a key. Returns+OK.GET <key>: Retrieves the value of a key. Returns value or$-1.DEL <key>: Deletes the specified key. Returns the count of keys removed.EXPIRE <key> <seconds>: Sets a timeout for a key. Returns+OKif successful.RENAME <old-key> <new-key>: Renames a key. Returns+OKif successful.
LPUSH <key> <value1> <value2> ...: Pushes values to the start of a list.RPUSH <key> <value1> <value2> ...: Pushes values to the end of a list.LLEN <key>: Returns the length of a list.LPOP <key>: Pops a value from the start of a list.RPOP <key>: Pops a value from the end of a list.LGET <key>: Retrieves all elements of a list.
HSET <key> <field> <value>: Sets the value of a field in a hash.HGET <key> <field>: Gets the value of a field in a hash.HDEL <key> <field>: Deletes a field in a hash.HGETALL <key>: Gets all fields and values of a hash.
-
Clean Build:
make cleanThis removes all generated files.
-
Rebuild Everything:
make rebuild
The server periodically saves the database to a file named dump.my_fdb.
- Interval: Every 300 seconds
- Persistent methods notify the developer through the command line (success or error).