xenon-middleware / xenon-grpc

Xenon grpc based server
Apache License 2.0
0 stars 1 forks source link

expand nested Path argument in FileSystems requests #25

Closed jhidding closed 7 years ago

jhidding commented 7 years ago

Currently, many {...}Request messages have a Path message embedded. The Python bindings would benefit from having these path fields expanded into the filesystem and path fields.

sverhoeven commented 7 years ago

So replace

message Path {
    FileSystem filesystem = 1;
    // In Xenon it is of class Path
    string path = 2;
}

With

// In Xenon it is of class nl.esciencecenter.xenon.filesystems.Path
message Path {
  string path = 1;
}

message FilesystemPath {
  FileSystem filesystem = 1;
  Path path 2;
}

And replace all occurrences with Path in rpc methods with FilesystemPath.

sverhoeven commented 7 years ago

Currently the gprc server is using the Path(String path) constructor, which uses / as default separator.

A alternative path message type modeled after thePath(char separator, boolean isAbsolute, List<String> elements) constructor would be.

message Path {
  repeated string elements = 1;
  string separator = 2;
  bool isAbsolute = 3;
}

Then it is the responsibility of the client to deconstruct the path string into elements.

@jhidding Which Path message type is your preference?

sverhoeven commented 7 years ago

Has been implemented