Scala Share: Decentralized File Sharing
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:
- Easy to use
With these key elements in mind, we got to work and came up with a simple but elegant solution: Scala Share.
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 libipfs: https://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.
- 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.
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.
- 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 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).