Real-time messages notifications with WPF + WCF - wpf

Hey I'm trying to upgrade notifications service that uses task polling to see if there are new messages for a given interval.
My client is a WPF application and WCF in the server side.
I have 2 application servers with windows server 2008 r2 and load balancer between them.
I thought of implementing it with WCF Duplex binding and noticed it will be a problem to manage my users in 2 service instances (since I can subscribe user only to 1 service).
The trigger for sending messages is when data is manipulated by a user and is related to other specific users.
Another important point is that we plan to scrap our wpf application and revise our front end as web project (with angularjs probably..) and our backend from wcf to .net web api.
I read a bit about push techniques and came to this conclusion:
SignalR - the thing is, how will it work with web? (angular.js instead of asp.net)
Wamp - didnt find much about it but it looks promising
Websockets
.NET implementation (requires IIS 8 which means upgrading our servers)
socket.io - simple and great documentation and community. but I'm not familiar with nodejs.
What are your thoughts about how to implement it?
Thanks, Bar

Related

What's the best way to send event notifications from a Winforms server application to a Blazor client application?

A few years ago I was instructed to build an Windows Desktop application to control several devices, add and check data from a local database among other stuff. At the time the answer was very simple and I decided to create a WinForms application that provided a solution to the request, the app would control the devices, it would store data in a local database and it would show the data in it's UI.
Even though it worked perfectly for a while, the project has now expanded a lot, to the point were it consists in several projects including two REST API services working on different servers as windows services, a Xamarin Android and iOS apps that access those servers and some other stuffs. Obviously, my dicision of not separating the original Winforms server application's UI from the server stuffs has kick me in the rear. Another problem is that the solution has been working for a long time and the client does not want to give me much time for updating (which by the way it would probably require to rethink everything) so he want me to give him a fast and simple solution to the problematic server - client scheme.
So again I decided to try a fast solution (probably not the right one, but its a matter of time) and created a Blazor app that connects to the local database and it would work in the same server where the winforms app is, guaranteeing that none one will touch that app.
The problem now is that I need a way to show real time notifications in the blazor web UI and update its datagrids, etc., when the winforms app receive an event from one of the devices. At first I thought of SignalR, being the blazor app the server for SignalR and the winforms just a client, but I have no experience with it. Although if SignalR is the answer I'll deal with it.
So, the question is: which is the best way to send real-time event notifications from a winforms application to a blazor app?
Thanks in advance

What technology to deploy RESTful Server with SQL+COM capability

We're developing a cloud based web application for customer management. One of the main goals i the capability to connect to different local applications on the customer endpoint.
As example, we don't want to have a customer database in out application, the customer should be able to search within his local ERP system right away.
What we need is not much. Only a client on the customers server with access to the local SQL server as well as the COM model.
But as webdevelopers and mainly going with PHP the question came up, what technology we should use?
I've got two approaches in mind:
NodeJS
Lightweight, Javascript and with the Express and winole32 extension we should have everything we need. But the deployment and installation as a service seems to be a bit wacky.
C# .Net Web API
Also a good approach I guess since the client servers are allways windows. But is there a way without IIS?
Or do you have something completely different in mind? It should be very fast and compact. So its basically just a RESTservice that can be deployed with ease.
Thanks for your inputs and thoughts.
C# .Net Web API Also a good approach I guess since the client servers are
allways windows. But is there a way without IIS
It is called OWIN and it is properly documented (web api self host is a good keyword) and works like a charm. Using that on various services to expose an API into the service.

Architecture for mobile application

Right now ,i and my friend looking forward to make a mobile application, which is going to get data from several different sources, analyze it with some kind of algorythm and make the best decision on that. The main problem is - right architecture for that. We consider that mobile application is going to be just a client, representing data placed somewhere on internet (anyway internet is required).
Can u help us with making right choice?
We have some kind of knowledge about client-server architecture with sockets... But this is definetly not we need in this particular situation.
Our thought is to make a web site which is going to generate all the required data.After that implement mobile apps which will represent info from website, using convenient interface. Is it right way?
Yes, that's the way to go.
Now, you have several options within that architecture...
server gets data from several different sources
server might expose some kind of RESTful API to the client apps
clients can be native mobile applications or client might be html5 mobile apps
depending on the nature of the data, you might want to consider some kinds of caching data that you get from 3rd party services/sources
EDIT:
I use ASP WebApi to build REST Api that serves json data to android mobile app.
So, my infrastructure is:
- MS SQL 2012
- ASP MVC 4, WebAPI
- android mobiles (we're targeting mainly Jelly Bean & Kit Kat)
I've built n-layered application with layers (bottom up order):
- DAL (i don't use any ORM framework...i use my own repository that runs stored procedures on SQL server)
Repository that wraps around db DAL and a few Service Agents that gets data from 3rd party services we use
Business layer where i do our business operations
Service layer (for now, it has no special use but afterwards i might need it as my business layer will be consumed from a few clients: WebAPI, web site, windows service...)
WebAPI for REST where mobile client requests end up

WPF Client on Windows + WebService on a Linux server

Currently I am developing a WPF application which will handle alot on the client (non business logic that is).
Some data (the business logic) will be coming from a SQL database. To expose this data to the client I was thinking to create a WebService. Normally I would use a WCF Service (or Web Api) to fix this. But in this scenario, there is only a linux server available using a MySQL database, on this server I am unable to host a WCF Service.
I was wondering how I could implement the following:
Users opening the WPF client need to authenticate to the MySQL database.
Users logged in should retrieve some of their personal data coming from the MySQL database.
Which kind of Webservice or technology is the best to go for?
Thanks
You can build a web service in any language, so it comes down to which ones you're comfortable with, or which offer the best tools. If you or your team are already heavily invested in the Microsoft stack, you could try something like Monodevelop: http://monodevelop.com/

Send simple data from wp7 to winforms application

I want to send simple data (geolocation data to be precise) from Windows Phone 7 application to a windows forms application and use it, as I'm a total beginner in this field I don't know which tools to use.
I searched about wcf services and tested this method but there's some issues: the data is sent from the phone application but isn't sent to the winforms application (guess something is missing)
If your know how to do this in a quick way, or have good tutorials I'll be thankful.
EDIT
I found this tutorial, it show how to connect directly wp7 application and desktop application without using sockets neither wcf service, I'm wondering if it is really works if the application isn't in localhost.
the like for the tutorial: wp7 tutorial
I had a similar problem and so I created a REST/JSON WCF service hosted in IIS with AppHarbor to provide the data. There's hundreds of ways to do it (Ruby/Heroku, etc..), but that particular one fits well within the Microsoft stack. I also needed to share route data and I used the WCF service to wrap the BingMaps services so that route computations are cached and shared. Considering that I had already created a local model, moving it out of my phone project into a service took less than a few hours (including the usual config hiccups, and forgetting to add the appharbor user to my bitbucket repo).
Consuming the service from WinForms (or any client) shouldn't be an issue as the service knows nothing about the client implementation.
Here's a tutorial from code project. REST WCF Service with JSON
I think you would need to implement some sort of server side solution which you could upload to on your Windows Phone and download from on your Windows Form application. This could be achieved using a WCF service which was connected to a server side database.
Another option would be to use sockets and communicate directly with your WinForms application. Check this tutorial on how to use basic sockets on WP7.

Resources