如何在保持相同性能的同时将winform应用程序转换为Web应用程序。 [英] How can we convert winform application to webapplication while keeping same performance.

查看:117
本文介绍了如何在保持相同性能的同时将winform应用程序转换为Web应用程序。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发Windows窗体应用程序,一切都运行良好。没有管理层决定将此应用程序迁移到Web应用程序(使用MVC框架的单页)。在Windows应用程序中,我们有一个称为生成的过程,此过程需要大约40个输入集并生成所选日期范围的数据。



目前生成1个月数据大约需要12-15秒。由于这个过程,我们不确定我们是否可以实际迁移它。因为我们怎样才能在Windows中获得与Web相同的性能。



有关生成过程的详细信息:

此过程正在进行中一个用户每天激活20次,我们已经有400个用户(因为这是针对不同团队的内部项目)。



当用户点击生成按钮时,我们从DataBase获取数据(我们无法缓存它,因为每分钟数据都会被更改)并将其传递给生成过程。然后,此过程循环选择日期范围并生成一天数据,并将此集添加到最终输出集。这个生成过程如果充满了OOP概念。



问题:

怎么说100个用户一次触发生成过程,包括winform应用程序每个请​​求都将在用户的计算机上执行,但在webapplictaion中,所有100个请求将在一个服务器中执行,因此会降低应用程序性能。



有没有办法如此我们可以获得与winform应用程序相同的性能吗?我们可以在任何支持这种OOP概念的JS中编写这个生成过程吗?或者我们可以直接使用现有的代码吗?



我尝试过:



我试图用现有的输入集(40)在Angular中编写简单的代码。一直以来浏览器都被绞死了,原始进程无法以角度写入,因为原始进程充满了集之间的引用。

We are working on windows form application and everything is working good. No management decided to migrate this application to Web Application (Single page using MVC framework). In windows application we have a process called generation, this process needs around 40 input sets and generate data for selected date range.

Currently it takes around 12-15 seconds to generate 1 months data. Because of this process only we are not sure whether we can actually migrate it or not. Because how can we get the same performance in Web that we have in Windows.

Details about the generation process:
This process is being triggered on an avrage 20 times a day by one user and we've aorund 400 users (as this is in house project for different team).

When an user hits generation button, we get the data from DataBase (we can't cache it because in every minute data gets changed) and pass it to generation process. Then this process loop oved selected date ranges and generate one day data and add this set to final output set. This generation process if full of OOP concepts.

Problem:
What is say 100 users triggers generation process at once, inc ase of winform applictaion each request will get execute in user's machine but in webapplictaion all 100 request will get executed in one server, so it's degrade the application performance.

Is there any way so taht we can get the same kind of performance as we have in winform application? Can we write this generation process in any JS that supports this kind of OOP concepts or we can directly use existing code?

What I have tried:

I've tried to write simple code in Angular with existing input set (40). All the time browser's getting hanged also, original process can't be written in angular as original process is full of references between sets.

推荐答案

正如Garth所说,这个在这种情况下,您的数据处理引擎与Web和Windows窗体应用程序完全分离。我可能会将包含所有必需输入数据的作业提交到消息队列中,并在后端有多个服务器从此队列中拉出作业进行处理。结果将被发布到专门用于结果的消息队列。



使用此设置,您可以拥有任意数量的不同应用程序类型,Windows窗体,WPF,Web,移动, ...,提交工作而不用担心处理的实施。您可以在所有应用程序中一致地获得相同的处理引擎,而无需一遍又一遍地编写相同的代码。



将处理引擎放在云中,如Azure,您可以根据需要旋转按需处理引擎机器,以便在工作负载减少时处理增加的工作负载和关闭。
As Garth has said, this is a case where you have your data processing engine completely separate from your Web and Windows Forms applications. I would probably submit jobs with all required input data into a message queue and have multiple servers on the back end pulling jobs from this queue to process. Results would get posted to a message queue specifically for results.

With this setup you can have any number of different application types, Windows Forms, WPF, Web, mobile, ..., submitting jobs without any of them worry about the implementation of the processing. You get the same processing engine consistently across all applications without writing the same code over and over again.

Put the processing engine in the cloud, like Azure, and you can have on-demand processing engine machines spun up as needed to handle an increasing job load and shutdown when then job load decreases.


这篇关于如何在保持相同性能的同时将winform应用程序转换为Web应用程序。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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