bloxbean / yaci-store

A Cardano datastore implementation using Yaci
https://store.yaci.xyz/
MIT License
17 stars 8 forks source link

Fine Grained Modularity #108

Open matiwinnetou opened 11 months ago

matiwinnetou commented 11 months ago

For any of the module being developed it should be possible:

I have cases sometimes where I need 1, 2, 3, 4 and it all depends on a use case where Yaci-Store is being used.

This issue feels a bit wrong, actually this should be probably an ADR (Architecture Decision Record)

satran004 commented 11 months ago

Thanks @matiwinnetou . We will create a separate enhancement for each item during implementation.

Regarding pt-2, some of the business events may still require a repository layer, as they might depend on previously processed data. So, we will implement pt-2 wherever possible and provide documentation for it.

pt-3: Is the current way of listening to business events not sufficient? Using @EventListener?

satran004 commented 11 months ago

(1) To Disable All Controllers, Leaving Only the Service Layer and Repository Layer

Instead of enabling and disabling controllers in a store through config options, we can explore creating a separate API module for each store. So, we can have a top-level "API" folder (like "stores"), and then for each store module, add a corresponding API module. For example: utxo-api, blocks-api, assets-api, etc.

The existing controllers and DTO classes will be moved to the corresponding API module. Each API module is published as a separate library.

Pros:

Cons:

satran004 commented 10 months ago

https://github.com/bloxbean/yaci-store/issues/130