591 Commits (956d3beb53771d2862caf02fbe3b9bd186e4aea9)
 

Author SHA1 Message Date
Sayan Nandan a3398f1d07
Rebrand from TerrabaseDB to Skybase (#90)
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 7bf17a6374
Move tests in tdb/config to a separate module
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 37f2c6355d
Restore `iter.next()` call removed in 4dcb203359
This call is necessary as SUPDATE returns Nil even if one of the keys
don't exist.

Also, this was note added to the actiondoc.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 2c895cf143
Upgrade dependencies
This closes #86 and also closes #87.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 4dcb203359
Remove redundant call to `iter.next()` in SUPDATE
Just like fd139a9dda, this skip is not
needed as we're already breaking from the loop.

Also, all remaining unsafe blocks that were left in
2e85fbb831 have been explained.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan fd139a9dda
No need to skip next value in `SSET`
The skipping of the next value is absolutely unneeded as we're already
exiting the loop when the hash table contains the key.
Thus, this op was removed.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 2e85fbb831
Explain why some `unsafe` code blocks are safe
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 8736db1034
Code cleanup and added auto-sync with repo mirror
Dependencies were upgraded

A mirror sync badge was added. Also README was revised and workflow badge was fixed.

Signed-off-by: Sayan Nandan nandansayan@outlook.com
4 years ago
Sayan Nandan 8a54e8f85d
Remove `openssl-sys` as a dependency
`openssl-sys` isn't required anymore; it was added in the `ssl` branch
during the development phase.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 3a6b9b282f
Merge branch 'ssl' into next
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 4722e01d23
Add `ran_string()` to `tdb-bench`
Also, dependencies were upgraded across all crates and the version for
`tdb-macros` was streamlined to 0.5.0 like the other crates.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
dependabot[bot] 4db769c2d8 Bump bytes from 1.0.0 to 1.0.1
Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v1.0.0...v1.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
4 years ago
dependabot[bot] 42b710e154 Bump rand from 0.8.1 to 0.8.2
Bumps [rand](https://github.com/rust-random/rand) from 0.8.1 to 0.8.2.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/0.8.1...0.8.2)

Signed-off-by: dependabot[bot] <support@github.com>
4 years ago
dependabot[bot] 4f039f45f5 Bump tokio from 1.0.1 to 1.0.2
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.0.1...tokio-1.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
4 years ago
Sayan Nandan d3387b68d0
Fix erratic packet delivery times with `BufWriter`
The data was being delievered in different batches, which
caused problems. This commit replaces the current stream
writer with a buffered writer ensuring good delivery.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan e92a6eb8c1
Use `read_again()` to read from the `SslStream`
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 8c067d20a5
Fix writing to TCP socket instead of SSL socket
We were doing an extremely erroneous thing: writing to the TCP
socket instead of the SSL socket. This caused OpenSSL to report
problems on the client and server sides, telling us that there
was a problem with the SSL connection.

This commit revises the `write_lowlevel` trait impl for `SslStream` to
write to the SSL socket.

Also, the 'wrong' flushing of data for similar reasons has been fixed

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan c74259a488
Listen to futures in parallel with `join!`
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan d84234724d
Update to upstream changes and polish SSL API
Also several debug messages were added for debugging SSL connections.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
dependabot[bot] 43ee423c83 Bump serde from 1.0.118 to 1.0.119
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.118 to 1.0.119.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.118...v1.0.119)

Signed-off-by: dependabot[bot] <support@github.com>
4 years ago
dependabot[bot] c3d70ccbec Bump log from 0.4.11 to 0.4.13
Bumps [log](https://github.com/rust-lang/log) from 0.4.11 to 0.4.13.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.11...0.4.13)

Signed-off-by: dependabot[bot] <support@github.com>
4 years ago
dependabot[bot] bff95b9d27 Bump regex from 1.4.2 to 1.4.3
Bumps [regex](https://github.com/rust-lang/regex) from 1.4.2 to 1.4.3.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.4.2...1.4.3)

Signed-off-by: dependabot[bot] <support@github.com>
4 years ago
Sayan Nandan 07b9985732
Add client side SSL support
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 053be8c44a
Enable parallel handling of secure/insecure ports
Also, the imports were optimized.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 30c9f2991b
Enable query execution for secure connections
This commit enables queries to be executed on secure connections.
At the same time, the `execute_query_ssl` function was removed as
`execute_query` has been modified so that it can be used by both secure
and insecure connections

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 17860ef45a
Implement the `Multi` variant for `MultiListener`
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 68552b4d71
Enable TLS port to be set and impl `MultiListener`
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan b2e3d90799
Fix bug that suppressed unused cli flags warning
The cli.yaml file was also reformatted

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 442570a58b
Let SSL opts be read from the cfg file and cli
This commit enables SSL settings to be read from command-line arguments
and from the configuration file.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
dependabot[bot] c0539598a2 Bump syn from 1.0.57 to 1.0.58
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.57 to 1.0.58.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.57...1.0.58)

Signed-off-by: dependabot[bot] <support@github.com>
4 years ago
Sayan Nandan 61daf6c2e2
Add example on TLS configuration
Also, we've muted dead_code warning froms the compiler, temporarily.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan f6f4221047
Fix random port allocation for Windows
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 3f5848d49a
Fix test macro that caused test runs to fail
With upstream changes to Tokio, the API for `Shutdown<'_, T>` as defined
by the `AsyncWriteExt` trait has changed. This change requires us to
await the function and then handle the result.
The macro definition was changed as a consequence.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
dependabot[bot] 4915121ce8 Bump syn from 1.0.56 to 1.0.57
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.56 to 1.0.57.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.56...1.0.57)

Signed-off-by: dependabot[bot] <support@github.com>
4 years ago
Sayan Nandan 052898ee9e
Fix binary build step
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 357f57250b
Add binary build step for docker image
The binary needs to be built before it can be copied into the container.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan 5391f2a694
Re-enable docker image builds
This commit re-enables docker image builds which was moved to a different CI server in a previous commit.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
dependabot[bot] 7a7b0fee49 Bump devtimer from 4.0.0 to 4.0.1
Bumps [devtimer](https://github.com/ohsayan/devtimer) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/ohsayan/devtimer/releases)
- [Changelog](https://github.com/ohsayan/devtimer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ohsayan/devtimer/commits)

Signed-off-by: dependabot[bot] <support@github.com>
4 years ago
dependabot[bot] 3c24c1c74b Bump serde_json from 1.0.60 to 1.0.61
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.60 to 1.0.61.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.60...v1.0.61)

Signed-off-by: dependabot[bot] <support@github.com>
4 years ago
Sayan Nandan 43ac93b47d
Fix kvengine tests
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan f2031129ce
Upgrade dependencies
Closes #59, closes #60, closes #61, closes #62, closes #63 and closes #64.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 25d211d0a2
Implement `Con<'_>` object for TLS/non-TLS streams
This object either holds a mutable reference to an unencrypted TCP
stream or an encrypted TLS stream (using OpenSSL). The action handlers
were modified as a consequence.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 43bb178954
Implement basic TLS module and connection handler
This commit implements 'TLS versions' of `CHandler` and `Listener` from
`dbnet`.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan 9404c5444d Add more information on the license 4 years ago
Sayan Nandan 0087d6b07c
Add basic SSL/TLS listener
This commit adds a basic SSL/TLS listener using `openssl`.
The `SslListener` object can accept a connection and get a decrypted
stream.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
dependabot[bot] 5d17e0a89d
Upgrade deps
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan a9bd9be988
Use `IntoBinaryData` for multi namespace ser-de
This makes sure that we can implement serialization for multiple types.

At the same time, we DON'T put in blanket implementations for this trait
as we want to make sure that unintended things don't get flushed.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan c83dbd0436
Improve error handling in snapstore
We've made the error handling slightly 'less aggressive' than the
previous version which `unwrap`ped here and there.

Also, the documentation for the entire snapstore module was greatly
improved.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 632a198ede
Implement multi-ns ser and de
This commit provides an implementation which allows multiple 'named'
namespaces to be serialized and deserialized.

No information about the data needs to be known for deserialization;
To facilitate this, a partition map is implemented which is stored as a
separate file. For now, the data file is called `snapstore.bin` and the
partition metadata file is called partmap.

The partition map (`PartMap`) contains a vector of `Partition` objects.
This object stores 'markers' (`len`) which are ideally byte positions
or offsets that demarcate the locations of the individual namespaces.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan c1f126ecb4
Drop netpool object before writing to stdout
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago