Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,

i am new in signalR , i have tried and learn from different web sites like github and etc etc

But i couldn't find the solution for my problem.... and now i am getting confused...

My problem is:

I have developed a Chat app in Winform with Web Services and Centralized Database and it is working fine in different countries as in different branches of one organization.

But i want to convert that Chat App into SignalR to achieve more efficiency but i couldn't understand , how to do it in SignalR. because All tutorials of SignalR on Web in one Solution.

like Web , Console or WinRT communicated with each other but they are in one solution but in my scenerio i cannot put the service or Web Page in WinForm application.



Please please help me out in this manner.
Posted
Updated 9-Dec-13 7:11am
v2
Comments
Sergey Alexandrovich Kryukov 9-Dec-13 12:10pm    
As SignalR is a library for ASP.NET, I feel that you might need to create something analogous for desktop applications. You can learn how SignalR works, in particular, how server push is implemented and use the knowledge in your own framework, no more than that.

Besides, you might want to replace your Web services with some more flexible custom service, to ease up the problems of push technology, because HTTP was not originally well designed for such purposes. You may face one problem: firewalls, so you would need to use HTTP, maybe as a tunnel.

In shorter words, I would find some solution which would take a lot of labor, but hardly an easy workaround. I would be surprised and happy to see if someone can suggest something easier.

—SA
Arslan Elahi 9-Dec-13 13:13pm    
I have googled alot and saw so many tutorials but couldn't find my desired logic ... i am stuck in it.. if you can help me via giving some links or etc it will be definitely appreciated

1 solution

Please see my comment to the question.

First of all, some background. Let's understand that we have "inverted" problem: the problem of server push is a problem for Web application and not such a big problems if you deal with custom network application. This is because the Web was designed for much simpler application than those being developed these days. The Web was focused on pure client-server model supporting only pull technology, but not push technology. Please see:
http://en.wikipedia.org/wiki/Client-server_model[^],
http://en.wikipedia.org/wiki/Push_technology[^],
http://en.wikipedia.org/wiki/Pull_technology[^].

The problem is rather social and historical. When networking was about to make its way to the wide public markets, even the client-server technology was perceived as revolutionary by many naive users and engineers, despite its draconian limitations which I, for example, was able to see immediately. More advanced models like published-subscriber, along with such a basic technology as multithreading (these days :-)), was ofter considered overly complex and sophisticated (but I would never understand why):
http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern[^].

As a result, server push is difficult for the Web, and SignalR is only one of possible workarounds. Actually, the problem of creation of the decent chat application, so usual these days, reveal those draconian limitations of the client-server model.

But you are moving out of the Web, and this is technically much more easier, because you are not tied that badly by those Web standards. The only problem is: the most programming efforts are focused on the Web these days, by some reasons (again, social, but most serious reason is the platform independence of Web technologies, another one is the firewall hassles, another absurdity of modern technology), so the ready-to-use frameworks for custom networking are less popular and hence harder to find. That explains you difficulties in finding some ready-to-use solution. What to do: search wider?

I actually remembered one more idea: you can move to techniques based on XMPP protocol (formerly Jabber). Please see:
http://en.wikipedia.org/wiki/XMPP[^],
http://en.wikipedia.org/wiki/Jabber.org[^],
http://xmpp.org/[^],
http://archive.jabber.org/userguide/[^].

The benefits are: this is a well-establish technology, which supports near real-time (http://en.wikipedia.org/wiki/Near_real-time[^]), published-subscriber, instant messaging and other important features. It has a whole open-source "Jabber community", and you can find both server and client implementations for different platforms.

Please see, for example, this CodeProject article: Google Chat Desktop Application using Jabber.Net[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900