Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tcp #67

Merged
merged 112 commits into from
Jul 10, 2017
Merged

Tcp #67

merged 112 commits into from
Jul 10, 2017

Conversation

TylerADavis
Copy link
Collaborator

@TylerADavis TylerADavis commented Jun 23, 2017

Working towards accomplishing #9 .

Changes

  • Removal of all RDMA code from FullBladeObjectstore
  • Removal of old BladeClient and RDMAClient
  • Creation of new RDMAClient which contains all RDMA code from old BladeClient, RDMAClient, and FullBladeObjectStore
  • Creation of new TCPClient class that interfaces with a remote store over TCP
  • Creation of new TCPServer class that communicates with a client over TCP
  • New TCPBladeMessage schema for flatbuffer messages
  • Creation of new BladeClient which serves as a template for the new RDMAClient and TCPClient
  • FullBladeObjectStore now holds a pointer to a BladeClient, which it uses to make all function calls
  • Removal of tests that accessed functions no longer present in api (low level RDMA)
  • Modification of all tests + benchmarks to use TCP

Issues

  • RESOLVED Error message whenever TCPClient exits, causes all tests to say they failed even though they pass
  • RESOLVED TCPServer can connect to only one client at a time
  • RDMAClient missing documentation on some methods
  • Segfault somewhere in RDMA code. RDMA code likely buggy at the moment due to the amount of code movement and combination that occurred.
  • Unsure if current method for accepting connections is the best (in TCPServer)
  • RDMA code likely has unused functions

To Later Address

  • Async operations (including futures)
  • RESOLVED Related to above, how to relay error messages from TCP server to client, and to user.

@jcarreira
Copy link
Owner

Yes, you can start with async. I can take a look into this. Thanks.

@TylerADavis
Copy link
Collaborator Author

@jcarreira for the mem_exhaustion test, was the issue that the exception was not being thrown, or that an unexpected exception was being thrown? The client side exception should be generated in RDMAClient::allocate() when the server indicates that its memory is exhausted.

@jcarreira
Copy link
Owner

Need to fix #72 before merging this PR.

We need make check to be reasonably quick and right now the memory exhaustion test takes too long.

@TylerADavis
Copy link
Collaborator Author

Alright, I'll trying get #72 resolved by the end of today. Should I do it within this PR, or should I make a separate pull request to merge it into this branch?

*/
bool Future::try_wait() {
if (!result_available) {
bool sem_success = sem->trywait();
Copy link
Owner

Choose a reason for hiding this comment

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

Why not return result_available = sem->trywait()?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Reading the man page for trywait on a posix semaphore, it sounds as if it only returns true if the value of the semaphore is currently positive. As such, I thought that this was better behavior in case of repeated calls to the try_wait() method, even after it has succeeded, because it will return true if trywait has ever returned true.

Copy link
Owner

Choose a reason for hiding this comment

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

The comment was related to the code inside the first if block.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, I'll go ahead and do that

@jcarreira
Copy link
Owner

You can put it into this PR.

@TylerADavis
Copy link
Collaborator Author

@jcarreira the latest commits resolve #72 .

}
case cirrus::ErrorCodes::kException: {
throw cirrus::Exception("Server threw generic exception.");
break;
Copy link
Owner

Choose a reason for hiding this comment

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

This break seems unnecessary because exception is thrown in the previous line.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm assuming this applies to all of the exceptions in this switch case, so I'll remove all of those break statements

std::cout << "Pool size in invalid format." << std::endl;
}
} else {
std::cout << "Pass desired poolsize in bytes" << std::endl;
Copy link
Owner

Choose a reason for hiding this comment

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

Should print something like: "Error: ./bladeallocmain [pool_size]"

@jcarreira
Copy link
Owner

The PR is close to ready. Let me know once those 2 last comments are addressed and I then I will merge this.

@TylerADavis
Copy link
Collaborator Author

@jcarreira The latest commit should have addressed your comments. I also changed the server main files to return an error status if arguments are provided incorrectly

@jcarreira jcarreira merged commit 0a6081f into master Jul 10, 2017
@jcarreira jcarreira deleted the tcp branch July 27, 2017 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants