Edge-home-orchestration-go: How about merging current configuration db and serviceInfo db into one?

Created on 3 Sep 2020  ·  4Comments  ·  Source: lf-edge/edge-home-orchestration-go

How about merging the configuration DB and the serviceInfo DB as follows and using the serviceInfo DB for different purpose such as collecting performance data(cpu, memory), version and so on?

Current

type Configuration struct {
    ID       string `json:"id"`
    Platform string `json:"platform"`
    ExecType string `json:"executionType"`
}
type ServiceInfo struct {
    ID       string   `json:"id"`
    Services []string `json:"services"`
}

Future

type Configuration struct {
    ID       string `json:"id"`
    Platform string `json:"platform"`
    ExecType string `json:"executionType"`
    Services []string `json:"services"`
}
enhancement

Most helpful comment

@MoonkiHong @Karthikeyan-Samsung @suresh-lc
I've tested the Edge Orchestration works as usual when the Configuration DB stores the lists of services.
Please consider this issue and review the proposed PR if this issue is all right.

All 4 comments

@Karthikeyan-Samsung @suresh-lc PTAL.

@MoonkiHong @Karthikeyan-Samsung @suresh-lc
I've tested the Edge Orchestration works as usual when the Configuration DB stores the lists of services.
Please consider this issue and review the proposed PR if this issue is all right.

Combining dbs into single one looks better from understanding point of view. But From development and maintainability point, its good to maintain as separate. This makes it simpler to update information properly and thus ensure data integrity. In future in case we want to limit services to particular requester that it would be better in case we have 2 different dbs. Also if we want to add other parameter like say based on device capability(Sensor) if offloading needs to be done, then say a capability db needs to be added. Hence its always better to have the dbs separate instead of merging into single. If merging into single db has strong point then we should think about it.

As described in #132 , let us keep discussing this topic including backward compatibility of the DB structure.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MoonkiHong picture MoonkiHong  ·  5Comments

MoonkiHong picture MoonkiHong  ·  6Comments

t25kim picture t25kim  ·  3Comments

t25kim picture t25kim  ·  7Comments

t25kim picture t25kim  ·  7Comments