I've created an application using SignalR to send notifications to machines.
Now, if the machine is online, notification is being sent. But if machine is offline, it just gets dropped and won't be sent again.
I am wondering if Azure Service Bus can be used for this purpose wherein such notifications which are dropped from offline machines can be stored in Azure Service Bus and then later on when machine comes online then it will receive this notifications.
Is something like this possible? Or any other approach which can be used for this purpose?
Yes, service bus is one of the possible solutions as Service Bus is used to decouple applications and acts as messaging broker where if receiver application is done then still the sender application can send the message to the service bus. Once your receiver application is up now, they can start receiving the message. To learn more about service bus and its features you start with this document.
Related
I am using Java 17 with the Azure SDK "applicationinsights-agent-3.3.1.jar" to connect all the microservices to "Azure Application Insights".
I am using com.azure:azure-messaging-servicebus:7.8.0
The configuration seems correct since I am able to spot each microservice in the application insights view and can see the interconnections between them in the "Application Map".
The Azure Service Bus Queue is also working as expected. (I can see the app logs and the queue monitoring on the Azure Service Bus view)
What is missing, are the arrows pointing to My "Service Bus Queue" and the queue part on the End-to-end transaction (Operation ID chaining) view.
I am expecting something like that:
Also:
Here: https://learn.microsoft.com/en-us/azure/azure-monitor/app/java-in-process-agent#azure-sdks
We can see that "Telemetry emitted by these Azure SDKs is automatically collected by default ... Azure Service Bus 7.1.0+"
But here:
https://learn.microsoft.com/en-us/azure/azure-monitor/app/correlation#telemetry-correlation-in-java
"Kafka, RabbitMQ, and Azure Service Bus isn't supported in the SDK."
Thank you!
I am creating a web app. I want to create a listening service (TCP) that listens continuously and updates web page according to that.
A Windows service or a WCF service?
At the end I just want a background service that listens on a socket continuously and update data in database. and when database is updated I will use signal r to show that in my page.
Right now I am trying with WCF but I am wondering if it can be done with Windows service also. And right now this application will work on LAN. But in the future, it can also be in the cloud.
First of all, it is important to understand that a Windows service and a WCF service are not the same.
A Windows service is a specialized executable that runs in the background on Windows.
A WCF service is a specialized piece of code that exposes some functionality through a well-defined endpoint. It does not run on its own, but instead must be hosted by some parent process, like IIS, a desktop application, or even a Windows service.
In thinking about the problem you've described, I suppose the most fundamental question to ask is whether or not you have control over the data that will be received via the TCP connection. WCF is built on the notion of the ABCs (Address, Binding, and Contract), all of which have to match in order to facilitate data exchange between WCF endpoints. For example, if you wish to expose a WCF endpoint via IIS that accepts TCP connections from some remote WCF endpoint, the remote WCF endpoint needs to send data to your IIS-hosted WCF endpoint using the agreed-upon data contract. Absent that, WCF will not work. So, if you cannot define the data contract to be used between WCF endpoints, then you'll need to find another option. An option that will work is to open a TCP listener within a Windows service, process the data as it is received, update your database, and listen for more data.
================================================
By way of example, I work on a project that has a front-end desktop application that communicates with a back-end Windows service. We build both the application and the Windows service, so we have full control over the data exchange between the two processes. At one point in time, we used WCF as the mechanism for data exchange. The Windows service would host a WCF service that exposed a NetNamedPipeBinding, which we later on changed to NetTcpBinding to get around some system administration issues. The application would then create its own endpoint to communicate with the WCF service being hosted within the Windows service.
This worked fine.
As our system got more mature, we needed to start sending more and more information from the Windows service to the application. If I recall correctly, I believe we experimented with streaming within WCF and concluded that the overhead was not something we could tolerate. So, we used WCF to exchange commands and status information between the application and the Windows service, but we simultaneously used a TCP socket connection to stream the data from the Windows service to the application.
This worked fine.
When we got a chance to update the Windows service software, we decided that it would be better to have a single communication mechanism between the Windows service and the application. So, we replaced WCF altogether with a TCP socket connection that uses a homegrown messaging protocol to exchange information in both directions - application to Windows service and Windows service to application.
This works fine and is the approach we've used for a couple of years now.
HTH
An endpoint connect to the Kaa server and subscribe some topics.
In normal condition, KaaClient's unsubscribeFromTopic() & stop() method will be called before disconnect the Kaa server.
In some cases, the endpoint maybe disconnect the Kaa server suddenly and won't re-connect to Kaa server immediately (ex: loss power...).
If an endpoint disconnect the Kaa server without call the unsubscribeFromTopic() & stop() method, the resource will still be occupied??
If yes, the Kaa server has heart-rate mechanism for all endpoints??
Will Kaa server kick off one endpoint automatically if it can detect the endpoint has disconnected exceed over a period time??
Short answer is yes, Kaa will free resources once no active connections are present. There is a ping-pong mechanism to track session inactivity. Inactivity timeout that will be used is configurable. See this configuration file for more details.
Extended answer: Kaa uses actor system based on Akka framework to handle endpoint requests/sessions. Each Endpoint has associated Endpoint Actor (actually, there are at least two of them, one on the node that handles endpoint session and one global actor for particular endpoint in the Kaa cluster). This actors schedule timeouts once no active sessions is available.
Every major service in OpenStack has an API service as endpoint for clients to access, eg. openstack-nova-api, openstack-glance-api etc. But for every major service, there are other minor services like openstack-nova-scheduler, openstack-nova-conductor etc. these services are suggested to be deployed on other nodes rather the node where API service is running to get some kind of isolation.
My question is how openstack-nova-api knows where the real services(openstack-nova-scheduler/openstack-nova-conductor) are running, how they communicate with other? When openstack-nova-api got a new request, how does it distribute it to the real services which can process and send back the results?
Internal communication between OpenStack modules is done through the AMQP message queue, typically managed by RabbitMQ.
I need to build service send/receive sms by asp.net. I find out some website or company provider that service. But it's not properly for my job. My problems are: how do i build my own service to do that? what i need to do? SMS gateway is a solution?
You may need the following.
Web service to allow other application to send their messages along
with the destination number. Which would put the message in database.
Windows application could be a windows service to get the messages
from database and send them using attached gsm modem. This
codeproject article gives you idea to start communication
with gsm modems using serial port.