sholsapp / gallocy

A distributed shared memory infrastructure.
27 stars 9 forks source link

Implemented the UDPClient and updated Transport code to use the peer abstraction #36

Open rverdon opened 8 years ago

rverdon commented 8 years ago

The UDPClient still needs some tests. I will get to those soon. Take a look at the code and let me know if you see anything wrong.

sholsapp commented 8 years ago

Hey @rverdon I left a few last comments. I think you need to rebase and add tests, then this is good. This does -3% to coverage.

rverdon commented 8 years ago

UDPClient multirequest is owning coverage. I am bad at thinking of a good test for it (without a legitimate server on the other end).

sholsapp commented 8 years ago

@rverdon I know it's owning coverage. :smile:

I made a comment a week or so ago in consensus/server.cpp (or the header file, can't remember) that says:

188 // TODO(rverdon): This needs an abstraction so that we can swap out the                                                                                                                                                                   
189 // underlying transport mechanism for the server *at the same time* as the                                                                                                                                                                
190 // client. What about libevent, here?   

I think that we basically need whatever client we come up with to have a server component as well. I think that we need to put a bit more thought into this... basically so we can do client/server abstraction at the same time. I do think that if we get started on a design like I suggested though that it would apply to the server side as well.

So, as the client is to:

HTTPClient<
  RobustClient<RetryClient, ReturnOnMajority, ...>,
  RDPTransportClient>
    client;

The server would be:

HTTPServer<
  RDPTransportClient>
    client;
sholsapp commented 8 years ago

This weekend I can try to sketch up a more official design so that we can write pluggable client/server things so we can try UDP, TCP, RDP, etc., with little effort.... that's unless youuuu want to do it. :pray:

rverdon commented 8 years ago

I do remember that comment. I was hoping I will have some time this weekend to look at libevent.

rverdon commented 8 years ago

Also, travis lies. :)

sholsapp commented 8 years ago

The takeaway isn't libevent...ignore that for now. It's that you need to develop the server at the same time as the client. On Mar 9, 2016 9:29 PM, "rverdon" notifications@github.com wrote:

I do remember that comment. I was hoping I will have some time this weekend to look at libevent.

— Reply to this email directly or view it on GitHub https://github.com/sholsapp/gallocy/pull/36#issuecomment-194678903.

sholsapp commented 8 years ago

Sorry, I didn't get to this this weekend. I'll try and get to the client/server redesign once I finish the consensus module. If you want to take a stab at design, go for it. I think that a good C++ design book is "Modern C++ Design" by Andrei Alexandrescu.

-Steve

On Wed, Mar 9, 2016 at 9:30 PM, Stephen Holsapple sholsapp@gmail.com wrote:

The takeaway isn't libevent...ignore that for now. It's that you need to develop the server at the same time as the client. On Mar 9, 2016 9:29 PM, "rverdon" notifications@github.com wrote:

I do remember that comment. I was hoping I will have some time this weekend to look at libevent.

— Reply to this email directly or view it on GitHub https://github.com/sholsapp/gallocy/pull/36#issuecomment-194678903.

-Steve

rverdon commented 8 years ago

Been super busy. I should be able to get back to this sometime this weekend!