[Proposal] Public HAF/HafSQL database maintenance & development of HafSQL

in HiveDevs8 months ago (edited)

hafsql.png

I have been providing public access to a HAF + HafSQL database for the past 3 months. Alongside with a backup server to keep the downtimes minimal.

I do provide a few free services including public API nodes which require some beefy machines. I do that because of my witness rewards and it is all voluntary.

This public database is adding up a bit. It also doesn't help that I launched a new public RPC node in USA which is expensive compared to EU. I was considering removing the backup server which will add at least 48 hours of downtime on every upgrade or a possible crash/issue. I'll probably remove the USA RPC node as well as I don't think it is really needed right now considering the number of public nodes we have. But I thought it is worth giving DHF a shot as the provided service is beneficial to the apps and developers.

Funding

  • Server cost - 1 main server - 1 backup server
  • Partial development/maintenance cost

This is not only for the server cost and includes development as well.

HafSQL was originally paid by DHF but I have been working on it since then. I added some new features and updated the code to work with the newer versions of the HAF (since the original code was for v1.27.4.0). Currently I know Inleo team is using their own local HafSQL for some part of their website and I know peakd is developing their polling system with HafSQL.

What I promise

  • To keep the public database running (hafsql.mahdiyari.info) + backup server[s]
  • Keep HafSQL working with newer versions of HAF
  • Add new/requested features by the apps or developers
  • If the project is ended by any event such as lack of work, I will return the unused funds minus the server costs for the year to the DHF treasury.

I'll do my best to keep the database open to the public as I have been doing for a while even if there was no funding.


Development

I did develop an experimental version of reputations and due to lack of feedback is still considered under development. The other features I'm interested in are the data included in Hivemind as I have been asked by other devs. I was thinking about implementing features present in Hivemind in a modular way. Reputations was the first but since there were talks about removing the reputations entirely, I did implement a modified version as an alternative for testing which is way faster to sync. The added features will be optional just like the already present features. You can choose what you want in your database when running the HafSQL app.
Currently syncing HafSQL takes less than 24 hours. And syncing hivemind takes at least a week. For a full node you need hivemind as all social side is handled by hivemind.

My goal would be to remove Hivemind and have a modular HafSQL which can replace Hivemind seamlessly. Which would include development of the APIs supported by hivemind. Also I don't intend to drag the development an entire year and will try to wrap it up faster if possible. And of course this goal can change depending on the request of the apps and developers.


The details for the public database are in this post: Public HafSQL database on HAF

GitLab links:
https://gitlab.com/mahdiyari/hafsql
https://gitlab.com/mahdiyari/hafsql-api

I appreciate your support. Feedback is most welcome. Feel free to comment your questions or concerns about the proposal or the project.

Proposal links:
Proposal number 301
Peakd
Ecency

Sort:  

I support this proposal, you are not asking for much compared to the value that you are giving.

Keep up the good work mate.

Peakd just sent me a pop up alerting me of this proposal. So smart.

Your transparency is commendable and I think keeping the database open to the public would be a nice one.

Public HAF/HafSQL database maintenance & development of HafSQL #301 supported

Proposal supported

I supported it :) Thanks so much for your work 🙌

This post has been manually curated by the VYB curation project

Was scared about the notice, but seems cool. Thank you

Any chance we can get an AAAA (IPv6 record) on hafsql.mahdiyari.info?

 5 months ago  

Can you check and see if it works now?

Well, Wednesday has passed and I forgot to let you know but it's working great! Thanks again!

I can telnet to the Postgres port so I'd guess it's working. Will verify Wednesday. Thanks!

How much additional space does the HAFSQL take to run alongside a Hive full node running hivemind and HAF?

 4 months ago  

It should be around 500gb with lz4 compression.

 4 months ago  

I did actually test this now and it is 275618944 bytes or 262 GB (with lz4).