简体   繁体   English

分布式应用程序中的决策

[英]Decision making in distributed applications

With a distributed application, where you have lots of clients and one main server, should you: 对于具有许多客户端和一个主服务器的分布式应用程序,您应该:

  • Make the clients dumb and the server smart: clients are fast and non-invasive. 使客户端变得愚蠢,服务器变得聪明:客户端快速且无创。 Business rules are needed in only 1 place 仅在1个地方需要业务规则
  • Make the clients smart and the server dumb: take as much load as possible off of the server 使客户端变得聪明,服务器变得愚蠢:从服务器上获得尽可能多的负载

Additional info: 附加信息:

  • Clients collect tons of data about the computer they are on. 客户收集有关他们所使用的计算机的大量数据。 The server must analyze all of this info to determine the health of these computers 服务器必须分析所有这些信息以确定这些计算机的运行状况
  • The owners of the client computers are temperamental and will shut down the clients if the client starts to consume too many resources (thus negating the purpose of the distributed app in helping diagnose problems) 客户端计算机的拥有者是脾气暴躁的人,如果客户端开始消耗过多资源,它们将关闭客户端(因此否定了分布式应用程序在帮助诊断问题方面的作用)

You should do as much client-side processing as possible. 您应该尽可能多地进行客户端处理。 This will enable your application to scale better than doing processing server-side. 这将使您的应用程序比在服务器端进行处理更好地扩展。 To solve your temperamental user problem, you could look into making your client processes run at a very low priority so there's no noticeable decrease in performance on the part of the user. 为了解决您的脾气暴躁的用户问题,您可以考虑使客户端进程以非常低的优先级运行,因此用户方面的性能不会显着下降。

In a client-server setting, if you care about security, you should always program on the assumption that the client may have been compromised. 在客户端-服务器设置中,如果您关心安全性,则应始终在假定客户端可能已受到威胁的情况下进行编程。 Even if it hasn't, there is always the risk of somebody using an old version of the client, using a competing or modified version of the client, or just of the net connection being a bit screwy. 即使没有,也总是存在有人使用旧版本的客户端,使用竞争版本或修改版本的客户端,或者只是网络连接有点麻烦的风险。

So while you do as much work on the client as possible, processing and marshalling information into the right form, the server then needs to do a thorough sanity check on anything the client gives it. 因此,当您在客户端上进行尽可能多的工作,将信息处理和整理为正确的形式时,服务器随后需要对客户端提供的所有内容进行彻底的完整性检查。

So the answer I guess is "both". 所以我猜答案是“两者”。

The server must analyze all of this info to determine the health of these computers 服务器必须分析所有这些信息以确定这些计算机的运行状况

That is probably the biggest clue so far explaning what your application is kinda about. 到目前为止,这可能是解释您的应用程序的最大线索。 Are you able to provide a more elaborate briefing on what this application is seeking to achieve in this distributed environment? 您是否能够提供有关此应用程序在此分布式环境中要实现的目标的详细说明? We do not even know if the client-side processing is disk I/O or processor intensive. 我们甚至不知道客户端处理是磁盘I / O还是处理器密集型。 How you design the solution is dependent on the nature of what needs to be done to help the users/business accomplish their jobs and objectives. 解决方案的设计方式取决于需要采取何种措施来帮助用户/企业完成其工作和目标。

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

相关问题 分布式计算应用 - Distributed Computing applications 分布式时间同步和Web应用程序 - Distributed time synchronization and web applications 用于JBoss /分布式应用程序的JDBC Profiler - JDBC Profiler for JBoss / Distributed Applications 在分布式环境中模拟多个策略决策点(PDP) - Simulating multiple Policy Decision Points (PDPs) in distributed environment 对于使用ASIO与MPI的分布式应用程序? - For distributed applications, which to use, ASIO vs. MPI? 您能推荐使用大数据量使用WPF开发分布式应用程序的最佳做法吗? - Could you recommend best practices for developing distributed applications using WPF over a large data volume? 是否可以有两个应用程序在分布式事务中使用相同的数据库而无需实现资源管理器? - Is it possible to have two applications that use the same databases in a distributed transaction without having to implement a resource manager? 寻找有关分布式应用程序和消息传递的Java最佳实践建议 - Looking for some Java good practice advice regarding distributed applications and message passing Dask Distributed - 如何为每个工作人员运行一个任务,使该任务在所有可用的核心上运行? - Dask Distributed - how to run one task per worker, making that task running on all cores available into the worker? 分布式电源集 - Distributed Powerset
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM