网络服务 [英] Network services

查看:118
本文介绍了网络服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能在全局服务器上实现几种方法,以便我可以从网络或网络中的任何应用程序中使用它们?这些方法将获取参数并返回结果.我希望这些方法(或服务..?)像Windows服务一样工作-只要Windows正在运行就在后台运行,或者可以在需要时手动启动它们.是否可以使这种服务在网络中可见?
我该怎么办?我需要使用什么工具?

谢谢!

解决方案

好,您也可以使用WebService.
是的,您可以设置一个Windows服务,该服务允许通过TCP/IP套接字,WCF或其他任何方式进行连接.到那时,您可以使服务在远程计算机上执行任何您想执行的操作.


这取决于您要对服务执行的操作

您可以在Windows服务中公开功能,并使用基于TCP的二进制远程处理从客户端使用该功能.这是我们在较旧的系统上使用的东西,但它非常成功&性能极好.

这对于局域网上的内部用户"来说很好,但是您不会将其暴露给Internet

如果您希望任何地方的任何客户端都可以使用您的功能-那么Web服务可能是实现此目标的方法

本文相当不错,并且比较了不同的方法. (它的日期为2003年-但是这些概念仍然有效,即使它们已被WCF等取代)

http://www.developer.com/net/net/article.php/2201701/NET-Remoting-Versus-Web-Services.htm [ http://www.developer.com/img/articles/2003/05/06/Thiru/Remote4.jpg [ ^ ]

请注意,内部用户和互联网用户"如何使用相同的代码,只是通过包装Web服务将其暴露给互联网用户


Is there any possibilty to implement a couple of methods on a global server so that I could use them from any application in the network or from the web? These methods will get parameters and return results. I wish that these methods (or services..?) work like a windows service - run in the background as long as Windows is running, or they can be started manually when required. It is possible to make that kind of service visible in network?
How can I do that and what tools will I need to use?

Thank you!

解决方案

Well, you could also use WebService.
It will be easier to setup.


Yeah, you can set up a windows service that allows connections via TCP/IP sockets, WCF, or whatever. At that point, you can make the service do anything you want on the remote machine.


It depends what you want to do with the service

You could expose functionality in a windows service and consume that from your clients using binary remoting over TCP. This is something we use on an older system, but it''s been very successful & performance is excellent.

This would be fine for ''internal users on a LAN'', but you wouldn''t expose this to the internet

If you want your functionality to be consumed by any client, anywhere - then a web service is probably the way to go

This article is pretty good and compares the different approaches. (It''s dated now - 2003 - but the concepts are still valid even if they''ve been superseded by WCF etc)

http://www.developer.com/net/net/article.php/2201701/NET-Remoting-Versus-Web-Services.htm[^]

I quite like this diagram at the end

http://www.developer.com/img/articles/2003/05/06/Thiru/Remote4.jpg[^]

Notice how both the internal and ''internet users'' consume the same code, it''s just it''s exposed to internet users by wrapping in a web service


这篇关于网络服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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