
This proposal is asking for funding to help maintain the access to public HAF database and to partially fund the maintenance of HafSQL.
The public HAF database currently hosts:
- HAF
- HafSQL
- hivemind
- HAF Block Explorer
- Reputation tracker
- Balance tracker
There are 2 servers dedicated to the public database. A backup server is there to provide more reliable service and also have uninterrupted updates.
You can access the public HAF database which is a PostgreSQL database, using the following information:
host: hafsql-sql.mahdiyari.info
port: 5432
database: haf_block_log
user: hafsql_public
password: hafsql_public
In case you are reading this in the future and the above doesn't work, checkout the documentations hosted at https://mahdiyari.gitlab.io/hafsql/.
Hopefully I will be able to keep HafSQL working with the new versions of HAF and improve or add new features going forward.
HafSQL makes it easier to run SQL queries on the data already present in HAF and it also provides some new set of APIs. You can explore the available APIs at:
- https://hafsql-api.mahdiyari.info/
- https://rpc.mahdiyari.info/hafsql
- https://api.syncad.com/hafsql (or here)
Feel free to ask if you need a certain API and it is not currently available.
Proposal
Asking for $36/day for 365 days
@askai give me a recap of this proposal and highlight the benefits for the Hive ecosystem
I didn't even know there was a public HAF!
Do you have any stats on availability and throughput capacity? Is it suitable for use by a Hive dApp? Thanks
https://hivedex.io is powered by the same instance. So yes it is suitable for use by the apps. The availability is high but it will be improved over time with smart switches to the backup server whenever the main server goes down. And the capacity shouldn't become a concern ever.
That's fantastic, thanks. I have been thinking about running a HAF instance, but figured the cost would be high. Can you share the specs of the server here? Just out of curiosity.
128GB RAM
7TB NVMe
The main thing you need is the fast NVMe storage. Right now with ZFS + LZ4 compression HAF + apps take 3TB. You could probably make it work with 32GB of RAM as it is mainly used as cache for ZFS and PostgreSQL.
OK, understood - yes. I'll maybe write some test code soon and see what I can do with your server. thanks
So I was just reading the info on your HAFSQL page:
It seems like the current API calls are duplicates of what is available on existing RPC server nodes - so not so useful. Isn't the point of the HAF server really to support custom SQL calls? That's what I need to use it for. Are you saying that I should request that you add an API endpoint for custom calls once I settle on a query I want to use in production?
Thanks
I should remove that. I don't think like that anymore.
OK - My Hive site is intended to be as supportive of privacy as possible - so ideally I'd prefer any HAFSQL data retreival to be initiated from the browser, rather than a server - however, I don't think it's possible to directly query your postgres database from a browser - is that correct?
Are you open to adding REST API calls for queries that my site depends on? For example, a 'related posts' query?
Hi there!
This is probably an odd question, but: how many dapps are using this service?
You can't get an exact answer to this question because it is impossible to track with the current setup. But from interactions I had with people, I can tell peakd is one of the apps that is using this mainly for polls and snaps. Recently themarkymark launched Hive Analytics which is also using this database.
I could gather the statistics of the server like how many queries are run per day and share that.
Please don't, it was just to have an idea of the impact that this has and compare it to HiveSQL.
Would it be possible to add a call for users by location?
Yes that is possible. The data is there. I could make it an API call. You could run the following query to find users with Germany location:
SELECT name FROM hafsql.accounts WHERE json_metadata->'profile' @> '{"location": "Germany"}'::jsonb
You could even run your own website and provide this data. Just like how Hive Analytics takes data from the database and shows it on the website. This public database makes it easy for anyone to access and serve the data that otherwise would be hard to get.
That would help us with a small project with have in mind. We are already working on others that take await most of our time, but will definitely use this.
If you can make it a call, even better.
Voted for you. Wish you all the best. More power to HafSQL & all other nodes that you run.
with hReplier
Voted with my tiny HP :)
Voted, Thanks for putting all this stuff together! You defiantly should get some help with funding to keep all the work you have put in up and running.
Excellent proposal.
Congratulations @mahdiyari! Your post has been a top performer on the Hive blockchain and you have been rewarded with this rare badge
You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP
Hi dear, les choses avancent dans le bon sens. Merci pour ton implication.