开发者

Web application backend as a service? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 8 years ago.

Improve this question

We are building "The next generation" web site from the start. at the moment for UI we use EXT and asp.net we are thinking that the backend sho开发者_如何学Pythonuld be a wcf service hosted by iis in which the app will get the data from the service. the main reason is to support diffrent tech in the need of changing the UI. my worry is about speed. please i will thank any input. Guy


If speed is the main concern, you can take 2 approaches:

  1. Use a JSON based library. If its a simple app without much of logic at UI tier (and most pushed to service), you can make you pages pure HTML with JS support with using libraries like jQuery or EXT as you have already mentioned. The backend service can be a .NET or Java service as all support json natively.

  2. If you are bound to use ASP.NET for multiple considerations, prefer tcp bindings over http bindings (read more about its pros and cons at MSDN. If security is not a big concern, dont use HTTPS or any transport level security.

Ultimately the implementation will depend a lot of the resources you have. If you have folks who are good in JS, then go for the first option. If folks are more comfortable with ASP.NET stick with the 2nd one.


Speed depends upon the 'type' of binding used. WCF Binding Decision

Here is a general article on WCF Performance: A Performance Comparison of Windows Communication Foundation (WCF) with Existing Distributed Communication Technologies


I will take for granted that you will have multiple UIs and that you need WCF service for that. What is important from then on: are service and the web app on same machine / local to each other? If not, and if this is high traffic site, you will have performance problems here, and multiply those problems for every time you have to go to service to fetch data for single web page request (so try to merge this data fetching to single DTO objects or something).

The web site with remote backend is really rare I think, except if local and with low latency in between


Do you have any specific worries rather than just 'speed in general'? Tell us more about how people will use the services, the type of data you'll be transmitting, are all the users local? or in separate countries? etc.

You're right that creating services / an API will allow you to swap out the UI or have multiple UI channels (browser, phone, tablet, etc, etc).

Speed is always going to be the compromise here. Your data has to be serialised to be made ready for sending over the service, however the biggest bottleneck will be the network transfer (presumably over HTTP).

You should look into caching (check out a product called Squid as a starting point) along with HTTP compression, and essentially just making sure that you make the server-side data retrieval code as efficient as possible.

Ta Chris.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜