A customizable block streaming and parsing microservice for custom_json ops on Hive.
My node
https://plug-play-dev.imwatsi.com/
It's currently syncing from block 50924300
and not from the first block, to aid the iterative stage of development it's in. The link above should return the sync status info.
The code and running a node
Find the source code at: https://gitlab.com/imwatsi/hive-plug-play
The README has instructions on setup.
Warning: this project is still under heavy development. It is not yet suitable for building production apps with.
What's next?
Right now, there's just a basic endpoint to get custom_json
ops by block number; but that's just the beginning.
get_ops_by_block
{
"jsonrpc": "2.0",
"method": "plug_play_api.get_ops_by_block",
"params": {"block_num": 50926159},
"id": 1
}
@therealwolf briefly touched on some useful features for this software, to make queries based on key-value pairs inside the actual JSON payloads.
I have been running a number of test queries in PostgreSQL and successfully retrieved info from nested json
values, so that's what I want to work on next.
Different custom_json
ops have different formats, with some having the data inside a list (e.g. follow
and community
ops) and some in a dictionary, like Splinterlands. So I have to create different code modules to handle each type, most likely categorized by id
. These will be the "plugs" so to speak.
So there will be a plug for community
ops and a plug for sm_find_match
ops, for example. New apps can create a format for their custom_json
ops, for which a plug will be developed to add support for that to Hive Plug & Play.
Let me know the features you'd like to have access to in the comments, so I can work on them. I'm interested in knowing the kind of queries that will be useful to app developers.
I'm tagging @simplegame @marki99 and @emrebeyler too, since they also responded to my earlier post announcing this initiative.