I'm starting to build a web application and need to handle a large amount of work with databases between clients and servers.
So what is the solution to this problem and what technology to use to get the best performance.
Please advice me, thank you.
how many users, how much data, what type of data, is it data between database servers or data sent via a browser which you'll need to save to a database, is the database clustered with failover, on prem hosting/cloud hosting or dedicated hosting at a dedicated
provider, ... ?
Kris.
Read my blog | Twitter Working with Azure, chatbots, ASP.NET MVC, Web API, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
So, there's not a lot of technical specifications or requirements spelled out in your original post, so I'm running on a lot of assumptions. The assumptions that I'm making is that you have a set of clients that needs to access data on a database through
a web application, and that there may be a lot of data processing involved that requires some overhead.
Typically what I've done in the past is one of two things:
1) Setting up a series of classes that act as interfaces between the database and the web application. These classes contain static retrieval and update methods that can be called directly by an aspx page. I recommend setting these up in a C# library project
that your web application is dependent on, which will allow you to do a small amount of data processing during retrieval. I usually avoid parallel processing here; I would rather explore solution 2 if I need parallel,but
this is more my professional opinion. However, I would not go too crazy with data processing here as these can affect the performance and responsiveness of your web page since these methods are being directly called
by the aspx page. I would setup a budget of a thirty second processing time with this method.
2) If you need a large amount of data processing that could take several minutes, or even hours (yes, I've seen this before), then explore setting up Hangfire and using it as a background job manager. You would basically setup your data processing as "jobs"
that are directly managed by Hangfire,. You could write your own job manager to take the role of Hangfire, but I would only do this if for some reason Hangfire doesn't meet project technical specifications and/or requirements.
None
0 Points
3 Posts
Solution and technology for between clients and servers
Nov 15, 2017 04:08 AM|xuandungpy|LINK
I'm starting to build a web application and need to handle a large amount of work with databases between clients and servers.
So what is the solution to this problem and what technology to use to get the best performance.
Please advice me, thank you.
All-Star
191741 Points
20952 Posts
ASPInsiders
Moderator
MVP
Re: Solution and technology for between clients and servers
Nov 15, 2017 09:23 AM|XIII|LINK
Hi,
how many users, how much data, what type of data, is it data between database servers or data sent via a browser which you'll need to save to a database, is the database clustered with failover, on prem hosting/cloud hosting or dedicated hosting at a dedicated provider, ... ?
Kris.
Working with Azure, chatbots, ASP.NET MVC, Web API, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
Contributor
4953 Points
4208 Posts
Re: Solution and technology for between clients and servers
Nov 16, 2017 06:57 PM|DA924|LINK
https://en.wikipedia.org/wiki/Separation_of_concerns
https://msdn.microsoft.com/en-us/library/bb384398.aspx
http://www.c-sharpcorner.com/UploadFile/e4e3f7/dapper-king-of-micro-orm-C-Sharp-net/
https://www.codeproject.com/Articles/1050468/Data-Transfer-Object-Design-Pattern-in-Csharp
None
0 Points
1 Post
Re: Solution and technology for between clients and servers
Nov 21, 2017 05:28 PM|AudioGoose45|LINK
So, there's not a lot of technical specifications or requirements spelled out in your original post, so I'm running on a lot of assumptions. The assumptions that I'm making is that you have a set of clients that needs to access data on a database through a web application, and that there may be a lot of data processing involved that requires some overhead.
Typically what I've done in the past is one of two things:
1) Setting up a series of classes that act as interfaces between the database and the web application. These classes contain static retrieval and update methods that can be called directly by an aspx page. I recommend setting these up in a C# library project that your web application is dependent on, which will allow you to do a small amount of data processing during retrieval. I usually avoid parallel processing here; I would rather explore solution 2 if I need parallel, but this is more my professional opinion. However, I would not go too crazy with data processing here as these can affect the performance and responsiveness of your web page since these methods are being directly called by the aspx page. I would setup a budget of a thirty second processing time with this method.
2) If you need a large amount of data processing that could take several minutes, or even hours (yes, I've seen this before), then explore setting up Hangfire and using it as a background job manager. You would basically setup your data processing as "jobs" that are directly managed by Hangfire,. You could write your own job manager to take the role of Hangfire, but I would only do this if for some reason Hangfire doesn't meet project technical specifications and/or requirements.