简体   繁体   English

Laravel 发送通知至 C# 申请

[英]Laravel Send a Notification to C# Application

I am looking to create some sort of a function that would send Laravel notifications to C# application.我正在寻找创建某种类型的 function,它将向 C# 应用程序发送 Laravel 通知。 The idea is that whenever a user purchases someone, an administrator is then notified by receiving a notification through a C# application that they would run on their PC.这个想法是,每当用户购买某人时,管理员就会通过 C# 应用程序收到通知,通知他们将在他们的 PC 上运行。 However, at the moment the only way I can think of is by creating a listening server in C# and then just send the data via sockets through PHP. Is there anything else that would be considered a better approach?但是,目前我能想到的唯一方法是在 C# 中创建一个监听服务器,然后通过 sockets 到 PHP 发送数据。还有什么可以被认为是更好的方法吗?

Kind Regards, George亲切的问候,乔治

You can build an event-driven system.您可以构建一个事件驱动的系统。 Your Laravel application will be producer which responsible for send events, and C# application will be consumer.您的 Laravel 应用程序将成为负责发送事件的生产者,而 C# 应用程序将成为消费者。 There are lots of options to do it.有很多选择可以做到这一点。

I would like to recommend AWS SQS .我想推荐AWS SQS Also, you can easily create a Lambda, then you can add your newest queue as a trigger.此外,您可以轻松创建一个 Lambda,然后您可以将最新的队列添加为触发器。 When you do this, you will have a serverless architecture, and you won't worry about the scaling part, AWS handles these stuffs.当你这样做时,你将拥有一个无服务器架构,你不必担心扩展部分,AWS 会处理这些事情。 Also, you can check this .另外,你可以检查这个 It can be a good start point to meet serverless architecture.它可以是满足无服务器架构的一个很好的起点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM