Skip to content

Conversation

@DK318
Copy link
Member

@DK318 DK318 commented Apr 1, 2022

Description

Problem

At this moment we are creating one connection manager per BackendEffect.
This seems ridiculous.

Solution

Added Member (State (Maybe Manager)) constraint in Sem to store only one
connection manager for all BackendEffect actions.

Related issue(s)

✅ Checklist for your Pull Request

Related changes (conditional)

  • Tests
    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from
      silently reappearing again.
  • Documentation
    • I checked whether I should update the docs and did so if necessary:
  • Public contracts
    • Any modifications of public contracts comply with the Evolution
      of Public Contracts
      policy.
    • I added an entry to the changelog if my changes are visible to the users
      and
    • provided a migration guide for breaking changes if possible

Stylistic guide (mandatory)

@DK318 DK318 requested review from Heimdell and dcastro April 1, 2022 13:32
DK318 added 4 commits April 4, 2022 15:14
Problem: at this moment we are creating one connection manager per `BackendEffect`.
This seems ridiculous.

Solution: added `Member (State (Maybe Manager))` constraint in `Sem` to store only one
connection manager for all `BackendEffect` actions.
@DK318 DK318 force-pushed the dk318/#25-creating-one-connection-manager branch from 3217b10 to 860ce2b Compare April 4, 2022 12:23
@MagicRB
Copy link
Contributor

MagicRB commented Apr 12, 2022

This is a bad idea IMO, having to create a tls connection manager for every backend is less then ideal. What we need is a way for each backend to store some data as a somehow

@dcastro
Copy link
Member

dcastro commented Apr 12, 2022

having to create a tls connection manager for every backend is less then ideal

How so?

What we need is a way for each backend to store some data as a somehow

I didn't really understand what you meant here. What do you mean? And how is this related to connection managers?

@MagicRB
Copy link
Contributor

MagicRB commented Apr 12, 2022

My new pass backend doesnt need a tls connection mamager, so adding a Reader Tls... as a dependency for all backends is not ideal https://github.com/serokell/coffer/pull/54/files#diff-a0dd0bee522a338924cfebf12a6c79b6cb8a9bfdd093e249d370306060b45480R32

@MagicRB
Copy link
Contributor

MagicRB commented Apr 12, 2022

We're once again making the frontend take responsibility for things which should not be its responsibility, also such state will make it hard for #56 to work.

@dcastro
Copy link
Member

dcastro commented Apr 13, 2022

@MagicRB Oh I see, I hadn't considered that some backends might not need a connection manager at all.

Yup, that makes sense. Would you please open a PR that solves the issue in #16?

@MagicRB
Copy link
Contributor

MagicRB commented Apr 13, 2022

I think I've come up with a way to do this, I'll get it done today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid creating many connection managers

4 participants