Does it possible horizontal scaling for monolithic solutions.? lets consider about this. #4626
Unanswered
semihyildiz
asked this question in
General
Replies: 1 comment 2 replies
-
I'm not understanding what you're asking for here. Is there a specific language feature you want? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Do you think that is it possible while building microservices for in-company applications, can we use Monolithic development?.
As you know microservice architecture has many advantages.Many people knows this. and I dont need to explain this advantages in this topic.
But how can we eliminate the disadvantages.which are:
1-)the number of developers needed is too much.It is developed by more than one team. It is difficult to coordinate and keep teams up to date.
2-)A complex structure may arise. It is difficult for a developer working in any of the Micro Services to know the whole system
Applications that we can perform monolithic require less human documentation and less effort as development. and developers have a very high command over the overall project.
My theory is as follows.
First, let's consider a classic solution prepared in a layered manner.
Layer descriptions:
Entities: it is common library, entities, models ex: Product ,User
Db : DbContexes (mysql,mssql,Mongo,etc)
No need to give information about this layer for narration
Repositories : Repositories of entities ex:RepProduct,RepUser*
No need to give information about this layer for narration
Bussiness :Bussiness logic of solution ex:ProductManagement,UserManagement
Services : EndPoints of Bussiness library ex:ProductService,UserService
As you can see, there is only one Back-End system that gives out products and users in its simplest form.
We can quickly develop this project with vertical scaling, with fewer developers needed.
So over time our application has grown and if we want to scale this application horizontally, how do we do it? By writing new application?
It is not neccesary, I think,
A structure like this is needed.
As you can see, there is only one Back-End system that gives out products and users in its simplest form.
We can quickly develop this project with monolithic, with fewer developers needed.
So over time our application has grown and if we want to scale this application horizontally, how do we do it? By writing new application?
It is not neccesary, I think,
A structure like this is needed.
As you can see my aim, to be able to redirect the request from one method to another before method working
i am planning to do this with MicroRoute attribute
In this way, end points can be directed to different servers according to service settings using the same source code repository.
With the MicroRoute attribute, we define that this method should pull the ProductServiceParameters, the name of the method in the endpoint, which http type it works with, and whether it can work before or after the method.
For this example, the MicroRoute attribute method runs the Before () method before it runs.
Let's talk about the Before () method
First step,It pulls the necessary settings for the web service.
Second Step, If exists, it prepares http request with the request from the method using these settings.
and sends it to the destination.
The request reaches a working copy of the same application on a different server for ProductService.
There, the GetProducts method in Product Management meets our request as well.
but since its parameters are empty, it is not directed to any other endpoints. and does GetProducts ()
As a result:
I tried it in c# like above but I failed ,because attibute programming, or AOP Structure does not support this kind of things as I know.
but I done that manualy like below,
I think this system can work in different containers by changing configurations except database layer.
I have two questions
How can this approach be done more professionally?
Can't c# support such a feature in new versions?
Beta Was this translation helpful? Give feedback.
All reactions