API 1: Metadata creation API
POST v1/infrastructure/{:id}/component/metadata
content-type: application-drs/json
accept-type: application-drs/json
Payload: {
component-name:
deployemnt-details:{
replicas:
regions:
av:
}
dsrAPI:{
backup:{}
restore:{}
}
quorum:{
}
rebootOrder:{
}
backupOrder:{
}
}
respone:{
component_id:
status:
}
API 2: Metadata update API
PATCH v1/infrastructure/{:id}/component/metadata
content-type: application-drs/json
accept-type: application-drs/json
Payload: {
component-name:
deployemnt-details:{
replicas:
regions:
av:
}
dsrAPI:{
backup:{}
restore:{}
}
quorum:{
}
rebootOrder:{
}
backupOrder:{
}
}
API 3: Plan generation API
GET v1/infrastructure/{:id}/plan
content-type: application-drs/json
accept-type: application-drs/json
response:
{
infra_id:
strategy:{
component1:{
BackUpSource:{}
BackUpDestination:{}
BackUPOrder:{}
RestoreOrder:{}
RiskScore:{}
Suggestions:{}
}
}
}
Since data is like a document and all the fields may not be applicable to all the components in the infrastructure i prefer to use document database for storing metadata information. Final analysis disaster recovery solution also will be placed in the document database.
Document database is horizontally scalable.
Refer to flow chart
Refer to sequence diagram
Planning service:
1.Instead of Metadata service directly contacting Planner service meassage is added to kafka so that it helps in consumer end to do parallel processing. It enables reliablity and ensures event is not left unprocessed.