Ideal way for implementing server side of push notification using .Net [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
In One of my web application, I need to push ToDo type of information on server database, to the client as push notification. What will be the efficient way of invoking a push notification call. Should it be a standalone Windows service that can track the data in the database, every few minutes and invoke the Push notification call via GCM or APNS. or is there any other better way of doing this.
The application can run on both internet or intranet environment. This is not an event based notification, The data in the database need to monitor frequently and invoke the push notification service if required.

Universal answer: It depends...
Do you have any mechanisms that can detect when it is time to send the push notification? Like a message that gets dropped in a queue, a file that gets created, an event triggered from a SQL Server Broker, etc. ?
If the answer is YES, then you probably should use this mechanism to trigger sending your push notification.
If the answer is NO, then you probably will end up with a Windows Service that queries a database (or some other store) every few seconds/minutes/hours

Related

Azure Container Apps and Google Pub/Sub [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 days ago.
Improve this question
I am creating a single Azure Container App that will need to run whenever there is a new message in a Pub/Sub subscription.
I am a little confused as to how I will set up the Container App to process the messages.
In Azure Functions, "the platform" is responsible for invoking my Function. I simply need to specify the trigger. So for instance, if I wanted to have the Function run whenever there was a message in Service Bus, it was the platform that was subscribed to the topic and would invoke my function, passing in the payload as a parameter to my Function, whenever it received a new message.
I do not know if similar functionality is available or if I have to create my app as a BackgroundService and subscribe to receive each message.
To add to my confusing: KEDA. It seems like this is what is responsible to scaling out the number of instances, but I don't think it works like Functions where it would pass in the payload as a parameter.
Finally, Pub/Sub also has Push delivery, which means I should be able to stand up an HTTP endpoint and have the messages sent there.

Event scheduler notification [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am working on code to send an sms to customer one week before their subscription reach expiration date. I absolutely don't know how to proceed. I am coding in asp.net c# and sql server.
Create one console Application which will take user whos expiration comes in week, Then write code to fetch the user with there numbers. Then use any third party Api to send sms. you have to send parameters to this Api with your appropriate message.
Then create one job inside sql server which will run everyday which will execute your Console Application code to send SMS.
I would say, separate out publishing and subscription tasks. So in future you can do more with such customers.
Prepare a Publisher which looks for such customers and adds a task to Queue.
Write a Subscriber who watch outs for new queue items and take action.
So in future if you want to make multiple way of communicating to customer like, email then you just need to add more subscriber.
Host your logic as a .NET windows or IIS service.
Benefit: Publisher can independently perform addition.
Subscriber performs task as soon it sees something in queue.

c# notify a running process [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Is it possible to somehow notify a running process from the "outside"?
I have a C# program that theoretical runs forever. And I would like to notify it to trigger some action manually. It would be best, if this solution is possible on Windows and Linux (mono).
EDIT:
The solution should work without a user interface
My program is, as for now, a part of web service. On initializing, a new Theread is created, which uses the Task class to stay alive
Take your forever-running-process and let it provide a webservice other processes can call.
You might use any cross-plattform webservice framework like WebApi or ServiceStack to achieve this via HTTP calls. This will even work over the internet (if the machines can reach each other).
There are dozens of approaches. You could also use named pipes for example, or put commands into a database (the other process has to query regularly) or - if you're fearless enough - write/read files to communicate. Be creative ...

Distributed Winforms application [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am looking to change the current architecture of distributed winforms application developed using TCP messages and the client talks to database directly. I know this a bad design and I am entrusted to change this. I have been recruited for the same.
Bit of Overview:
Client uses Winforms applications
Client loads the initial data from database directly
Clients listens to the Server (Winforms application with TCP listener)
If an update is made in an any of the entity, client will update the database directly and sends the message to server, which in turn send the information to other clients. Then these clients would refresh the data from database
Technologies Used: VB.NET, Entity framework, Oracle Database and TCP Listener.
I need all your advise about what would be best solution/architecture for the same. I thinking about using WCF with duplex communications for messages.
Thank you in advance for your replies.
Use a simple WinForms (or WPF if you can) client, WCF server, EntityFramework for ORM and Oracle for DB.
The client calls the server. the server uses EF to call the DB. This 3 tier design is pretty common and basic. What's wrong with it?
PS: I would recommend against using duplex communication because it's over complicated and doesn't always work. What is your specific need for it?

Email Newsletter [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am working on a newsletter. Newsletter content is saved in the table along with frequency such monthly, weekly, daily. Newsletter also have start date. What I have to do is based on the data and frequency. Newsletters are emailed to all the subscribers. My confusion is that whether I need to write a sql server job for this or simply asp.net can do this. If yes then how would I be able to do this.
As your web application will be terminated in times of inactivity, you usually have a service or task scheduler run such periodical tasks. Also your web application is responsible to return requests quickly and should run with a very limited set of permissions that might not be enough for your jobs (it is preferable not to allow the app pool account to send e-mails to lots of accounts).
There are various alternatives that differ in terms of convenience and deployment of your application.
An important requirement besides the capability to run jobs periodically is how you can trace errors in the job, so you should think about your logging strategy before the first problems arise.
Besides writing a SQL Server job, you could also:
Create a console application and use Windows task scheduler to run it periodically (interval is the minimum of your scheduling options, in your question daily). This is easy to implement, but requires some steps to deploy it to a computer.
Create a dedicated windows service that is installed to the computer. While this requires more effort to create and test the service, you can also create an installer to simplify the deployment.
I eventually went for the application events. I set the timer in application event and it works similar like jobs and windows services.

Categories

Resources