Open sachabarber opened 5 years ago
Hi!
Sorry for my delayed answer! Was on a holiday for a few days.. :)
I believe you are correct with your analysis. It's been quite a while since I've been fiddling around with this code, but it seems that the idea is to POST all known members of the cluster to a host we want to join with and in response we get list of all members the other host itself knows.
Hope this helps!
Thanks, sounds like a plan
Hey there, first of all great work. I have become quite interested in this protocol. So much so I have decided to port this work of yours to C# using Akka.net and other stuff.
Sadly there is no direct IO.Http available in Akka.Net as .NET has lots of other libraries to fill this void, they never ported Akka.Http to Akka.NET
My porting is going really well, until I hit this class
HttpComms
In particular this line
case SendMembers(to, members) => (httpPipeline ~> unmarshal[List[Member]]).apply(sendMembersRequest(to, members)).map(NewMembers) pipeTo node
So could I confirm I have my understanding correct on this one
private def sendMembersRequest(to: InetSocketAddress, members: List[Member]) = Post(s"http://${to.getHostName}:${to.getPort}/members", members)
which does the actual HTTP POST to the correct nodeFuture[List[Member]]
into aNewMembers
object which is piped back to caller.I have not seen this particular bit of syntax before
(httpPipeline ~> unmarshal[List[Member]]).apply
so that threw me a bit