Scala Share: Decentralized File Sharing

User Avatar
MasterMind 4 min read · June 8, 2021
Share this article

Introduction

The idea for the project was actually born out of necessity for us. At Scala, we work on many different projects, and sometimes we need to share files with each other quickly and easily.

Rather than using Google Drive or other complicated tools, we used a simple open-source tool that served the purpose for a long time, until we encountered some bottlenecks with our small server. We had to find a way to overcome this problem.

We defined the following requirements for the project:

  • Decentralized
  • Scalable
  • Easy to use
  • Tamper-proof

With these key elements in mind, we got to work and came up with a simple but elegant solution: Scala Share.

The technology

Scala Share consists of using IPFS as a static file storage medium, Diardi nodes (our custom third-layer notary solution for checkpointing), and a Node.js backend to act as a sort of proxy layer between IPFS, Diardi, and the client.

Under the hood

It uses the following utilities to run :

  • go-ipfs that is embedded in our custom C++ library, called libipfshttps://github.com/scala-network/libipfs
  • Scala’s Diardi notary nodes that manage the third-party Scala network data and applications
  • Node.js backend for acting as a proxy between the clear net and IPFS

Many features — for example, IPFS’s garbage collection and HTTP API for pinning and unpinning — have proven to be more useful than anticipated.

The code is released under the BSD-3 license and can be found here: https://github.com/scala-network/ScalaShare-Server

How does it work?

When a user uploads a file using Scala Share, at first it is pinned locally on Scala’s IPFS gateways for the specified amount of time. Then, the hash of the file that the user uploaded is relayed to the Diardi nodes, which also pin the file on IPFS according to the expiry requirements.

Once the expiry time has passed, the file is automatically unpinned from our gateway as well as Diardi nodes and is left to be garbage collected by IPFS.

This would mean that if you locally have an IPFS node running on your PC and you choose to pin the file that you uploaded to Scala Share, it could be accessed from our gateway as long as you’re hosting it.

Key Benefits

  • It is hosted with the help of Scala’s notary nodes, making the most of our secure and decentralized third-layer solution Diardi
  • The underlying IPFS technology ensures decentralization and security
  • It is easily scalable — if the data volume increases dramatically people can run supplementary nodes to scale horizontally
  • It is as fast as the nodes that support the software

It is important to note that this is a beta version and that bugs are to be expected. We will continually evolve this project over time, as we usually do at Scala.

What’s next?

Business Case

We want to implement a Premium feature that will be available for registered users, providing options to define a longer pin expiration time for the file as well as more storage settings.

Users will need to use Scala’s cryptocurrency (XLA) to unlock the premium features of Scala Share, making it Scala’s first real business case.

Future Development

  • Register and login
  • Set a longer expiration time for the link
  • Unlock more options using $XLA coins

Try it now!

You can access the tool at https://share.scalaproject.io

We have also uploaded a version on scalashare.crypto, that you can access using Unstoppable Domains Browser or the latest version of Brave or Opera.

Terms of Use

We strongly condemn the use of both Scala Share and IPFS to distribute copyrighted, and other material that goes against our code of conduct. We have measures in place that can block infringing materials (specifically on our nodes since once a file is on the IPFS network it’s pretty difficult to take it down).

We have also included relevant details in the application’s FAQ and Terms of Service if people need to raise a grievance about a particular file that was uploaded using our application.

Recent Posts

Past, Present, and Future of Scala

Hey guys, Hayzam here. When I first started Scala (formerly Stellite), I was just 18 years old, fresh out of […]

Read more

Scala CLI Wallet Guide

The Scala Command-Line Interface (CLI) Wallet, scala-wallet-cli, is a console program designed to manage your Scala coins. Similar to Monero, […]

Read more

CEX vs DEX in the Scala Ecosystem

Introduction The world of cryptocurrency trading offers a myriad of possibilities, and at the heart of this dynamic landscape are […]

Read more

Join the Scala community