DStore is a scalable data storage solution, drawing inspiration from Redis, renowned for its simplicity and performance. This project is for helping me learn Scala.
Ping
Command: Responds withPONG
, a simple yet effective way to check the connectivity and responsiveness of the DStore server.Echo
Command: Returns the same string that is sent to it, demonstrating basic interaction and response capabilities.
DStore is structured into two main components: the CLI (Command Line Interface) and the Server. These are managed as separate projects within an SBT (Scala Build Tool) build environment.
- Scala (version 2.13.12 or newer)
- SBT (Scala Build Tool)
-
Clone the Repository:
git clone https://github.com/Doug-Luce/dstore cd dstore
-
Compile the Projects: Navigate to the root directory of the project and run the following command to compile both the CLI and Server projects:
sbt compile
-
Running the Server: To start the DStore server, execute the following command:
sbt "project server" run
This will start the server component of DStore, listening for incoming connections and commands.
-
Running the CLI: In a separate terminal, you can start the CLI component to interact with the server. Use the following command:
sbt "project cli" run
Once the CLI is running, you can issue commands to the server. For example:
- To use the
ping
command, typeping
and press Enter. The server should respond withPONG
. - To use the
echo
command, typeecho <your message>
and press Enter. The server will echo back the message you sent.
- To use the
-
Exiting the server: To exit the server use the
exit
command at theServer>
prompt
Server> exit
Contributions to DStore are welcome! If you have ideas for new features, improvements, or bug fixes, feel free to submit pull requests or open issues.
MIT License
Copyright © 2024 Douglas Luce
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.