ASP .NET Web应用程序如何处理持续的用户请求? [英] How would an ASP .NET web application handle constant user requests?

查看:61
本文介绍了ASP .NET Web应用程序如何处理持续的用户请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在C#和ASP .NET中制作基于文本的MMORPG。游戏将涉及持续不断的更新,例如玩家拥有的角色/技能体验。我的问题是,我如何存储/更新这些技能经验变量?



每次对体验进行更改时,我是否会更新SQL Server数据库点"变量还是我只会在特定的时间间隔更新数据库?哪种状态管理最好存储不断更新的数据,并且对每个用户都是私有的?如果网站/网络应用程序变得非常受欢迎,那么需要如何改变需求/技术?



感谢任何输入!

I want to make a text based MMORPG in C# and ASP .NET. The game will involve constant, continuous updates for example the character/skill experience a player has. My question is, how would I store/update those skill experience variables?

Would I update the SQL Server database every single time a change is made to the "experience points" variables or would I only update the database at certain time intervals? What state management would be best to store such data that is continously updating and is private to each user? How might the requirements/techniques need to be changed if the website/web application becomes extremely popular with heavy traffic?

Thanks for any input!

推荐答案

取决于您可用的硬件以及您将拥有的用户数量。



您*可以*有一个层位于你的应用程序和数据库之间,它存储某些事物inproc并及时更新数据库,但我个人总是在发生更改时更新数据库,存储在RAM中是危险的,就像你的应用程序崩溃未提交的更改一样不会在那里。



对于高周转率的应用程序,我通常会在它意外发生的时候INSERT UPDATE或DELETE,然后CACHE READ'',最小化数据库的读取。
Depends on the hardware you have available, and the number of users you are going to have.

You *could* have a layer sitting in-between your app and db which stores certain things inproc and updates the db on a timely basis, but personally I would always update the DB when a change occurs, storing in RAM is dangerous as if your application crashes uncommitted changes wouldn''t be there.

For high turnover applications I usually INSERT UPDATE or DELETE exactly when it is meant to happen, and then CACHE the READ''s, to minimise the reads from the database.


这篇关于ASP .NET Web应用程序如何处理持续的用户请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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