FactomProject / factomd

Factom Daemon
https://www.factomprotocol.org/
Other
201 stars 92 forks source link

New Control Panel API #941

Open stackdump opened 4 years ago

stackdump commented 4 years ago

The existing control pane was removed in the Wax build.

It needs to be replaced w/ a new Admin Panel API

Eventually, we will adopt a javascript component library for Inc's Explorer so we will need to develop a POC for how this front end will work.

Steps:

TODO: will add more notes about PubSub

Existing PubSub components use events are defined here https://github.com/FactomProject/factomd/blob/FD-1259_control_panel_rewrite/modules/event/event.go

FD-1259_control_panel_rewrite is the branch to use as a starting place

stackdump commented 4 years ago

@Emyrk @factom-clay adding a note here

I think our understanding of how much is usable via pub/sub vs a synchronous query is evolving

we have a very simple/primitive directory to add hooks to query different objects in the new query architecture

Query module: https://github.com/FactomProject/factomd/blob/FD-1268_election_pubsub_integration/modules/query/query.go Registered in the Elections constructor https://github.com/FactomProject/factomd/blob/FD-1268_election_pubsub_integration/elections/elections.go#L62 used by diagnostic api : https://github.com/FactomProject/factomd/blob/FD-1268_election_pubsub_integration/wsapi/wsapiV2.go#L1582 (edited)

stackdump commented 4 years ago

Some usage of Pub/Sub from leader module WIP Subscribe: https://github.com/FactomProject/factomd/blob/FD-1259_control_panel_rewrite/modules/leader/thread.go#L72-L82

Publish: https://github.com/FactomProject/factomd/blob/FD-1259_control_panel_rewrite/modules/leader/thread.go#L53-L56

stackdump commented 4 years ago

Work-in progress from BIF was merged into wax.

Control panel in WAX build is still incomplete, but the framework in place shows how to make use of Server Send Events :1st_place_medal:

https://github.com/FactomProject/factomd/pull/974

PaulBernier commented 4 years ago

New control panel won't be in Wax, we are trying to reduce the scope of Wax to get it out.