This repository was archived by the owner on Sep 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Mapi Capi Thrift model generation
Jamie Webb edited this page Jul 21, 2020
·
1 revision
content-api-models/models/src/main/thrift/content/v1.thrift
In order to aid scalability and efficiency in fetching/receiving data it was deemed more expedient not to use JSON format to get this data
Mapi sends requests to CAPI in order to receive content (articles) as responses CAPI responds to MAPI with a BLOB file of structured data containing the article Mapi then receives this data and bakes it into to other relevant data.
- Mapi receives the URL request from the Load Balancer, sent from the clients browser.
- Sends HTTP request to Capi (a URL) for the required article.
- Capi searched the Database for the article
- A
thriftfile then defines the type structure, example here - This defines the Key and Value, importantly the Type to enforce type integrity across modules/services
- A Blob file is generated and sent back to Mapi
The general use of the BLOB file is very efficient and Thrift allows for the data type structure of the content to be generated in any syntax necessary, be it TS or Scala