设计可扩展,吞吐量和可用性WCF服务 [英] Design scale able, throughput and availability WCF service

查看:72
本文介绍了设计可扩展,吞吐量和可用性WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

专家,



我在一些他们给我一个问题的公司面对面试。但是,我找不到解决方案。所以我可以请帮我解决。



我们必须设计产品库存服务(WCF SOAP BASED Service),其中包含以下详细信息。

1)我们有一些初始库存价值,如初始库存= 100的产品笔记本电脑。

2)我们可以通过购买交易添加库存,减去已售出交易的库存,例如

笔记本电脑初始库存= 100;

购买笔记本电脑= 50然后库存将是(100 + 50)150。

出售笔记本电脑= 10然后库存将是(150-10) 140.

3)如果股票大于200,那么我们将不会执行任何操作,因为股票溢出。

4)如果股票低于20,那么我们不会执行任何操作,因为股票下跌。

例如if(股票> = 200)

然后溢出

if(stock< = 20)

然后是下溢。



但这里的要点是

1)股票服务将每周7天,每天24小时运行(即需要负载均衡)很多东西)。

2)许多其他应用程序或服务使用的库存服务(例如Back Store,POS等)

3)Stock Service将拥有大量的事务和没有并发用户访问

服务。

4)如何设计能够处理大量事务和可伸缩性,可用性和吞吐量的服务。

5)我有大量的交易,所以这是检查溢出和下溢股票的最佳位置,如果我每次检查我的数据库中的股票它会减慢那么什么是最好的方法这些情况。




我的尝试:



我试图在谷歌上找到解决方案,但找不到任何直到。

Hi Expert,

I have faced the interview in some company where they have given me a problem.But still, I do not find the solution.So could you please help me to give the solution.

We have to design product stock service (WCF SOAP BASED Service) having following details.
1)We Have some opening stock value like Product Laptop having initial stock=100.
2)We can add stock by Purchase Transaction and less stock by Sold Transaction e.g
Laptop initial stock =100;
Purchase Laptop =50 then the stock will be (100+50)150.
Sold Laptop =10 then Stock will be (150-10)140.
3)If Stock is greater than 200 then we will not perform any operation because the stock is overflow.
4)If the stock is less than 20 then we will not perform any operation because the stock is underflow.
e.g if(stock>=200)
then Overflow
if(stock<=20)
then Underflow.

But The main point here
1)Stock Service will run 24/7 hours (i.e need load balance kind of thing).
2)Stock Service used by many another application or service (e.g Back Store, POS etc.)
3)Stock Service will have huge volume of transaction and no of concurrent user access
Service.
4)How to design service that will handle the large volume of transaction and scalable, availability and throughput.
5)I have the large volume of the transaction so which is the best place to check overflow and underflow stock and if I every time check stock from my DB it will slow down so What is the best approach for these scenarios.


What I have tried:

I tried to found the solution on google but not find any till.

推荐答案

这样的问题以及Graeme_Grant带来的问题是该公司希望您回答这些问题,而不是让互联网上的陌生人为您回答这些问题。如果您使用谷歌并研究您的问题的基础知识,那么您自己会提出这一点,因为这将证明您能够解决问题并解决问题。



这里有另一条评论,你说



The problem with a question like this, and what Graeme_Grant brings up is that the company wants you to answer these questions, not get strangers on the internet to answer them for you. If you were to use google and research the fundamentals of your issues you bring up yourself that's one thing as that would demonstrate your ability to figure things out and solve problems.

Another comment here, you say

引用:

我试图找到解决方案在谷歌但没有找到任何直到。

I tried to found the solution on google but not find any till.





但这不是你可以google的问题或答案。如果是的话,你认为他们会雇用你吗?他们只会使用谷歌快速解决他们的问题。他们希望雇用来解决他们的问题。



但我可以保证,如果你要获得这个职位,在附近未来你和公司都会感到沮丧,因为他们认为你因为无法完成你所要求的工作而无法表现,而你会因为无法跟上而感到沮丧。 br />


本着帮助自己帮助自己的精神,我的建议是将你的许多问题分解成更小的问题。不要把这看作是你必须解决的5个问题的艰巨任务,从第一个开始,只有那一个。



示例:





But this isn't a question or answer you can google. if it were, do you think they would hire you? They would just use google to quickly solve their problems. They are looking to hire you to solve their problems.

But I can guarantee that if you were to get this position, in the near future both you and the company are going to be frustrated because they are going to think you can't perform due to your inability to do the work asked of you, and you are going to get frustrated from not being able to keep up.

In the spirit of helping you help yourself, my suggestion would be to break down your many questions into smaller problems. Don't look at this as a daunting task of 5 problems that you have to solve, start with the first one and only that one.

Example:

Quote:

股票服务将每周7天,每天24小时运行(即需要负载均衡类型事情)。

Stock Service will run 24/7 hours (i.e need load balance kind of thing).





所以你需要全天候提供服务器。你认为这会带来什么?一台服务器要削减它?空闲时间问题怎么样?您认为在这里需要完成什么?没有正确或错误的答案,因为这是一个面试问题。这个想法是公司希望看到你所知道的......而不是我或其他任何人都知道的。首先解释一下您认为需要为不同客户提供24/7服务器所需的基础设施(您的#2)



现在沿着项目符号列表工作你已经布置好了,单独看每个项目以及它需要什么。全面了解每个项目符号的所有想法,然后开始按摩这些想法,以适应全天候为需要支持大量交易的许多不同客户提供应用程序的全局。



So you need your servers available 24/7. What all do you think this entails? One server going to cut it? What about idle time issues? What do you think needs to be accomplished here? There is no right or wrong answer as this is an interview question for you. The idea being that the company wants to see what you know...not what I or anyone else here knows. Start by explaining what infrastructure you think you need to server an app 24/7 for different clients (your #2)

Now work your way down the list of bullet points you've laid out, look at each item individually and what it entails. Get all your thoughts for each bullet point together then start to massage those thoughts to fit the big picture of serving an application 24/7 to many different clients that needs to support large volume of transactions.


这篇关于设计可扩展,吞吐量和可用性WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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