实施极重计算的最佳方法? [英] Best way to implement extremely heavy calculation?

查看:61
本文介绍了实施极重计算的最佳方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我有一个C#应用程序运行相对复杂的模拟

,在典型的计算机上,这可能需要10秒钟。我现在想要将这个应用程序移植到ASP.NET上,所以很明显这需要在客户端进行
计算。什么是实现这个的最佳方式?


更多信息 - 运行它所需的所有代码都位于

在3或4 C#dll'中如此高级别我只需在web表单上查看用户

输入并设置将在
$ b上运行的模拟$ b客户端然后让ASP.NET页面获取输出并相应地显示

结果。


现在最有效的方法是什么在客户端运行?如果

我只是在我的项目中包含这些类,那么它将在

服务器上运行。我是否将其打包到一个ActiveX控件中,并将

部署到客户端?我不希望代码可见(我认为使用客户端脚本语言排除规则)并且我不希望
希望用户能够重用这个组件在他们自己的

应用程序中。运行起来应该很简单(所以除了单击ok提示符之外没有客户端配置
配置)并且理想情况下在任何最近的浏览器上运行

尽管我怀疑这最后一个选项不会是

可行。


任何帮助都将不胜感激,


Roy

Hello,

I have a C# application that runs a relatively complex simulation
which, on a typical computer, could take up to 10 seconds. I am now
trying to port this application over to ASP.NET so obviously this
calculation needs to happen on the client. What is the best way to
implement this?

Some more information - all of the code needed to run this is located
in 3 or 4 C# dll''s so at a high level I would simply look at the user
inputs on the web form and setup the simulation which would run on the
client and then have the ASP.NET page take the output and display the
results accordingly.

Now what is the most effective way to make this run on the client? If
I just include the classes in my project then it will run on the
server. Do I package this up into an ActiveX control that gets
deployed to the client? I do not want the code to be viewable (which I
think rules out using a client side scripting language) and I would not
want the user to be able to reuse this component in their own
application. It should be simple to run (so no client side
configuration beyond clicking on an "ok" prompt) and ideally would run
on any recent browser although I suspect that this last option won''t be
doable.

Any help would be appreciated,

Roy

推荐答案

我不知道你为什么说显然这个计算需要在
$ b $上发生b客户因为从你的帖子中看出为什么必须在

客户端上进行是不明显的,除非它是你觉得需要的计算负荷本身这是(b) case我会开始考虑每个用户可能经常进行模拟的频率,以及你可能需要多少用户给你一个

的指示你可能需要的服务器。


但是假设你*需要在客户端上做...你可能希望阅读

up在智能客户端上,看看是否能为您提供任何帮助。


Kevin


" roygon" < RO **** @ gmail.com>在消息中写道

news:11 ********************** @ g10g2000cwb.googlegr oups.com ...
I''m not sure why you say "obviously this calculation needs to happen on the
client" because it''s not obvious from your post why it must be done on the
client, unless it is the computational load itself that you feel demands
this (in which case I''d be starting to think about how often each user might
be doing the simulation, and how many users you might have to give you an
indication of how beefy a server you might need).

But assuming you *do* need to do it on the client... you might wish to read
up on Smart Clients and see if that provides any help to you.

Kevin

"roygon" <ro****@gmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
你好,

我有一个C#应用程序运行一个相对复杂的模拟
,在典型的计算机上,可能需要10秒钟。我现在正在尝试将此应用程序移植到ASP.NET,所以很明显这个计算需要在客户端上进行。实现这个目标的最佳方法是什么?

更多信息 - 运行它所需的所有代码都位于3或4个C#dll中,所以高级别我只需查看Web表单上的用户输入并设置将在
客户端上运行的模拟,然后让ASP.NET页面获取输出并显示
相应的结果。

现在在客户端运行这个运行的最有效方法是什么?如果
我只是在我的项目中包含这些类,那么它将在
服务器上运行。我是否将其打包成一个部署到客户端的ActiveX控件?我不希望代码可见(我认为使用客户端脚本语言排除规则)并且我不希望用户能够在他们自己的
申请。运行应该很简单(所以没有客户端配置,除了点击确定提示),理想情况下会在任何最近的浏览器上运行
,尽管我怀疑最后一个选项不会是
可行。

任何帮助将不胜感激,

Roy
Hello,

I have a C# application that runs a relatively complex simulation
which, on a typical computer, could take up to 10 seconds. I am now
trying to port this application over to ASP.NET so obviously this
calculation needs to happen on the client. What is the best way to
implement this?

Some more information - all of the code needed to run this is located
in 3 or 4 C# dll''s so at a high level I would simply look at the user
inputs on the web form and setup the simulation which would run on the
client and then have the ASP.NET page take the output and display the
results accordingly.

Now what is the most effective way to make this run on the client? If
I just include the classes in my project then it will run on the
server. Do I package this up into an ActiveX control that gets
deployed to the client? I do not want the code to be viewable (which I
think rules out using a client side scripting language) and I would not
want the user to be able to reuse this component in their own
application. It should be simple to run (so no client side
configuration beyond clicking on an "ok" prompt) and ideally would run
on any recent browser although I suspect that this last option won''t be
doable.

Any help would be appreciated,

Roy



谢谢响应。或许明显地根据描述,这不是正确的

措辞。 10秒的计算时间基本上是100%的CPU使用率,并且每秒会有很多请求
秒。此外,服务器资源是一种约束。因此,对于

的讨论,让我们说在

服务器上运行此计算不是一种选择。


我已经简要地研究过智能客户,但是从我看到的那些来看,

并没有达到我想要的效果。我已经有了一个windows

客户端,所以对于那些愿意下载应用程序的人来说,我已经有了一个好的,有效的解决方案。我想要这个网页
基于
的实现是广泛的访问,没有软件下载/

安装。几乎我所有的.NET开发都在传统的客户端应用程序上,所以我不完全了解我的所有

选项。

我想我有三个选择,但我不确定这是否正确,如果我完全理解其含义,那么




1)用Java构建应用程序 - 我相信通过这样做,用户可以在浏览器中下载应用程序,并在自己的PC上执行

相应的代码,而不会暴露代码本身。

虽然对我来说会有一点学习曲线,因为我的
只有极少的java经验,我不相信我能够使用

我的C#组件虽然我可能在这里错了。


2)使用Atlas - 不知道这是否是一个选项,但似乎有

可能是一些设施在客户端运行相当复杂的代码

通过Atlas应用程序。


3)构建proc将代码嵌入到

页面上的ActiveX组件中


有没有人对我认为我的选项以及如何获得反馈

有效他们可能也有,我错过了任何明显的选择吗?


谢谢,


Roy
Thanks for the response. Perhaps "obviously" was not the correct
wording given the description. The ten seconds of computing time is
essentially at 100% CPU usage and there will be many requests per
second. Additionally, server resources are a constraint. So, for the
sake of discussion, let''s say that running this calculation on the
server is not an option.

I have briefly looked into smart clients but from what I have seen it
does not achieve what I am looking for. I already have a windows
client so for those people willing to download the application I
already have a good, working solution. What I wanted for this web
based implementation was broad access without a software download /
installation. Almost all of my .NET development has been on
traditional client applications so I''m not fully aware of all of my
options.

I think I have three options but I am not sure if this is correct and
if I fully understand the implications.

1) Build the app in Java - I believe that by doing this the user would
essentally download the app within the browser and execute the
appropriate code on their own PC without exposing the code itself.
There would be a bit of a learning curve though for me here since I
have minimal java experience and I don''t believe I will be able to use
my C# components although I could be wrong here.

2) Use Atlas - no idea if this is an option but it seems like there
might be some facilities to run fairly complex code on the client side
through an Atlas application.

3) Build the processing code into ActiveX components that are hosted on
the page

Does anyone have feedback on what I think my options are and how
effective they might be and also, have I missed any obvious choices?

Thanks,

Roy


好吧,如果你使用Atlas我相信你的计算仍将在

服务器端运行,因为atlas是.NET的AJAX实现。

我认为你的选项是activex,java applets,或者在

javascript类中公开源代码。你也可以使用你想要隐藏的东西组合

来自用户和你可以在客户端做的事情,所以你的cpu

ussage将是客户端和服务器。这有意义吗?


alex。


" roygon" < RO **** @ gmail.com>在消息中写道

news:11 ********************** @ e56g2000cwe.googlegr oups.com ...
Well if you use Atlas I believe your calculations will still be runing in
server side since atlas is an AJAX implementation for .NET.
I think your optionas are activex, java applets, or exposing the source in a
javascript class. You also can use a combination of things you want to hide
from the user and things you can do in the client side things, so your cpu
ussage will be diveiden between client and server. does that makes sense?

alex.

"roygon" <ro****@gmail.com> wrote in message
news:11**********************@e56g2000cwe.googlegr oups.com...
感谢您的回复。或许明显地根据描述,这不是正确的措辞。十秒的计算时间基本上是100%的CPU使用率,每秒钟会有很多请求。此外,服务器资源是一种约束。所以,为了讨论的缘故,让我们说在
服务器上运行这个计算不是一种选择。

我简要介绍过智能客户,但是从我所看到的
没有实现我想要的。我已经有了一个windows
客户端,所以对于那些愿意下载应用程序的人来说,我已经有了一个好的,有效的解决方案。我想要的这个基于web的实现是广泛的访问,没有软件下载/
安装。几乎我所有的.NET开发都在传统的客户端应用程序上,所以我不完全了解我的所有选项。

我想我有三个选择但是如果我完全理解其含义,我不确定这是否正确。

1)用Java构建应用程序 - 我相信用户会这样做在浏览器中下载应用程序并在自己的PC上执行相应的代码,而不会暴露代码本身。
虽然对我来说有一点学习曲线因为我有最小的java经验,我不相信我能够使用我的C#组件虽然我在这里可能是错的。

2)使用Atlas - 不知道这是否是一个选项但是似乎有一些设施可以在客户端通过Atlas应用程序运行相当复杂的代码。

3)将处理代码构建到托管的ActiveX组件中在页面上
有没有人反馈我认为我的选择是什么以及它们可能有多有效,而且,我是否错过了任何明显的选择?

谢谢,

Roy
Thanks for the response. Perhaps "obviously" was not the correct
wording given the description. The ten seconds of computing time is
essentially at 100% CPU usage and there will be many requests per
second. Additionally, server resources are a constraint. So, for the
sake of discussion, let''s say that running this calculation on the
server is not an option.

I have briefly looked into smart clients but from what I have seen it
does not achieve what I am looking for. I already have a windows
client so for those people willing to download the application I
already have a good, working solution. What I wanted for this web
based implementation was broad access without a software download /
installation. Almost all of my .NET development has been on
traditional client applications so I''m not fully aware of all of my
options.

I think I have three options but I am not sure if this is correct and
if I fully understand the implications.

1) Build the app in Java - I believe that by doing this the user would
essentally download the app within the browser and execute the
appropriate code on their own PC without exposing the code itself.
There would be a bit of a learning curve though for me here since I
have minimal java experience and I don''t believe I will be able to use
my C# components although I could be wrong here.

2) Use Atlas - no idea if this is an option but it seems like there
might be some facilities to run fairly complex code on the client side
through an Atlas application.

3) Build the processing code into ActiveX components that are hosted on
the page

Does anyone have feedback on what I think my options are and how
effective they might be and also, have I missed any obvious choices?

Thanks,

Roy



这篇关于实施极重计算的最佳方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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