Yifan Cai created CASSSIDECAR-208:
-------------------------------------
Summary: Refactoring Guice modules
Key: CASSSIDECAR-208
URL: https://issues.apache.org/jira/browse/CASSSIDECAR-208
Project: Sidecar for Apache Cassandra
Issue Type: Improvement
Components: Rest API
Reporter: Yifan Cai
Assignee: Yifan Cai
{color:#000000}As more engineering efforts are made into Sidecar, the current
Guice module setup is reaching to a bottleneck, making it hard to scale,
hurting the development experience. {color}
{color:#000000}- Object bindings are declared in one single module, MainModule,
which is used like a dump ground. Besides the growing files size (it now has
1000 lines and growing), one also cannot tell in which feature the bindings are
needed.{color}
{color:#000000}- Bindings take a growing large amount of dependencies. For
example, the vertx router provider already takes 40 parameters. It is hard to
manage. And the size of the parameter list is increasing, as new APIs are
introduced. {color}
{color:#000000}I would like to propose a refactoring to Guice modules, applying
the Guice best practices
({color}[https://github.com/google/guice/wiki/BestPractices]{color:#000000}).
{color}
{color:#000000}Organize the bindings by feature to provide a good dependency
isolation, as well as documentation.{color}
{color:#000000}Invert the control of building object with large amount of
dependencies, e.g. vertx router and scheduling tasks, to make it open to extend
in the future development.{color}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]