简体   繁体   English

创建一个n层应用程序

[英]Creating an n tiered application

I am researching architecture for a project that will be started next year. 我正在研究一个将于明年开始的项目的体系结构。 It is mainly ac# web app, but there will be a service layer so that it can talk to our facebook/iphone app. 它主要是ac#Web应用程序,但是会有一个服务层,以便它可以与我们的facebook / iphone应用程序对话。 There are a few long running processes, which means that I will be creating a windows process that can handle those. 有一些长时间运行的进程,这意味着我将创建一个可以处理这些进程的Windows进程。

I'm thinking of putting the entire app in the windows service instead of just the long running processes. 我正在考虑将整个应用程序放置在Windows服务中,而不是将其长期运行。

Asp -> wcf -> bll Vs Asp -> bll Asp-> wcf-> bll Vs Asp-> bll

I know this will be more scalable. 我知道这将更具可扩展性。 But it is probably overkill as everything will be running on the same box, even the database. 但这可能是矫kill过正,因为所有内容(即使是数据库)都将在同一盒子上运行。 This could change down the road if the server can't handle the traffic like marketing says it will. 如果服务器不能像营销所说的那样处理流量,这可能会改变道路。

I don't have access to production hardware, just my crappy testing box and my local machine. 我无法使用生产硬件,只能使用我笨拙的测试箱和本地计算机。

Has anyone decided to go down this route? 有人决定沿着这条路线走吗?

But mostly, what is the best way to test both methods to get some metrics? 但是大多数情况下,测试这两种方法以获得某些指标的最佳方法是什么?

Asp->bll can be as much scalable if you consider web farms. 如果考虑使用Web场,Asp-> bll可以具有尽可能多的可伸缩性。 From performance perspective, its depends upon service/bll contract - for chunky kind of contract, many times, time to execute the call can be sufficiently large compared to out of proc call (involved in invoking service layer) - so no large impact of performance. 从性能的角度来看,它取决于服务/ bll合同-对于大块的合同,很多时候,执行该调用的时间与非proc调用相比(涉及到调用服务层)可能足够大-因此对性能的影响不大。 But if interface is chatty and call execution are shorter then having service layer can really hurt but then as long as you can meet your SLAs (response time vs number of users), it shouldn't matter. 但是,如果界面比较闲谈,并且呼叫执行时间较短,那么拥有服务层确实会受到损害,但是只要您能够满足SLA(响应时间与用户数量),那就没关系了。

As prod environment is going to be a single box initially, you can use your dev box or testing box for coming up with metrics. 由于产品环境最初将是一个单一的框,因此您可以使用开发框或测试框来提出指标。 As said, you need to check performance for both short running methods and long (relative) running methods and then decide based on what will be the kind of methods that will be mostly called, is performance hit you get for these kind of methods is ok etc. 如前所述,您需要同时检查短期运行方法和长期运行(相对)方法的性能,然后根据将被广泛调用的方法来确定性能,这对于您获得这种性能的影响是可以的等等

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM