chacal / swim

Simple gossip based masterless membership algorithm/library for Scala
1 stars 0 forks source link

Question #1

Open sachabarber opened 5 years ago

sachabarber commented 5 years ago

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

I have not seen this particular bit of syntax before (httpPipeline ~> unmarshal[List[Member]]).apply so that threw me a bit

chacal commented 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!

sachabarber commented 5 years ago

Thanks, sounds like a plan