1 min read

What is inside the BFC API?

Generic structure of BFC API from code perspective is basically like any other data processing API and consists of three layers of logical services:

BFC API structure, image 1
BFC API structure, image 1

The High level layer is represented via controller endpoints. Mid level layer is represented by business logic services that consume data from the Low level layer to process it and produce Poq Responses that are returned to High level services. Low level services are basically invocation clients for the microservices that API communicates with. When it comes to code reusability between BFC API of the same type, for example Salesforce commerce cloud based, we package common code into the corresponding libraries, called SDKs. As a result diagram become to look as follows:

BFC API structure, image 2
BFC API structure, image 2

As you can see from the diagram we tend to package Mid level and Low level services into the SDK packages. The SDK is a reusable package shared across multiple clients. Depending on what level this customisation needs to happen Custom services are introduced within the API either on Mid or Low level. An important point to note is that we have “extension points” to SDK services for most of the common customisation scenarios and you will only need to customize and inject small sub service rather than full Mid level service. With that said final real life diagram will look more like this:

BFC API structure, image 3
BFC API structure, image 3

On top of that there are scenarios when we want to invoke Poq Platform microservices for certain scenarios and return response as it is from them. For that specific situation there is a functionality called Reverse Proxy that is plugged by default into all BFC APIs. As a result here is a final diagram that shows all components inside generic BFC API:

BFC API structure, image 4
BFC API structure, image 4

See Next