来自多个程序或仅来自Web服务器的多个SQL连接? [英] multiple SQL connections from multiple programs or only from webserver?

查看:81
本文介绍了来自多个程序或仅来自Web服务器的多个SQL连接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一个包含数百万行等的大型数据库,并且有一些服务器可以运行一些特定的程序,这些程序使用大量的select,insert,update语句,当然还有处理数据。我正在使用自动化工具来创建这些程序。所以我有这个想法将数据库连接更改为POST Web请求并在asp.net中设置本地web服务器,所以理论上处理数据的程序可以更快,因为不需要处理sql。

所以我的问题是:

a,我的理论是否正确?

b,网络服务器如何处理连接?

c,如果请求太多,它将如何处理?它会把它放在TODO列表上并在其他请求完成时执行它?还是会继续挂起我的Post请求?

d,你能提供一些文章来帮助我完成这个吗? asp.net技能目前等于0?



提前感谢,

Let's say I have a large database with millions of rows etc. and have a few servers to run some specific programs which use a lot of select,insert,update statements and of course processing the data. I'm using automation tool for creating those programs. So I had this Idea to change the database connection to a POST web request and set up a local webserver in asp.net so in theory the programs which processing the data could be faster as not need to deal with the sql.
So my questions are:
a, Is my theory correct?
b, How would the webserver handle the connections?
c, How would it handle if there is too much request? It would put it on the TODO list and execute it when the other request finished?or would it keep hanging my Post request?
d, Can you Provide a few articles which would help me to accomplish this as my asp.net skills equals to 0 at the moment?

thanks in advance,

推荐答案

这个理论有道理。这称为多层架构。实际上,您可以为用户提供安全的HTTP facade ,而不是可能存在漏洞的数据库连接,它自己的ASP.NET身份验证等等。与数据库的连接是与单独层的连接。客户端与Web站点/应用程序的连接基于HTTP会话,与数据库连接无关。数据库被移动到客户端无法直接访问的主机,只能通过ASP.NET主机访问。该主机可以与数据库服务器的主机相同,也可以不同;在所有情况下,用户都不会访问它,ASP.NET主机将代表用户执行它。因此,前端层位于用户的客户端计算机上,它是浏览器,后端数据层是SQL服务器,中间是ASP.NET主机或Web服务器工厂。



有很多关于相关主题的文献。



< d> -SA
This "theory" makes certain sense. This is called "multi-tier architecture". Indeed, instead of potentially vulnerable database connection, you provide a safe HTTP facade to the user, its own ASP.NET authentication, and so on. The connection to the database is a connection to a separate tier. The connection of the clients to the Web site/application is based on HTTP sessions and have nothing to do with database connection. The database is moved to the host which is not accessible by clients directly, only through the ASP.NET host. This host can be the same as database server's host, or a different one; in all cases, the user won't access it, the ASP.NET host will do it on behalf of the users. So, front-end tier is on the user's client computers, it's the browser, the back-end data tier is the SQL server, with ASP.NET host computer or a Web server factory in between.

There is a lot of literature on related topics.

<d>—SA


这篇关于来自多个程序或仅来自Web服务器的多个SQL连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆