silverlight app realtime update design - winforms

I have a winform app, which takes live image from an ip camera, and detect vehicle license plate number from the image. Now i want to make a silverlight app which can connect to my winform app or some kind of service app, and the silverlight app gets updated whenever a new license plate number is detected, what service/architect should i use to make this possible?
Thanks for you advice.

Your going to need the following...
An IIS server that exposes a WCF service. Your Silverlight application can be running in any browser in any location and from time to time it needs to poll for new data by making a request to the WCF service asking for the latest updates. Your WinForm application can send new data to the WCF service whenever it has new data. The WCF service running in IIS acts as the buffer that caches the incoming updates from your WinForms application that passes it back to any number of Silverlight clients that request the latest data.

Related

Real-time messages notifications with WPF + WCF

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

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.

WCF and multiple clients

I have a WCF hosted in IIS, at the same time I have two clients, a WPF application and a Window Phone Application. My program work in the way that, the Window Phone Application will send a Message to the WCF and then the WCF will send it to the WPF application. How can I achieve it?
I have take a look at callback, but I believe what it does is to return a message back to the Window Phone Application after the Phone Application consume the WCF service. But what I want my program to do is to send the Msg from the Phone App to the WPF application instead.
please guide me. Thank you!
I would probably do it this way:
inside the WPF application, host a second WCF service to receive that message - your WPF application becomes a WCF server
when a message comes in from the Windows Phone into your WCF service in IIS, that service class then becomes a WCF client to the WPF app and send that message onwards to the other WCF service
Callback won't work - since callback can only call back to the original caller (your Windows Phone, here) and that's not what you want.

How does my WCF Service communicates with my Winforms App Client?

I am currently developing a C# Windows Form Application that I intend to let it interact with a server. The server will receive posting from a mobile application that I have developed and whenever a posting is received, my Windows Form Application should be notified and give me a notification.
E.g. My mobile application sends an message over to my server. Once my server receives the message, my windows form application should display a new notification showing the content of the message received
The WCF Service has been done up in a seperate project file as I need the client to connect to the Service instead of hosting the service in my client project file. What I would like to ask is how does the service communicates directly with my winform app? Such as updating the UI of my winform app everytime a alert is received.
It sounds like you are looking for a Publish Subscribe Framework. This will have your windows forms application act as a client to the server to subscribe for notifications, then act as a server to receive notifications as the mobile application posts come in.

Intercommunication between two .Net Applications using WCF service

I have a WPF application. On the same machine I have a console application.From this console application i want to see if user has successfully logged in and a particular page is open in WPF application. If this is the case then i want to show a popup in WPF application.
To implement this I Thought of using WCF services. I have got 2 options. Create a seperate WCF service and run it as soon as WPF application runs and then ask the client application to communicate.
Second option is to host the WCF service inside the WPF application and run it when WPF application starts.
I am not able to decide on which way to choose. If anyone of u has implemented this kind of setup before,please share your ideas.
Because you want to see if a page is open in the WPF application, I'd suggest hosting the WCF service in the WPF application (i.e., using the ServicHost class). Then have the console application consume the service to determine the page status as per your requirement.
Also, use the NetNamedPipeBinding (http://msdn.microsoft.com/en-us/library/system.servicemodel.netnamedpipebinding.aspx).

Resources