可重入(?)控制台应用程序.... [英] Reentrant (?) Console Application....

查看:84
本文介绍了可重入(?)控制台应用程序....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一种方法让我的控制台应用程序保持运行并能够随时使用某些参数调用
,执行它的工作,然后等待

再次调用,重复。


这里有详细信息:


我有一个使用的C#引擎运行大量复杂的财务计算并根据计算结果返回报告。我的

程序是由另一个程序调用的......让我们只是称它为MasterApp

我将调用我的程序Calc。 Calc是控制台应用程序exe。


这里是基本过程:

1.用户将一些数据输入MasterApp。

2.用户点击告诉MasterAppGo。

3. MasterApp写出一个xml文件,然后启动Calc.exe

4. Calc读取xml以创建它理解的输入

(那里有一些翻译)。

5. Calc调用它自己的一些dll(C# )等,翻译

输入。

6.胆量 calc.exe(被调用的dll)获取输入,

获取所需数据,计算并返回报告。

7.报告写入一个指定为paramlter的目录

calc.exe调用。

8. Calc关闭。

9. MasterApp等待Calc.exe关闭,然后将报告显示给用户



这里真正的问题是性能。加载

每次运行所需的所有内容(JIT等)和

然后将所有内容关闭每次用户运行报告。一旦系统第一次运行,我就会以某种方式支付
,因为它保留在内存中,以便用户不会遇到加载时滞

单次运行报告。


注意,将程序集加载到GAC似乎没有帮助。


我会继续前行并道歉,因为我不确定我是否使用正确的术语描述我正在尝试的问题


解决。


提前感谢您提供的任何帮助/建议。


- Carl

I need a way for my console application to stay running and be able to
be called at any time with some parameters, do it''s work, then wait to
be called again, repeat.

Here''s the details:

I have a C# engine that''s used to run a lot of complex financial
calculations and return a report based upon the calculated results. My
program is called by another program... let''s just call it "MasterApp"
and i''ll call my program "Calc". Calc is the console app exe.

Here''s the basic process:
1. User inputs some data into MasterApp.
2. User clicks tells MasterApp to "Go".
3. MasterApp writes out an xml file, then launches "Calc.exe"
4. Calc reads the xml to create the inputs that it understands
(there''s some translation there).
5. Calc calls some of it''s own dlls (C#), etc. with the translated
inputs.
6. The "guts" of calc.exe (the dlls which are called) take the inputs,
pull the data it needs, calculates and returns a report.
7. The report is written to a directory specified as a paramater to
the calc.exe call.
8. Calc closes.
9. MasterApp waits for Calc.exe to close, then displays the report to
the user.

The real issue here is performance. It''s taking way too long to load
everything that''s need into memory to run each time (JIT, etc.) and
then close everything back down EVERY time the user runs a report. I''d
like somehow, once the system is run the first time, for it to stay in
memory so that the user does not experience the load time lag every
single time they run a report.

As a note, loading the assemblies into the GAC doesn''t appear to help.

I''ll go ahead and apologize up front, because I am not certain that i''m
using the correct terminology to describe the issue i''m trying to
resolve.

Thanks in advance for any help/advice you can give.

- Carl

推荐答案

我不确定我是否理解这里的建筑选择...


是否需要将calc.exe作为命令窗口应用程序?

你不能将你的业务逻辑(iecalc.exe)打包到一个dll中并打电话给

a web服务,或作为COM +应用程序包等。

-

在舌头和笔的所有单词中,最悲伤的是:它本来可能是


Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk

" ca ****** @ gmail.com"写道:
I''m not sure I understand the choice of architecture here ...

Is there a NEED for calc.exe to be a command window application?
Can''t you package your business logic (i.e.calc.exe) in a dll and call from
a web service, or package as a COM+ application, etc.
--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"ca******@gmail.com" wrote:
我需要一种方法让我的控制台应用程序保持运行并能够随时使用一些参数调用,做它的工作,然后等待再次调用,重复一遍。

这里有详细信息:

我有一个C#引擎,用于运行大量的复杂的财务计算并根据计算结果返回报告。我的
程序被另一个程序调用...让我们称之为MasterApp
我将称我的程序为Calc。 Calc是控制台app exe。

这里是基本过程:
1.用户将一些数据输入MasterApp。
2.用户点击告诉MasterAppGo ;。
3. MasterApp写出一个xml文件,然后启动Calc.exe。
4. Calc读取xml以创建它理解的输入
(有一些那里翻译。
5. Calc用它翻译的
输入调用它自己的dll(C#)等。
6.胆量。 calc.exe(被调用的dll)获取输入,拉取所需的数据,计算并返回报告。
7.报告被写入指定为<的参数的目录。 gr.exe调用。
8. Calc关闭。
9. MasterApp等待Calc.exe关闭,然后将报告显示给用户。
<这里真正的问题是性能。这需要花费太长的时间才能将所有需要的内容加载到内存中以便每次运行(JIT等),然后在用户运行报告时关闭所有内容。一旦系统第一次运行,我会不知何故,因为它留在内存中,这样用户每次运行时都不会遇到加载时间延迟报告。

作为一个说明,将程序集加载到GAC似乎没有帮助。

我会继续前进道歉,因为我我不确定我是否使用正确的术语来描述我正在努力解决的问题。

提前感谢您提供任何帮助/建议给予。

- 卡尔
I need a way for my console application to stay running and be able to
be called at any time with some parameters, do it''s work, then wait to
be called again, repeat.

Here''s the details:

I have a C# engine that''s used to run a lot of complex financial
calculations and return a report based upon the calculated results. My
program is called by another program... let''s just call it "MasterApp"
and i''ll call my program "Calc". Calc is the console app exe.

Here''s the basic process:
1. User inputs some data into MasterApp.
2. User clicks tells MasterApp to "Go".
3. MasterApp writes out an xml file, then launches "Calc.exe"
4. Calc reads the xml to create the inputs that it understands
(there''s some translation there).
5. Calc calls some of it''s own dlls (C#), etc. with the translated
inputs.
6. The "guts" of calc.exe (the dlls which are called) take the inputs,
pull the data it needs, calculates and returns a report.
7. The report is written to a directory specified as a paramater to
the calc.exe call.
8. Calc closes.
9. MasterApp waits for Calc.exe to close, then displays the report to
the user.

The real issue here is performance. It''s taking way too long to load
everything that''s need into memory to run each time (JIT, etc.) and
then close everything back down EVERY time the user runs a report. I''d
like somehow, once the system is run the first time, for it to stay in
memory so that the user does not experience the load time lag every
single time they run a report.

As a note, loading the assemblies into the GAC doesn''t appear to help.

I''ll go ahead and apologize up front, because I am not certain that i''m
using the correct terminology to describe the issue i''m trying to
resolve.

Thanks in advance for any help/advice you can give.

- Carl



我不确定我是否理解这里的建筑选择。 。


是否需要将calc.exe作为命令窗口应用程序?

你不能打包业务逻辑(iecalc.exe) )在一个DLL和来自

a网络服务的电话,或作为COM +应用程序包等等。

-

舌头的所有单词和笔,最悲伤的是:它ight已经


Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk

" ca ****** @ gmail.com"写道:
I''m not sure I understand the choice of architecture here ...

Is there a NEED for calc.exe to be a command window application?
Can''t you package your business logic (i.e.calc.exe) in a dll and call from
a web service, or package as a COM+ application, etc.
--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"ca******@gmail.com" wrote:
我需要一种方法让我的控制台应用程序保持运行并能够随时使用一些参数调用,做它的工作,然后等待再次调用,重复一遍。

这里有详细信息:

我有一个C#引擎,用于运行大量的复杂的财务计算并根据计算结果返回报告。我的
程序被另一个程序调用...让我们称之为MasterApp
我将称我的程序为Calc。 Calc是控制台app exe。

这里是基本过程:
1.用户将一些数据输入MasterApp。
2.用户点击告诉MasterAppGo ;。
3. MasterApp写出一个xml文件,然后启动Calc.exe。
4. Calc读取xml以创建它理解的输入
(有一些那里翻译。
5. Calc用它翻译的
输入调用它自己的dll(C#)等。
6.胆量。 calc.exe(被调用的dll)获取输入,拉取所需的数据,计算并返回报告。
7.报告被写入指定为<的参数的目录。 gr.exe调用。
8. Calc关闭。
9. MasterApp等待Calc.exe关闭,然后将报告显示给用户。
<这里真正的问题是性能。这需要花费太长的时间才能将所有需要的内容加载到内存中以便每次运行(JIT等),然后在用户运行报告时关闭所有内容。一旦系统第一次运行,我会不知何故,因为它留在内存中,这样用户每次运行时都不会遇到加载时间延迟报告。

作为一个说明,将程序集加载到GAC似乎没有帮助。

我会继续前进道歉,因为我我不确定我是否使用正确的术语来描述我正在努力解决的问题。

提前感谢您提供任何帮助/建议给予。

- 卡尔
I need a way for my console application to stay running and be able to
be called at any time with some parameters, do it''s work, then wait to
be called again, repeat.

Here''s the details:

I have a C# engine that''s used to run a lot of complex financial
calculations and return a report based upon the calculated results. My
program is called by another program... let''s just call it "MasterApp"
and i''ll call my program "Calc". Calc is the console app exe.

Here''s the basic process:
1. User inputs some data into MasterApp.
2. User clicks tells MasterApp to "Go".
3. MasterApp writes out an xml file, then launches "Calc.exe"
4. Calc reads the xml to create the inputs that it understands
(there''s some translation there).
5. Calc calls some of it''s own dlls (C#), etc. with the translated
inputs.
6. The "guts" of calc.exe (the dlls which are called) take the inputs,
pull the data it needs, calculates and returns a report.
7. The report is written to a directory specified as a paramater to
the calc.exe call.
8. Calc closes.
9. MasterApp waits for Calc.exe to close, then displays the report to
the user.

The real issue here is performance. It''s taking way too long to load
everything that''s need into memory to run each time (JIT, etc.) and
then close everything back down EVERY time the user runs a report. I''d
like somehow, once the system is run the first time, for it to stay in
memory so that the user does not experience the load time lag every
single time they run a report.

As a note, loading the assemblies into the GAC doesn''t appear to help.

I''ll go ahead and apologize up front, because I am not certain that i''m
using the correct terminology to describe the issue i''m trying to
resolve.

Thanks in advance for any help/advice you can give.

- Carl



对不起,我应该澄清一点...... br />

Calc.exe实际上是我们现有核心业务和

计算逻辑的包装器(存在于一系列C#dll组件中)。


整个东西是一个独立的桌面应用程序,所以一个Web服务

是行不通的。我们所有的代码都是C#,所以我不确定如何使用COM +

应用程序。


MasterApp程序只会与之通信一个exe。 MasterApp

将其输出写入目录,使用几个

命令行参数调用calc.exe(其输出位置等),然后等待

calc.exe退出。


我希望我已经回答了你的问题。


我非常感谢你的回复。

- 卡尔。

Sorry, I should have clarified things a little better....

Calc.exe is really a wrapper around our existing core business and
calculations logic (which exists in a series of C# dll assemblies).

The whole thing is a stand alone desktop application, so a web service
wouldn''t work. All of our code is C#, so i''m not sure how/if a COM+
app would work.

The MasterApp program will only communicate with an exe. MasterApp
writes its output to a directory, calls calc.exe with a couple of
command line parameters (location of its output, etc), then waits for
calc.exe to exit.

I hope i''ve answered your questions.

I great appreciate your response.
- Carl.


这篇关于可重入(?)控制台应用程序....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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