[Previous] → Prelude
Now that we have a general understanding of decentralized collaboration problems, where do we start? In this chapter, we'll take you through a concrete example of constructing and deploying a system to solve the millionaires' problem.
<aside> 💡 If you are not familiar with what is the millionaires’ problem, please consider checking out Prelude again.
</aside>
Let us imagine what is required if we build the solution from scratch.
In the millionaire's problem, Alice holds a value a
. To deploy, Alice should have a machine (e.g. a cloud server instance) to store the value. She should also have a way (e.g. APIs) to manage the value, such as uploading and updating it.
Similarly, Bob has another machine for a value b
. However, as Alice and Bob does not trust each other for data privacy, two machines need to be managed separately. We borrow the term trusted zone from network security to refer to all the infrastructure trusted by a specific user. In this case, Alice and Bob have machines in their own separate trusted zones.
<aside> 💡 If a user trusts a cloud provider to host part of their infrastructure, that part is also considered to be inside the trusted zone.
</aside>
The cryptographic protocol requires communication between Alice and Bob. In deployment, it means we need to have a communication abstraction between machines in different trusted zones.
To make the system general so that both Alice and Bob can initiate the data collaboration, the communication need to be bi-directional. This implies that both Alice and Bob need to provide some sort of running services to handle communication requests.
What we envision above is exactly how CoLink works:
Next, we will see how to start a CoLink server on one machine and how to interact with it.
<aside> 💡 While this chapter explains how to deploy CoLink servers on different machines for real-world applications, in development protocol designers are not required to manually configure such environment. We will see how developers can easily run decentralized protocols simulations without preparing the environment in next chapter.
</aside>
Let’s start from running a CoLink server. To deploy CoLink on a machine, after logging into that machine, you can download the binary release for your system from [this GitHub page] then directly start the server. For example:
wget <https://github.com/CoLearn-Dev/colink-server-dev/releases/download/v0.3.3/colink-server-linux-x86_64.tar.gz> && tar -zxvf colink-server-linux-x86_64.tar.gz
wget <https://github.com/CoLearn-Dev/colink-server-dev/releases/download/v0.3.3/colink-server-macos-x86_64.tar.gz> && tar -zxvf colink-server-macos-x86_64.tar.gz
You will see an executable named colink-server
in your current working directory. The server expects the following list of parameters: