Click here to Skip to main content
15,887,989 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear experts,

This is not a question- rather I would ask your opinions on a given scenario.

I have to start building a large application (using C#, ASP.NET, jQuery, etc etc)
The application would be basic input/output of data and the medium through which this data would be communicated to the browser is Web Services.

i.e. Client Browser (using AJAX) --> Web Services --> Data --> Back to Web Services --> Back to Client Browser

This application has various different sections as in various different entities with each entity having various different functions.

I was wondering whether I should have the following;
1. Seperate web service for each entity - having all required functions for that entity in their respective web service and hosted seperately - this means, if I have Entity E1 and E2 - then I will have two different Web services as WebServiceE1 and WebServiceE2 each with their own functions and WebServiceE1 hosted on port say 81 and WebServiceE2 hosted on port say 82 - seperating these services completely.

I was thinking this structure and hosting environment as to making supporting these services easy - i.e. if I am changing one, it does not impact the other one.

I am also talking high volumes of calls to these web services.

Whether this is a good idea or not - if not, what would you recommend and how is that beneficial

By the way, this is all developed in Microsoft technologies (ASMX - SQL Server)

Your thoughts would be greatly appreciated.

What I have tried:

I am trying to come to a conclusion on how to structure the web services layer for this application.
Posted
Updated 12-Dec-16 19:28pm

1 solution

Disclaimer: Uninformed opinions ahead.

1. Web services (asmx) are old technology now. You should probably go for REST service. As you mentioned that there will be lot of traffic, using JSON as means to share data would be better as it will be smaller in size than traditional messages.

2. If the entities are unrelated or there are no complex relationships, you might want to consider micro services based architecture. This is more or less inline with what you mentioned: Each entity with its own service. Entity here should rather be a business entity than the class which you would create.

3. Assuming less relationships, it will be easy for you to figure out aggregates i.e. a set of data that can independently represent some information. If this applies, NoSQL would help.

No, I am not saying ditch MS technologies and go for MEAN stack (while it would be an option here). Even a micro-service based architecture with multiple SQL databases would be fine.

So, IMHO, here is what might work out:

Web client -> HTTP Get/Post/so on -> REST resource (micro service) -> database and back.


In parallel, you might need to synchronize databases which can be done using technology of your choice.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900