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

in HiveDevs9 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.

<p dir="auto">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. <p dir="auto">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. <h3>Funding <ul> <li>Server cost - 1 main server - 1 backup server <li>Partial development/maintenance cost <p dir="auto">This is not only for the server cost and includes development as well. <p dir="auto">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. <h3>What I promise <ul> <li>To keep the public database running (<code>hafsql.mahdiyari.info) + backup server[s] <li>Keep HafSQL working with newer versions of HAF <li>Add new/requested features by the apps or developers <li>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. <p dir="auto">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. <hr /> <h3>Development <p dir="auto">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.<br /> 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. <p dir="auto">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. <hr /> <p dir="auto">The details for the public database are in this post: <a href="/hive-139531/@mahdiyari/public-hafsql-database-on-haf">Public HafSQL database on HAF <p dir="auto">GitLab links:<br /><br /><span> <a href="https://gitlab.com/mahdiyari/hafsql" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">https://gitlab.com/mahdiyari/hafsql<span> <a href="https://gitlab.com/mahdiyari/hafsql-api" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">https://gitlab.com/mahdiyari/hafsql-api <p dir="auto">I appreciate your support. Feedback is most welcome. Feel free to comment your questions or concerns about the proposal or the project. <p dir="auto">Proposal links:<br /> Proposal number 301<br /> <a href="https://peakd.com/me/proposals/301" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Peakd<br /> <a href="https://ecency.com/proposals/301" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">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?

 6 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?

 5 months ago  

It should be around 500gb with lz4 compression.

 5 months ago  

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