Skip to content
This repository has been archived by the owner on Aug 4, 2024. It is now read-only.

Refactor server #50

Merged
merged 5 commits into from
Oct 12, 2023
Merged

Refactor server #50

merged 5 commits into from
Oct 12, 2023

Conversation

lewiszlw
Copy link
Member

What problem does this PR solve?

Refactor server

Issue link: #47

What is changed and how it works?

Code changes

  • Has Rust code change
  • Has CI related scripts change

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Note for reviewer

}
/// TODO need refactor
// #[inline]
// async fn join(&self, vec_cmd: Vec<CommandData>) -> Result<Vec<Option<Vec<u8>>>> {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mark

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not implement this function

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return type of this function is not reasonable. For batch operations, we should tell client which part succeed and which part failed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return type of this function is not reasonable. For batch operations, we should tell client which part succeed and which part failed.

refer to the use of futures::try_join method, either all succeed at once, or all fail.

}
/// TODO need refactor
// #[inline]
// async fn join(&self, vec_cmd: Vec<CommandData>) -> Result<Vec<Option<Vec<u8>>>> {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not implement this function

Copy link
Member

@KKould KKould left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Server refactoring is perfect, But the join() method is somewhat controversial, and I hope to add a simple example in Examples.

}
/// TODO need refactor
// #[inline]
// async fn join(&self, vec_cmd: Vec<CommandData>) -> Result<Vec<Option<Vec<u8>>>> {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return type of this function is not reasonable. For batch operations, we should tell client which part succeed and which part failed.

refer to the use of futures::try_join method, either all succeed at once, or all fail.


package kipdb;

service KipdbRpc {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, learned

@KKould KKould added the enhancement New feature or request label Oct 12, 2023
@KKould KKould linked an issue Oct 12, 2023 that may be closed by this pull request
@KKould
Copy link
Member

KKould commented Oct 12, 2023

Can you add some RPC related descriptions to README.md please?

@KKould
Copy link
Member

KKould commented Oct 12, 2023

I think the join() can be removed, it is unreasonable to use when there is no way to rollback

@KKould
Copy link
Member

KKould commented Oct 12, 2023

Can you add some RPC related descriptions to README.md please?

like users are required to install protoc when compiling

src/proto/kipdb.proto Outdated Show resolved Hide resolved
@lewiszlw
Copy link
Member Author

Join remove will be put in follow up pr.

@KKould KKould merged commit 5d90041 into KipData:master Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactoring Server
3 participants