Code Monkey home page Code Monkey logo

Comments (5)

hassanhabib avatar hassanhabib commented on July 21, 2024

@padnom So, brokers in general live in the same realm as your services and exposure components (say controllers for your APIs for instance). this is what you call Core project.

Infrastructure to me is three things:

  1. Where you provision your cloud components
  2. Where you define your build steps
  3. Where you define your release steps

that's infra. very different from integration components.

In your scenario, I would have an ISqlStorageBroker and IMongoStorageBroker for each implementation.
The reason for that, is that your interface/contract won't be able to withstand both. So go that route.

from the-standard.

padnom avatar padnom commented on July 21, 2024

@hassanhabib
Thx for you reply.
I'm little bit confuse because in Infrastructure layer.
This layer contains classes for accessing external resources such as file systems, web services, smtp, and so on. These classes should be based on interfaces defined within the application layer.
usualy I saw Repositories implementation.
image

from the-standard.

hassanhabib avatar hassanhabib commented on July 21, 2024

@padnom the concept of infrastructure to give you access to external resources might not support your ability to access resources within the system you're running on.
For instance, let's say we want DateTimeBroker where are you going to put that? Is it in the infrastructure? but it's not exactly external?

The other thing here is that the approach you mentioned seems to rely heavily on foundation services (core logic) owning the contract and brokers having to adhere to it. At first glance, this seems very convincing. But then you truly try to switch brokers and now you end up writing business logic (selection, iteration or sequencing) into your thin layer of integration.

If we are trying to achieve true abstraction here. then we need to first understand that doing it in one step isn't realistic without breaking some rules. in The Standard abstract happens on two different steps.
First step is to abstract away native/external functionality. and the second step is to abstract away contracts.

There's also another aspect here in terms of sharing libraries to provide access to resources. I'm not sure this is the best route to go about that. creating centralized components that are used across multiple microservices always causes a single-point-of-failure situation.

Let's jump on a call and discuss this on Discord.

from the-standard.

padnom avatar padnom commented on July 21, 2024

Thanks, I understand better.
I would have liked to do this on discord.
Unfortunately, my English is so bad :D.

from the-standard.

hassanhabib avatar hassanhabib commented on July 21, 2024

@padnom my English isn't any better either lol
Closing this issue.

from the-standard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.