Scalable, simple RESTful object storage platform, written in C#
- Maintenance release; now .NET Core only
- Dependency updates
- Added support for Sqlite (now supporting Sqlite, MS SQL, MySQL, and PostgreSQL)
- Simplified database integration and usage to reduce cross-platform issues
- Database tables are now automatically created if they don't exist
- Logging to the file system in addition to syslog and console
- Minor code refactor for manageability
First things first - do you need help or have feedback? File an issue here!
The binaries for Kvpbase can be created by compiling from source or using the pre-compiled binaries found in Kvpbase.StorageServer\bin\release\netcoreapp2.0\
(I intentionally did not .gitignore
these files). Executing the binaries will create the requisite configuration files and database tables.
$ dotnet Kvpbase.StorageServer.dll
By default, Kvpbase will listen on localhost
and only handle requests from the local machine. If you wish to change this, modify Server.DnsHostname
in the System.json
file. When modifying this value, follow these rules:
- If you are using an IP address that listens on any interface such as
0.0.0.0
,*
, or+
, Kvpbase must be run using elevated privileges - If using any other IP address or DNS name, the HOST header on incoming requests MUST match the value for this parameter
By default, data is stored within ./Storage/[userguid]/[containername]
. The setup process will create a series of sample files within the default
user's container, also named default
, which is configured for public/unauthenticated read access:
- GET http://localhost:8000/default/default/hello.html
- GET http://localhost:8000/default/default/hello.txt
- GET http://localhost:8000/default/default/hello.json
To create your first object, call POST /[userguid]/[containername]/[objectkey]
. A simple cURL example is shown here.
$ curl -X POST -d "My first object!" "http://localhost:8000/default/default/firstfile.txt?x-api-key=default"
The response is simply a 200/OK.
Then retrieve it:
$ curl http://localhost:8000/default/default/firstfile.txt
The result is a 200/OK with your data:
My first object!
To see the contents of your container, call GET /[userguid]/[containername]
.
$ curl "http://localhost:8000/default/default"
To delete your first object, call DELETE /[userguid]/[containername]/[objectkey]
. A simple cURL example is shown here.
$ curl -X DELETE "http://localhost:8000/default/default/firstfile.txt?x-api-key=default"
The response is simply a 200/OK.
Please visit our documentation [https://github.com/kvpbase/storage-server/wiki] for details on APIs, configuration files, deployment scenarios, and more.
Core use cases for Kvpbase Storage Server:
- Object storage - create, read, update, delete, search objects using HTTP
- Container storage - create, read, update, delete, search containers using HTTP
- Primary storage for objects - range read, range write, and append support
- Scalable storage - multi-node scale-out support using shared backend disk storage
- Filesystem gateway - RESTful access to existing SAN/DAS (block with filesystem) or NAS (fileshares via CIFS, NFS)
Numerous SDKs and sample scripts are already available for Kvpbase Storage Server: https://github.com/kvpbase/. Need an SDK for a different language? Let me know! Currently, SDKs are available in:
- C# - https://github.com/kvpbase/sdk-csharp
- Javascript - https://github.com/kvpbase/sdk-js
- Java - https://github.com/kvpbase/sdk-java
- Python - https://github.com/kvpbase/sdk-python
- cURL - https://github.com/kvpbase/curl-scripts
Refer to CHANGELOG.md for version history.