Click here to Skip to main content
15,892,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,
i want to create a solution for my graduate work but i need some start hints.

My major point is how to create a service runing on an application which shares mrthods for other apps. Users can view the server values through read only methods, ang change "x","y" values through single-call methods.

All objects are created on a serv machine, usrs has only limited access to it's values.

I already know how to set a service and change values on usr apps.

As i immagine it would look like:
(of course there can be more usrs)


________      ________
|      |      |      |
| usr1 |      | usr2 |
|______|      |______|
    \           /
     \         /
      _________
      |       |
      | serv  |
      |_______|


1. I'd like to use WCF and Windows Forms.
2. Each of usr or serv works on a remote machine.


Serv:
* For example a few int values, each one in an other ticker (for example interval=100ms)
*
int value1=0;
int value2=0;
ticker1
{
value1+=x;
}

ticker2
{
value2+=y;
}


*Serv app contains "start" and "stop" buttons for start or stop the hosting services.
*Serc app can do everything that usrs can (changing values, etc)

usrs:
*User app has a view on a value1,2 ... n (for example labels).
*Each user has a ticker that refreshes the values (i don't know if thats a good way to create a 5 secound ticker to refresh values? if there is a way to refresh it instantly?)
*Users has a possibility to change the value of "x" or "y". for example text box.


ps. i know some of WCF bindings, contracts etc.. i already have whole coulorful idea i just need a good start point to not start everything all over later.


guys:
Maybe You could share with me Yours points of view for my solution. If my post is not clear or understandable please notify me of it. I'll try to explain it as good as i can.

Cheers
Posted
Updated 17-Jul-11 6:56am
v2
Comments
Mark Salsbery 17-Jul-11 17:58pm    
Your "problem" is just basic client/server applications. WCF can make this real simple - Visual Studio and WCF will do most of the work. Use one of the duplex bindings to get your ticker functionality.

1 solution

The question is too general, and the specific detail does not go beyond the very usual uses of WCF. So, to help you one would need to understand what are your difficulties.

I can only give very general recommendations:

Use self-hosting WCF hosted on the server. This is the simplest and most adequate way of WCF hosting in your case. There are plenty of simple code samples everywhere.

Learn how to use Service Contract. Start with simplest code samples.

See:
http://msdn.microsoft.com/en-us/library/ms734712.aspx[^],
http://msdn.microsoft.com/en-us/library/ms733070.aspx[^],
http://msdn.microsoft.com/en-us/library/ms734686.aspx[^].

Code samples in the MSDN articles referenced above will help you to get started. You can ask some further questions if you face any problems. We would gladly try to help you out.

Good luck,
—SA
 
Share this answer
 
Comments
Espen Harlinn 17-Jul-11 15:50pm    
Certainly the most important place to start, a 5+ as usual :)
Sergey Alexandrovich Kryukov 17-Jul-11 22:47pm    
Thank you, Espen.
--SA
Jazzhoo 17-Jul-11 18:30pm    
thanks, i'll read this carefully and drop a line of my progress :)
Sergey Alexandrovich Kryukov 17-Jul-11 22:47pm    
You're welcome. Please do.
Good luck, call again.
--SA
thatraja 17-Jul-11 21:03pm    
5!

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