Live feed API status

Secured
#1
The live feed API is still in incubation stage but especially the live event export feature from factomd is functional. Work is being done in a fork branch:
https://github.com/bi-foundation/factomd/tree/FD-1150_live_api_20190910
('ve tagged it because we're still working on that branch)

The next task is to implement a replay feature so a specific range of blocks can be requested using a REST endpoint.

We are also working on a second layer which is basically a subscription/filter API. It is designed to run close to factomd and consumes of the event data, filters it & routes the desired events to the subscribed systems.
https://github.com/bi-foundation/live-feed-api

We have created a protobuf interface between the two, I've uploaded an example project that only dumps the live feed events from the factomd node (1st layer) to console:
https://github.com/bi-foundation/factomd-sample-event-consumer/tree/FD-1150_20190910

For factomd there is a new section in the conf file:
Code:
[LiveFeedAPI]
EnableLiveFeedAPI                     = false
EventReceiverProtocol                 = tcp
EventReceiverAddress                  = 127.0.0.1
EventReceiverPort                     = 8040
EventFormat                           = protobuf   (protobuf or json)
MuteReplayDuringStartup               = false      (Mute replay during startup)
ResendRegistrationsOnStateChange      = false      (Resend the entire registration record for each state change rather than just a StateChange event)
ContentFilterMode                     = SendOnRegistration
        (Settings for including content in the event messages SendAlways|SendOnRegistration|SendNever; default SendOnce)
We will provide examples consumer asap.
 
Last edited:
Secured
#5
We are ready for beta testing as soon as the pull-request for FD-1150 is merged into the release.
The settings changed slightly, and they are in the README.md in the events subdirectory
https://github.com/bi-foundation/factomd/tree/FD-1150_live_api/events

All related projects are in sync on the same protobuf level
https://github.com/bi-foundation/live-feed-api
https://github.com/bi-foundation/factomd-sample-event-consumer
https://github.com/bi-foundation/live-feed-subscriber

Unfortunately the proto source files in the live-feed-api project have some minor differences compared to the ones in factomd. We had to pull out the GraphQL support on the factomd side because the generator we used for that only support golang. This issue came to light when someone tried to generate Python code from them.

The directory block commit events are now emitted from the dbStateManager because when the 2nd pass is synched up / the follower is at the same height as the leader, no dbState messages are coming through stateConsensus (FollowerExecuteDBState) anymore and therefore directory block commit events were not emitted anymore.