lukashornych / evitalab

Official web-based GUI client for evitaDB e-commerce database. It is built to help developers who use evitaDB with exploring and debugging their domain structure and data. Besides standard query executing, it also supports multiple no-code tools to quickly navigate through domain structure, docs and data without needing to write any queries.
https://github.com/lukashornych/evitalab
Apache License 2.0
7 stars 2 forks source link

Driver support - support multiple version of evitaDB #162

Open lukashornych opened 4 months ago

lukashornych commented 4 months ago

Within #94, base ground for this support was set in form of internal evitaLab data layout and the Value wrapper. Currently, we will have a single driver built on top of gRPC-web of the latest evitaDB and we need to think about how will support future versions. Two possible version come to mind:

There is also problem with the actual generated gRPC code, which would be kind of duplicated as well and would bloat the code base as well.

I personally don't like any of these solutions.

Second part will be to display useful information to users of evitaLab about supported features for a current evitaDB server #152.

lukashornych commented 3 months ago

Maybe we should get rid of the Value wrapper around properties and define default for unsupported properties directly in the converter in driver. The UI layer would be still handled as mentioned in #152 .

lukashornych commented 3 weeks ago

Early draft of proposed evitaDB client structure

flowchart TD
    Component --> EvitaClient
    Component --> EvitaManagementClient
    Component --> EvitaSessionClient
    EvitaClient --> VersionedEvitaDriver
    VersionedEvitaDriver --> VersionedGrpcEvitaAPI
    EvitaManagementClient --> VersionedEvitaManagementDriver
    VersionedEvitaManagementDriver --> VersionedGrpcEvitaManagementApi
    EvitaSessionClient --> VersionedEvitaSessionDriver
    VersionedEvitaSessionDriver --> VersionedGrpcEvitaSessionAPI
    VersionedGrpcEvitaAPI --> Server
    VersionedGrpcEvitaManagementApi --> Server
    VersionedGrpcEvitaSessionAPI --> Server
    VersionedEvitaDriver --> EvitaDriverConverters
    VersionedEvitaManagementDriver --> EvitaManagementDriverConverters
    VersionedEvitaSessionDriver --> EvitaSessionDriverConverters
    Component --> GraphQLClient
    GraphQLClient --> VersionedGraphQLClientDriver
    VersionedGraphQLClientDriver --> GraphQLAPI

Each evitaDB API would have its own versioned driver and client encapsulating the driver and versioning. This way we could upgrade each part separately and save some hassle of duplicating code. I still need to think more about relations to the #152