Sia iSCSI Server Gateway (sia-iscsi)

Project Name:
Sia iSCSI Server Gateway (sia-iscsi)

Name of the organization or individual submitting the proposal:
Emmanuel Damilare Adediji

Describe your project:
Sia-iSCSI gives access to the Sia storage network through a normal iSCSI interface, hence, allowing any iSCSI-compatible client to access the hosted files and directories.

The usage of this could be both local access or network-wide deployment.

The project will be implemented in a cross-platform manner and will be available on major platforms - Linux is guaranteed first, then clients on MAC-OS and then Windows should work.

To avoid overhead, the final deliverable will be shipped with no additional dependency requirements save renterd and common system libraries.

How does the projected outcome serve the Foundation’s mission of user-owned data?
The access through iSCSI offers several key advantages:

  • iSCSI clients are well-established outlets and widely deployed on diverse platforms.
  • A true plug-and-play with transparent access to Sia-hosted content from iSCSI applications.
  • High data uniformity and discoverability with open metadata standards and file formats (Dublin Core and H5)
  • The proposed gateway can make Sia storage network and hence, its hosted contents available to an entire network, hence more adoption.
  • Data security is guaranteed through simple encryption workflows.
  • Monitoring through simple file logging interface.
  • Seamless and easy enterprise integration of the gateway into existing IT strategies.

Grant Specifics
Amount of money requested and justification with a reasonable breakdown of expenses:

Amount of money requested and justification with a reasonable breakdown of expenses:

Budget Breakdown:

Development (3 Months): $8064 (48 hrs/week, $14/hr)

Justification: For hands-on project implementation and development.

Hardware: $1,400
Justifications:

1 MacBook:
($1300)
Justification: This budget allows for a used MacBook with sufficient performance for testing. Since I am currently have both WIndows and Linux computers now, getting the Macbook will ensure effective cross-platform testing. Exploring used options helps maximize budget allocation for essential project components.

Workspace Rentage: $500
Justification: Renting a dedicated workspace with constant electricity is necessary for the fast and effective completion of the project.

Total Project Budget: $9,964

Throughout the developmental stage, the test-net will be used, hence, SiaCoin isn’t required for storage.

What are the goals of this small grant?

The grant’s goal is to procure enough financial resources in order to make the development of the hitherto proposed Sia iSCSI Gateway possible.

The time estimate is based on workload analysis which is from a similar context of experience building enterprise systems and also the re-use of existing Python iSCSI server libraries.

Development Timeline:

Three fundamental milestone deliverables are envisioned:

  • VERSION 1.0:

  • At the end of the 4th week, a basic version will be released which contains basic functionalities.

  • This versions will already be fast and performant, as concurrency is built in from scratch using an actor-based architecture.

  • However, other features like caching, compression, encryption and logging will not be present.

  • This version will be for testing and Proof of Concepts scenarios.

  • VERSION 2.0:

  • At the end of the 8th week, there will be very significant improvements on VERSION 1.0. Now, more optimization and performance gains will be incorporated and realized through fast Metadata Caching and File Compression implementations.

  • Deployment through a Docker image will be available.

  • Client Tests for Linux and Mac-OS would have been performed.

  • Documentation with basic usage contents will appear…

  • This version will be for general usability and Minimum Viable Product scenarios.

  • VERSION 3.0:

  • At the end of the 12th week, there will be security and monitoring integrated into VERSION 2.0. Now, fast encryption and logging will be incorporated.

  • Task call architecture will be made asynchronous - hence, further squeezing out more performance juice.

  • VERSION 3.0 Docker image will be available.

  • Client Tests for Windows would have been performed.

  • Documentation with more holistic usage contents will appear…

Features & Scope:

  • Fully open source (Apache-2.0 license) via public repository on GitHub.
  • A stand-alone, simple, containerized and performant server-gateway that is cross-platform, highly adaptable and iSCSI/renterd-compliant.
  • Fast out-of-the-box caching and compression to improve speed, access performance, reduce latency, and lower entry barrier and usage costs.
  • Fast/Efficient out-of-the-box encryption and logging to facilitate security, monitoring and integration into existing enterprise IT strategies and requirements (such as compliance)
  • Holistic Documentations and sample configurations and use-case tutorials.

Potential risks that may affect the outcome of the project:

  • Integration Challenges: Integrating Sia’s functionalities with traditional protocols like iSCSI could be complex. Compatibility issues or unexpected behavior might arise during integration and require a very thorough development and testing effort.
  • Security Vulnerabilities: Security vulnerabilities in the custom server gateway, the Sia API, or underlying libraries could expose user data or compromise the system’s integrity. It is expedient to stay updated with security patches and conduct thorough security audits.
  • Excessive metadata caching could lead to memory overruns if not managed effectively.
  • Cross platform challenges could arise. While Linux and Unix-variant iSCSI client exists and are stable, deployment on Windows could pose a serious challenge due to various incompatibilities.
  • Sia Network Disruption: While unlikely, major disruptions within the Sia network, for instance - a large-scale outage or security breach, could impact not only the server gateway’s functionality, but also the user experience and access to data.

Development Information
Will all of your project’s code be open-source?

Certainly.

Under the Apache-2.0 license, the code will be fully open source and will be made available on GitHub.

Coupled with that, all deployed libraries will also be open source.

Leave a link where the code will be accessible for review.
A GitHub repository will be created once the grant is approved.

Do you agree to submit monthly progress reports?
Of course.

Contact Info
Email: [email protected]

As a developer and long-time Linux-heavy user, I have many questions about your approach.
iSCSI or VBD devices operate at the block level, while SIA works at the file level. This is one of the main reasons why it is very easy to have NFS, FUSE and S3 support for SIA.

How will you do the “mapping” (I can’t find a better word) of a file to a block request? This is a very technical question, don’t hesitate to be technical.

Will this be coded in C, hence a Kernel Module? If you do, how will you deal with the “magic number”, do you have plans to deliver a DKMS package? Or will you be on the user space like this project: Blog/iSCSI target in user-space - Forza's ramblings

What I want to say here is that when you share something using iSCSI, you don’t share a directory /mnt/my_iscsi_share, you have to have a file created with dd such as /mnt/my_iscsi_file and the client is the one that does the format.

How are you going to deal with partial writes? SIA (renterd) doesn’t have that feature.

I also have to add that you don’t need a MacBook. There are virtual machines for that.