simonsobs / acondbs

ProductDB back-end API
MIT License
0 stars 1 forks source link

Turn the backend code into plugins of nextline-graphql #33

Closed TaiSakuma closed 5 months ago

TaiSakuma commented 1 year ago

Although ProductDB and Nextline appear quite different, their backends are actually very similar. Both are GraphQL servers with SQLAlchemy. Nextline has an additional feature of executing Python code. ProductDB and Nextline can be implemented as the same pluggable framework with different plugins.

The Nextline backend is already implemented as a pluggable framework with plugins. Nextline-graphql is the pluggable framework (It needs to be renamed for clarity). ProductDB can be turned into plugins of nextline-graphql.

The advantage of this approach is large. Generic plugins can be used by both projects. For example, we can implement a plugin for full-text DB search and use it for both ProductDB and Nextline. In addition, site-specific features can be implemented as plugins. For example, we can develop a plugin for ProductDB for SO without affecting ProductDB for ACT.