Introducing a low-level interface to the Sia network

Back when David and I were sketching out the initial design of Sia, we realized two things. The first was that, if Sia succeeded in a big way, companies and app developers would want to interface with it at a very low level. They would want explicit control over which hosts they formed contracts with, and how many siacoins they allocated towards each contract; over how each file was encrypted, and how redundantly they were stored; and they would want to monitor every single interaction with their hosts in order to ensure a high quality of service for their customers.

The second thing we realized was that no one would care about any of that for a long time.

Specifically, they wouldn’t care about it until they had customers to answer to. And no one would have customers to answer to until they had actually built an app on Sia. And no one would build apps on Sia until it was a network worth building on. And it wouldn’t be worth building on until it had an active ecosystem of renters and hosts.

So for the past four years, our priority has been to grow the network and create an active, friendly community of renters and hosts. We’ve made great progress in that regard, and today, Sia has matured to the point that developers are eager to engage with the network at a deeper level.

To that effect, I am introducing an alternative interface to Sia. It’s a set of low-level tools and libraries that I collectively call us . You can get it here.

What us offers is a classic power/responsibility trade-off: it enables you to do things that are currently difficult or impossible to do with siad , but in return you’ll need to make decisions that siad typically makes on your behalf. For example, with us , you can easily write a script (in any language) that monitors the latency of your hosts and blacklists those with a latency above 500ms. However, you’ll also be responsible for choosing good hosts in the first place, and for renewing your contracts before they expire. Another cool feature of us is that, once you have contracts, you can use them without talking to a siad instance. That means you can build a smartphone app that uploads and downloads directly from Sia hosts! However, you’ll be responsible for ensuring that your files are uploaded with sufficient redundancy, and for migrating them to new hosts if the old hosts go offline.

Given the extra duties that us imposes, I don’t recommend using it if your needs are already being met by siad . But if you have an itch that siad can’t scratch, us may fit the bill. You can use one of the existing tools that us provides, or (even better) build your own tools and apps by importing us packages into a Go project.

us is my personal project, where I can be a bit of a control-freak and not have to worry so much about stability or long-term support. My vision for us is a place where I can experiment with new ideas and offer bleeding-edge software for people who are willing to use sharp tools. The most successful of these ideas will likely be incorporated back into siad or other official Nebulous software.