服务器中有新文件和共享文件时推送通知 [英] Push Notifications When There is new File and Share File in server

查看:98
本文介绍了服务器中有新文件和共享文件时推送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,



我有一个案例,像这样:

我有2台服务器,服务器A和服务器B,

我的商店中的服务器从应用程序A上传结果数据文件,

如何这样我可以从服务器B /应用程序B下载它。



不使用FTP或共享文件夹术语,



我怎样才能知道是否存在新文件的方式在服务器A上是应用程序上传的结果A.

使用Microsoft Dotnet技术的课程。



非常感谢他的关注,

任何形式的建议,推荐和意见都非常感谢。

greetings advance。

dear all,

I have a case, like this:
I have 2 servers, the server A and server B,
A server in my store the result data file upload from application A,
How do it so I can download it from the server B / Applications B.

without using FTP or shared folders term,

and how can I find out if the way there is a new file on the Server A is the result of the application upload A.
course using Microsoft Dotnet technology.

thanks so much for his attention,
any form of advice, referral and opinions greatly appreciated.
greetings advance.

推荐答案

建立同步基于SignalR为您的两台服务器提供服务。 (假设您运行在IIS之上)每个服务器都应该公开另一个服务器可以注册的同步端点。 (并确保端点仅接受来自其他服务器的连接以用于安全目的)当文件上载到一个服务器时,另一个服务器通过SignalR得到通知。然后,该服务器可以从其双胞胎请求该文件。当然,不要将通知发送回第二个新文件的第一个服务器,否则你将把服务器放在一个循环中。



你可以通过Google SignalR或在CP上找到关于如何在IIS上运行的ASP.NET中使用它的文章。它通过Web套接字为这种类型的场景提供了一个回调系统。
Build a sync service for your two servers based on SignalR. (Assuming you are running on top of IIS) Each server should expose a sync endpoint which the other server can register with. (And make sure the endpoints will only accept connections from your other server(s) for security purposes) When a file is uploaded to one server, the other one is notified of that via SignalR. That server can then request the file from its twin. Of course, don't send out the notification back to the first server of the new file on the second one or you will put the servers in a loop.

You can Google SignalR or find articles here on CP on how to use it in ASP.NET running on IIS. It provides a callback system via web sockets for just this type of scenario.


这篇关于服务器中有新文件和共享文件时推送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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