RoseDB is a simple, NoSQL database that is written completely in Java containing the most basic functions that is needed for a database. This project was initially created as a random project for me (a shower thought) but has evolved into a learning experience for me.
RoseDB works with both in-memory and file data storage, for every request it receives, it stores it on a queue and also on its cache which will be saved immediately at an interval of 5 seconds to the specified directory. It utilizes websockets to receive and send data to clients and should be more than capable to process plenty of requests per second.
My primary goal/aim of this project is not to create a simple but decent database that can get you up and running in literal mere seconds with little to no configuration at all.
Are you not convinced? Have a look at our no-configuration setup.
java -jar RoseDB.jar
.Authorization
code (be sure to remember it) then restart the application.RoseDB has support for websocket SSL which counts as security and also an Authorization
header enforcement with the header being compared with hash (it is written to the disk as a hash value for security), there will be more security features and if you have more to suggest then feel free to send a Pull Request or an Issue explaining everything. We are always focusing our attention to bringing more security features onto the application but since we are still in our very early stages,
we are trying to get everything up and running first before focusing on security.
Though, in my opinion, RoseDB is more suited to be used in simple applications like tiny Discord bots that is shared among friends and not large applications that require super complicated features, after all, the main aim of RoseDB is to be as simple as possible and that involves replication and load balancing (future).
Installation of RoseDB is simple, all you need is JDK 11 (Preferably, OpenJDK 11) and tier-one extreme basic knowledge of JSON. Here are the steps of installing RoseDB.
java -jar RoseDB.jar
java -jar RoseDB.jar
Configuration of RoseDB is straightforward, here is an example of a configuration file (it is on JSON format). |
FIELD | TYPE | DESCRIPTION | DEFAULT VALUE |
---|---|---|---|---|
Cores | integer | The number of cores the application should use. | 1 | |
maxTextMessageBufferSizeMB | integer | The maximum message buffer size for each message (request) received (MB) | 5 | |
maxTextMessageSizeMB | integer | The maximum text (message/request) size to receive (MB) | 5 | |
port | integer | The port that RoseDB should use. | 5995 | |
versioning | boolean | Whether RoseDB should save a backup version for all items that are modified. (Recommended) | true | |
preload | boolean | Whether to preload all items that are saved on the database. (Recommended) | true | |
updateChecker | boolean | Whether to check for RoseDB updates from the maintainer's server. (Recommended) | true | |
directory | string | The exact directory folder where RoseDB will save all the data. | running location of the jar | |
heartbeatIntervalSeconds | integer | The interval seconds of when the server should send a heartbeat packet to all connections. | 30 | |
loggingLevel | string | The minimum level of which RoseDB should log (recommended at INFO for performance), options: INFO, WARNING, DEBUG, ERROR. | INFO |
If you want to quickly get up and running with your application then feel free to use our wrappers.
RoseDB is very simple and easy to use, after following Installation, you can quickly get up and running by sending requests
to the server via Queria
format or JSON
format.
An example of a Queria
GET request is:
database.collection.get(item)
An example of a Queria
ADD request is:
database.collection.add(item, {"someKey":"someValue"})
Are you interested, learn more at our GitHub Wiki.
To report a vulnerability, simply file an issue at Issue Template.
To suggest a new feature or some sort, feel free to send a suggestion issue at Suggestion Template
Shindou Mihou, creator and developer.
io.javalin
).org.json
)