3 ms·
I might be a bit dense, but I don't see what's p2p about Flatend. You have a service that connects to an API gateway by hardcoding its address, then the client
by rakoo 6y ago
I might be a bit dense, but I don't see what's p2p about Flatend. You have a service that connects to an API gateway by hardcoding its address, then the client queries the gateway directly, and the service replies. Where is Kademlia used here ?
Not trying to be negative, I'm just trying to understand
- lithdew 6y agoNo worries: Flatend uses Kademlia for helping developers bootstrap the network, and to have nodes discover services from one another. To clarify, the API gateway I provided is just* another node/peer in the network which advertises a few services that deal with exposing other nodes' services via HTTP/WebSocket/gRPC (rather than an ordinary API gateway server). This means that you can run several API gateway nodes on different machines, and kill several of them, and they would still discover and process one another's request/data without any extra work, as they are independent nodes that are not directly tied by their addresses to other nodes/microservices. So, I guess the easiest way to point out the p2p aspect here is on how Flatend deals with the separation of concerns across "services"/nodes.
- imglorp 6y agoWas any thought given to libp2p? The IPFS project is also using Kademlia and they're on top of that.
- rakoo 6y agoI think there should be a way to show the p2p aspect in the example; maybe have the go service and the node service talk to each other, without hardcoding anything ? Just to show how it leverages the whole p2p thing