Inside Satellite: Architecture of a Registry
Previously we chatted about the basic principles and motivation behind the Melon Satellite subproject, and you were promised a more detailed description. Well, now we’re back to do just that!
By the end of this post you will have an understanding of Satellite’s general architecture, its components, and how they interact together. A quick warning that this piece is more technical than the last, but don’t let that deter you from giving it a read. :)
(Re)introduction to Satellite
Our previous article gives an overview of what Satellite is meant to accomplish. Broadly, the goal is the provide a permissionless registry of Melon modules.
The project will ultimately be a user interface with the ability to register and browse third-party modules, along with auxiliary functions to interact with entries in the registry.
Concretely, the community effect of Satellite would be to ease interactions between module creators and module users (see diagram).
Global architecture
The subproject will have to consider and manage interactions between:
1. The client
2. The server
3. The blockchain
This sort of structure, especially the interplay of client and blockchain, is colloquially known as decentralized application (or DApp) architecture.
Though our application includes a server component, the core functions of the registry are completely independent of it, in the true spirit of decentralization. This means that our server could become the victim of a DDoS attack, but the Satellite registry will continue to work even while the server is offline!
Specifically, the server is more of a convenience component of the application; operations that need not interact with the blockchain are relegated to the server. This includes activities such as indexing the entries and making them searchable.
The diagram immediately below describes one aspect of information flow within the application.
Component — Blockchain
The on-chain piece of Satellite is manifested as a smart-contract which provides functions that allow module entries to be registered, removed, edited and read, much like the CRUD operations of a database.
The contract’s registry maps a module entry’s name to its associated data, such as a URL to access the module’s code (possibly hosted on IPFS).
Whether all data related to a module should be hosted on the blockchain, or only essential data, is something we are actively discussing. On-chain storage can become expensive and we want to keep the registry costless at scale, if at all possible.
Component — Server
As mentioned above, the server part of the application aims to collect data from the Satellite contract, and to thenredistribute this to clients in a more convenient form via an API. This means that the server needs to store the data it retrieves in a database, to avoid hitting the blockchain every time the client requests something.
The operations that take place on the server collate the Satellite registry data, providing a database that is more friendly for query and search tasks.
Moreover, if there is data that is not essential to the functioning of the registry that takes up a large amount of blockchain storage (e.g. long descriptions, module screenshots, etc.), we might store that on the server rather than within the Satellite contract itself, and the API would provide an access point for this data.
Component — Client
The client description for Satellite is less rigid than the server and contract, since there is the possibility to have multiple clients.
Much as we can interact with the NPM registry through several official channels (npm CLI, and npmjs.com), or multiple unofficial channels (yarn CLI, and yarnpkg.com), we can leave open the possibility for similar alternative user interfaces.
These may be more suitable for specific situations, users, or could be an embedded Satellite client within an existing application.
This being said, we are developing an official client as part of a Meteor application, meaning the end-user will visually interact with the Satellite registry through a web3-enabled browser.
Putting it all together
So here we are at the conclusion. The part of the article where you see everything in one place, and think “wow, I could have just looked at this diagram instead of reading for 7 minutes. Thanks...”
Hopefully you’re not thinking that. Hopefully you now have a better understanding of Satellite; its purpose, its components, and the way they come together to help Melon module developers and fund managers relate.
One small thing
Just as an addendum, please note that there is a prototype for a voting and reviewing mechanism within Satellite as well. It has been omitted from the present article, however, since it introduces design concepts that are not finalized, and are thus better left to another article devoted entirely to that subject.