# Introduce

- core is an independent GRPC service which serve cluster and profile related request.
- core can be called from central which is the user-end API gateway or admin which is the admin-end API gateway.

# Why make a new service?

- migrate cluster and profile related logic from central into core, then make central as an API gateway
- use a new code-framework for more testability and maintainability
- use a strong schema IDL to ensure don't make mistake about compatibility

# Attention

## go.mod

we need to replace some go module for some historical reasons. there is a list:

1. `github.com/tidbcloud/idl/pbgen/proto/core => ../idl/pbgen/proto/core`, we can migrate idl to an independent repo to
   remove this replacement.
2. `github.com/tidbcloud/idl/pbgen => ../idl/pbgen`, same as above
3. `github.com/tidbcloud/pkgv2 => ../pkgv2`, same as above
4. `github.com/pingcap/dbaas/central/db/entity => ../central/db/entity`, after migrate all cluster,profile related
   logical code into the `core` service, we can make the db of core as an independent db.

