Code Monkey home page Code Monkey logo

cloudstore-rs's People

Contributors

gwihlidal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cloudstore-rs's Issues

Implement list objects via continuation tokens

It is important to support paging multiple groups of keys in case the list is extremely long. This is done in AWS through "continuation tokens", and adding support for them would be a good improvement for large data sets.

References:

Implement Docker support

It would be good to implement support for Docker, so that the microservice can be more easily deployed in a variety of infrastructures/configurations. The Dockerfile should build the source tree using cargo, and use the server binary as the default entry point.

Use proper grpc error codes instead of hardcoded enum values

Currently there doesn't appear to be a clean way t return a gRPC error. The public GrpcStatus enum maps the correct error code values for gRPC, but the module itself is private:

Discussions on proper gRPC error handling:

It would much better to replace code like this:

return grpc::SingleResponse::err(grpc::Error::GrpcMessage(grpc::GrpcMessageError {
    grpc_status: 15,
    grpc_message: "Failed to copy object data".to_string()
}));

With correct enum entries like this:

return grpc::SingleResponse::err(grpc::Error::GrpcMessage(grpc::GrpcMessageError {
    grpc_status: grpc::grpc::GrpcStatus::DataLoss as i32,
    grpc_message: "Failed to copy object data".to_string()
}));

Currently trying to use GrpcStatus results in visibility errors:

error[E0603]: module `grpc` is private
   --> src/bin/server.rs:187:42
    |
187 |                             grpc_status: grpc::grpc::GrpcStatus::DataLoss as i32,
    |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

error: Could not compile `cloudstore`.

Ensure that very large files and upload times are robustly handled

There are two areas that should be tested:

  1. Very large files (multiple Gb)
  2. Long upload times (> 60 min - in the case of slow connection speed)

For #1, likely point of failure will be the single bytes array definition in protobuf, as gRPC doesn't automatically chunk up that array into segments that fit within the max message transfer size. The usual approach here is to explicitly chunk up the data and send multiple messages.

For #2, likely point of failure will be login credentials expiring. This may not be an issue, but validating this is warranted:
https://medium.com/@otusweb/how-to-tame-the-aws-framework-to-upload-a-large-file-to-s3-19430d245510

Remove hardcoded entrypoints and settings

There are a number of hardcoded entrypoints and settings that should be removed in favor of config and environment driven settings.

let endpoint = "http://192.168.1.69:9000".to_string();
let bucket_name = "p4content".to_string();
let credentials = rusoto_credential::StaticProvider::new_minimal(
            "AJ20P3XYDOURW7WZSHJ1".to_string(),
            "EVT9XzEw/77PevdntA88wjcEBF2cANl/Duc09mkl".to_string());
server.http.set_port(8080);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.