Standard Grant: SiaQL

Introduction

Project Name: SiaQL

Name of the organization or individual submitting the proposal: Mert Köklü

Describe your project.

The current Sia ecosystem relies on separate REST APIs for hostd, renterd, and walletd, which can be cumbersome for developers to work with, especially for complex queries or retrieving related data. This limitation can slow down development and make it more challenging to build applications on top of the Sia network.

SiaQL aims to solve this by creating a GraphQL layer on top of the existing REST APIs. SiaQL is a CLI application that starts a local GraphQL server, providing a unified and flexible interface to interact with Sia’s core components: renterd, hostd, and walletd. This solution will allow developers to query precisely the data they need, reduce over-fetching, and enable more efficient integrations with the Sia network.

Who benefits from your project?

  1. Developers building on the Sia network: They will have a more powerful and flexible tool for interacting with Sia’s core components.

  2. Sia ecosystem projects: With easier integration, I expect to see more applications built on Sia.

  3. End-users of Sia: As the ecosystem grows and becomes more developer-friendly, users will benefit from a wider range of applications and services.

How does the project serve the Foundation’s mission of user-owned data?

This project supports the Sia Foundation’s mission of user-owned data by simplifying and enhancing interactions with Sia’s core components. By providing a local GraphQL interface with only in user local workspace, the project maintain decentralization and user control while making it easier for developers to build applications that leverage Sia. This approach encourages the growth of an ecosystem where users truly own their data.

Grant Specifics

Architecture

SiaQL will follow a layered architecture:

  1. CLI Layer: Handles user interactions and launches the GraphQL server.
  2. GraphQL Server Layer: Processes GraphQL queries and mutations.
  3. Resolver Layer: Translates GraphQL operations to REST API calls.
  4. API Integration Layer: Communicates with hostd, renterd, and walletd APIs.

Project Deliverables

  • GraphQL schema for hostd, renterd, and walletd APIs
  • CLI application with integrated GraphQL server
  • GraphQL resolvers for hostd API endpoints
  • GraphQL resolvers for renterd API endpoints
  • GraphQL resolvers for walletd API endpoints
  • Built-in GraphQL editor in the CLI application
  • Graphql API documentation and usage guides

Milestones

Milestone 1

  • Estimated duration: ~1.5 months
  • FTE: 1
  • Budget: $9,000 USD
  • Justification of Budget: 30 workdays (without holidays and weekends) x 6 hours x $50 = $9,000
  • Deliverables:
    • Complete GraphQL schema design for hostd, renterd, and walletd
    • Implement basic CLI structure and GraphQL server setup
    • Complete hostd API integration
    • Complete renterd API integration
    • Develop initial test suite covering implemented functionality

Milestone 2

  • Estimated duration: ~1.5 months
  • FTE: 1
  • Budget: $9,000 USD
  • Justification of Budget: 30 workdays (without holidays and weekends) x 6 hours x $50 = $9,000
  • Deliverables:
    • Complete walletd API integration
    • Implement GraphQL editor integration in CLI
    • Optimize performance of GraphQL layer
    • Complete comprehensive testing and bug fixes
    • Finalize documentation and usage guides
    • Official release of the Sia GraphQL API CLI tool in Github

Total requested amount: 18,000$

Future Plans

This is the first part of a larger project I plan to develop. The ultimate goal is to integrate GraphQL and Grafana, allowing users to view and visualize their own metrics and data as they wish. In future phases, I plan to add a natural language processing tool to this integration. This tool will take queries from users in natural language, convert them to GraphQL queries, and connect the results to Grafana. Ultimately, this will enable even beginner users to view and visualize their own data with a single sentence.

This proposal is the first part of my project. I wanted to divide it into smaller pieces so that the scope doesn’t appear too broad.

Potential risks that will affect the outcome of the project:

  • Significant changes to the hostd, renterd, or walletd APIs during development could require substantial rework.
  • Ensuring that the GraphQL layer doesn’t introduce significant performance overhead may require additional optimization work.

Development Information

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

Yes, all code developed for this project will be open-source and available for community review and contribution.

Leave a link where code will be accessible for review.

The project repository will be hosted on GitHub at: GitHub - justmert/SiaQL

Do you agree to submit monthly progress reports?

Yes, I agree to submit detailed monthly progress reports.

Contact info

Contact Name: Mert Köklü

I worked as Intelligent Video Analytics Team Leader in a NVIDIA distributer company that develops video analytics solutions for 2 years. After diving into Web3 ecosystem, I have become a grantee for well-known protocols such as Sia, Aave, Compound, Filecoin, Flow, Lens Protocol, Web3 Foundation, and Solana demonstrating my extensive experience and expertise across multiple blockchain ecosystems.

I am also a grantee of Sia Foundation with project Sia Telegram Alert Bot.

Email: [email protected]

Any other preferred contact methods:

An ability to query subsets of data would definitely make sia a more attractive platform to integrate with. And once this is in place, it would be even better if it supported inserts & updates as well.

May be a bit much to ask when considering that data is being stored on different machines, but the possibility of implementing this in the future is worth considering now in the early stages of design.

I’d certainly be interested in converting the centralized aspects of our platforms to sia if such capabilities were in place. :+1:

1 Like

Thanks for your proposal to The Sia Foundation Grants Program.

After review, the committee has decided to approve your proposal. They’re excited to see what you can accomplish with this grant. Congratulations! They do want to make sure that you’re building this as a layer on top of our apps, and not integrating directly into the codebase.

We’ll reach out to your provided email address for onboarding. This shouldn’t take long unless your info has changed from last time, but you may still need to adjust your timelines.

1 Like

Thanks Steve! Yes, I will be building layer on top of Sia apps, not integrating directly into the codebase.

Waiting for the e-mail. Thank you again.