如何创建自动化过程以及手动过程 [英] How to create automation process as well as mannual process

查看:90
本文介绍了如何创建自动化过程以及手动过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



i希望创建WCF服务,其中我有两个方法,我希望自动(连续调度程序)运行并从xml获取数据文件和我希望的第二种方法可以由某些网站手动调用,意味着如果某些网站要求一些数据可以调用手动方法,但其他方法继续运行,我该如何创建这种类型的WCF服务以及如何部署该方法。



或建议我这样做的最佳方法,意味着一种方法继续运行,其他方法将由任何网站手动调用



谢谢我提前

Hi All,

i want to create WCF service in which i have two method one method i want that automatically(continuously like schedular) running and get data from xml files, and second method i want that could be manually call by some website,means if some website ask for some data it can call manual method,but other method keep running, how can i Create such type of WCF service and how to deploy that.

or Suggest me the best way to do that,,means one method keep running and other method would be manually call by any website

Thanks i advance

推荐答案

这个想法听起来真的很糟糕。这被称为拉技术或轮询,同时非常低效且无响应。你真的需要建立适当的架构。显然,如果XML发生了变化,就会触发它。此事件应用于通知WCF服务。通过这种方式,该服务将发挥其自然作用,不会进行不自然的轮询。



参见:

http://en.wikipedia.org/wiki/Pull_technology [ ^ ],

http ://en.wikipedia.org/wiki/Push_technology [ ^ ]。



另见我过去的答案:网站帐户的应用程序'仪表板 [ ^ ]。



如果你提供足够的细节,也许我可以提供模式详细的建议e。



-SA
The idea sounds really bad. This is called pull technology or polling, very inefficient and non-responsive at the same time. You really need to get to making proper architecture. Apparently, if XML has changed, something triggers it. This event should be used to notify the WCF service. This way, the service would play its natural role and won't do unnatural polling.

See also:
http://en.wikipedia.org/wiki/Pull_technology[^],
http://en.wikipedia.org/wiki/Push_technology[^].

See also my past answer: Application 'dashboard' for website accounts[^].

If you provide adequate level of detail, perhaps I could provide mode detailed advice.

—SA


使用WCF的方式确实很糟糕。 SA是对的。解决您的问题的一种方法可能是:

*构建一个单独的应用程序(通过批处理文件触发的Windows服务或控制台应用程序),它将读取XML文件并更新数据库。

*构建一个WCF服务(手动方法),它读取数据库并向WCF服务提供其他网站请求。
using WCF the way you mentioned is indeed bad. SA is correct. One approach to address your issue could be like :
* Build a separate application (either windows service or console application triggered via Batch file) which will read XML files and update Database.
* Build a WCF Service (Manual Method) which read the database and serve other website requests to your WCF Service.


这篇关于如何创建自动化过程以及手动过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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