diff --git a/platforms/anchor-platform/admin-guide/architecture.mdx b/platforms/anchor-platform/admin-guide/architecture.mdx index 42c5e31bc..b3ff5346c 100644 --- a/platforms/anchor-platform/admin-guide/architecture.mdx +++ b/platforms/anchor-platform/admin-guide/architecture.mdx @@ -19,9 +19,7 @@ The client is an application, such as a wallet or remittance sender, that acts o #### SEP Server -The SEP server is a client-facing server and therefore needs to be accessible from an external network. The SEP server processes user requests and manages the state of transactions they initiate. When the SEP server needs to provide information it doesn't have to the client, such as the exchange rate for an asset pair, it makes synchronous [callback][callback-api] requests to the Business Server. - -Some SEP requests are designed for a client to fetch business-related data, such as quotes or fees. Because it's business-driven, the SEP server will create a request to your server, passing information back to the client. It will also transform the response into a SEP-compliant format. Note that your server only needs to implement endpoints required by the particular SEP you would like to support. +The SEP server is a client-facing server and therefore needs to be accessible from an external network. The SEP server processes user requests and manages the state of transactions they initiate. When the SEP server needs to provide information it doesn't have to the client, such as the exchange rate for an asset pair or the KYC status of a customer, it makes synchronous [callback][callback-api] requests to the business server and returns the information in a SEP-compliant format. :::note @@ -29,17 +27,17 @@ The SEP server will never store any sensitive information, such as KYC (PII), in ::: -#### Database +#### Business Server -The Anchor Platform uses a PostgreSQL database to store Stellar events and entities. Its primary use is to store SEP (24 & 31) transactions. +The business server is a service that you (the business) must implement to connect the Anchor Platform with your internal systems. The business server responds to callback requests sent by the SEP server, such as requests for a quote, receives events sent by event service, such as notification of a received payment to your Stellar account, and provides updates to the platform server when off-chain events occur, such as the initiation of a bank transfer to a customer. #### Platform Server The platform server is an internal component. It should be hosted in a private network and should not be accessible from the Internet. This server enables the business to fetch and update the state of transactions using its [API][platform-api]. -#### Business Server +#### Database -Finally, the business server is a server that you (the business) must implement to connect the Anchor Platform with your internal systems. The business server responds to callback requests sent by the Anchor Platform (such as requesting a quote for SEP-38) and provides updates to the Anchor Platform when off-chain events occur (like completing a bank transfer). +The Anchor Platform uses a PostgreSQL database to store Stellar events and entities. It is primary used to store transactions. ### Complete Architecture @@ -51,20 +49,20 @@ In addition to the components described above, the Anchor Platform includes seve The event service enables the Anchor Platform to send HTTP webhooks to registered clients and your business server when the state of transactions change, removing the need for clients and/or your business server to poll the Anchor Platform's APIs. It works by reading events from published to a Kafka topic by the other Anchor Platform components. [Read more][events] about using the event service. -#### Stellar Observer - -The Stellar observer monitors the Stellar blockchain using Horizon, automatically detects user payments sent to the business, and updates the corresponding transactions in the Anchor Platform's database. If you use the [events] service, payments to your accounts will trigger a HTTP callback made to your business server. - -If you already have a solution for monitor payments to your Stellar accounts, such as an integration with your exchange, Horizon, or RPC, then this component is not required, although your business server will need to notify the Anchor Platform when a payment associated with an Anchor Platform transaction was made to your one of your Stellar accounts via the [Platform API][platform-api]. - #### Custody Server -The custody server connects to a enterprise wallet providers, such as Fireblocks, to send and receive payments for transactions initiated via the Anchor Platform. This service is an alternative to the Stellar Observer for businesses who use one of the supported providers, except that in addition to the functionality offered by the Stellar Observer, the Custody Server can also facilitate outbound payments to client's Stellar accounts. +The custody server connects to enterprise wallet providers, such as Fireblocks, to send and receive payments for transactions initiated via the Anchor Platform. This service is an alternative to the Stellar Observer for businesses who use one of the supported providers. In addition to the functionality offered by the Stellar Observer, the Custody Server can also facilitate outbound payments to client's Stellar accounts. If you also use the [events] service, payments to your accounts will trigger a HTTP callback made to your business server. If you already have an integration with your wallet provider, then this component is not required, although your business server will need to notify the Anchor Platform when a payment associated with an Anchor Platform transaction was sent to or from your Stellar accounts via the [Platform API][platform-api]. Currently the only supported provider is Fireblocks. +#### Stellar Observer + +The Stellar observer, an alternative to the custody server pictured above, monitors the Stellar blockchain using Horizon, automatically detects user payments sent to the business, and updates the corresponding transactions in the Anchor Platform's database. If you also use the [events] service, payments to your accounts will trigger a HTTP callback made to your business server. + +If you already have a solution for monitor payments to your Stellar accounts, such as an integration with your exchange, Horizon, or RPC, then this component is not required, although your business server will need to notify the Anchor Platform when a payment associated with an Anchor Platform transaction was made to your one of your Stellar accounts via the [Platform API][platform-api]. + [seps]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/README.md [platform-api]: ../api-reference/resources/README.mdx [callback-api]: ../api-reference/callbacks/README.mdx