You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of Captive Stellar-Core streams meta stream using a filesystem pipe. This implies that both Horizon and Stellar-Core have to be deployed to the same server. One of the disadvantages of such requirement is a need for detailed per-process monitoring to be able to connect potential issues (like memory leaks) to the specific service.
To solve this we can build a thin wrapper around CaptiveStellarCore backend that exposes a simple RPC/HTTP API similar to LedgerBackend interface:
// PrepareRange prepares the given range (including from and to) to be loaded.
// Some backends (like captive stellar-core) need to initalize data to be
// able to stream ledgers.
PrepareRange(ledgerRangeRange) error
// IsPrepared returns true if a given ledgerRange is prepared.
IsPrepared(ledgerRangeRange) bool
Close() error
}
The full solution requires a server and a client that can consume the API.
A server can be a subcommand on horizon that exposes the CaptiveStellarCore object API using either the net/rpc package or HTTP. It has the same require params as CaptiveStellarCore. A server is a singleton, meaning it can start a single stellar-core process, thus should be used by a single Horizon instance.
A client, RemoteCaptiveStellarCore implementation of LedgerBackend interface is part of exp/ingest/ledgerbackend and accepts a connection params to a server.
The text was updated successfully, but these errors were encountered:
The current implementation of Captive Stellar-Core streams meta stream using a filesystem pipe. This implies that both Horizon and Stellar-Core have to be deployed to the same server. One of the disadvantages of such requirement is a need for detailed per-process monitoring to be able to connect potential issues (like memory leaks) to the specific service.
To solve this we can build a thin wrapper around
CaptiveStellarCore
backend that exposes a simple RPC/HTTP API similar toLedgerBackend
interface:go/exp/ingest/ledgerbackend/ledger_backend.go
Lines 26 to 40 in f77b3b5
The full solution requires a server and a client that can consume the API.
A server can be a subcommand on
horizon
that exposes theCaptiveStellarCore
object API using either thenet/rpc
package or HTTP. It has the same require params asCaptiveStellarCore
. A server is a singleton, meaning it can start a singlestellar-core
process, thus should be used by a single Horizon instance.A client,
RemoteCaptiveStellarCore
implementation ofLedgerBackend
interface is part ofexp/ingest/ledgerbackend
and accepts a connection params to a server.The text was updated successfully, but these errors were encountered: