HighTechTalks DotNet Forums  

Re: .NET and multithread networks server application

Dotnet Framework (Performance) microsoft.public.dotnet.framework.performance


Discuss Re: .NET and multithread networks server application in the Dotnet Framework (Performance) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
David Browne
 
Posts: n/a

Default Re: .NET and multithread networks server application - 12-15-2006 , 11:37 AM








"Cube" <SiliconJaltz05 (AT) yahoo (DOT) com> wrote

Quote:
Hi,

I have developed large multithreaded network application using Win32
and Winsock in the past connecting to an SQL db.

How fast and robost is .NET 2.0 for creating a similar application?

I need to create an client and server application. The client
application consists of C# Window.form controls which connects to a
database. But I need the client to connect to a server application, and
the server will control access to the database as well as report other
live information.

Is C# and .NET suitable for handling the server application? It needs
to scale to handle many many connections on multiple threads.

Also the Client C# application binds to a database, but now it needs to
connect to a server application and then to the database. Do I need to
create wrapper classes for my data and perform serialization ? or is
there some other approach in .NET?


You want to build a client/server application. Yes C# and .NET are very well
suited to that.

This is a very straightforward and common type of application to build in
..NET. Typically you don't code directly against TCP/IP sockets, rather use
one of a few frameworks that work at a higher level and handle the plumbing
for you.

The best and most robust of these is the new Windows Communication
Foundation (WCF) in .NET 3.0.

Windows Communication Foundation
http://msdn2.microsoft.com/en-us/library/ms735119.aspx


Other good options are Web Services
http://msdn.microsoft.com/webservices/default.aspx

and .NET Remoting.
http://msdn.microsoft.com/webservice...g/default.aspx

All of these are substantially simpler than coding TCP/IP and provide simple
mechanisms to call methods and marshal objects across networks. Of course
..NET also has easy access to TCP/IP sockets so if you really want to write
code at that level, you can.

David



Reply With Quote
  #2  
Old   
David Browne
 
Posts: n/a

Default Re: .NET and multithread networks server application - 12-20-2006 , 12:22 AM








"Cube" <SiliconJaltz05 (AT) yahoo (DOT) com> wrote

Quote:
The best and most robust of these is the new Windows Communication
Foundation (WCF) in .NET 3.0.

Windows Communication Foundation
http://msdn2.microsoft.com/en-us/library/ms735119.aspx



isnt that vista only?
Windows XP SP2, Windows Server 2003 and Vista. The .NET 3.0 Runtime ships
on vista, and is available as a free download for XP SP2 and Server 2003.

Quote:
Other good options are Web Services
http://msdn.microsoft.com/webservices/default.aspx

and .NET Remoting.
http://msdn.microsoft.com/webservice...g/default.aspx


Remoting may be interesting we have just had a play with it, security
looks like an issue.

Why?

Quote:
All of these are substantially simpler than coding TCP/IP and provide
simple
mechanisms to call methods and marshal objects across networks. Of
course
.NET also has easy access to TCP/IP sockets so if you really want to
write
code at that level, you can.


We may just do that, it what we did in win32, however if Remoting will
handle alot of the plumbing we need we will use it.
Remoting is much easier and basically as fast as raw sockets. But using
Binary Serialization together with TCP/IP sockets in .NET is not really
difficult. It's just that Web Services, Remoting and WCF are all easier and
more interoperable.

David



Reply With Quote
  #3  
Old   
David Browne
 
Posts: n/a

Default Re: .NET and multithread networks server application - 12-20-2006 , 02:13 PM





"Cube" <SiliconJaltz05 (AT) yahoo (DOT) com> wrote

Quote:
The best and most robust of these is the new Windows Communication
Foundation (WCF) in .NET 3.0.

Windows Communication Foundation
http://msdn2.microsoft.com/en-us/library/ms735119.aspx

isnt that vista only?

Windows XP SP2, Windows Server 2003 and Vista. The .NET 3.0 Runtime
ships
on vista, and is available as a free download for XP SP2 and Server 2003.


No Win2k support?



Remoting may be interesting we have just had a play with it, security
looks like an issue.


Why?


our current system uses our own authentication system, a database table
for storing user/pass info for connecting clients, is this still
possible with .Remoting?

Does Remoting support a database table for storing user/pass info? hash
pass?
Algortithm choices?



Remoting is much easier and basically as fast as raw sockets. But using
Binary Serialization together with TCP/IP sockets in .NET is not really
difficult. It's just that Web Services, Remoting and WCF are all easier
and
more interoperable.

Great, but you have ruled out windows 2000 users with .NET 3
Might be able to live with that.
Will have a look at WCF.

WCF has a very extensible model for security, so you should be able to
plug-in your own stuff without owning 100% of the communication plumbing.

Quote:
Isnt .net3 still in beta? where is the sdk for it?

No it's released.

Microsoft .NET Framework 3.0 Redistributable Package
http://www.microsoft.com/downloads/d...displaylang=en

Microsoft® Windows® Software Development Kit for Windows VistaT and .NET
Framework 3.0 Runtime Components
http://www.microsoft.com/downloads/d...displaylang=en

David







Reply With Quote
  #4  
Old   
David Browne
 
Posts: n/a

Default Re: .NET and multithread networks server application - 12-20-2006 , 11:49 PM



System requirements are on the download page.

http://www.microsoft.com/downloads/d...n#Requirements

"Cube" <SiliconJaltz05 (AT) yahoo (DOT) com> wrote

Quote:
Microsoft® Windows® Software Development Kit for Windows VistaT and .NET
Framework 3.0 Runtime Components
http://www.microsoft.com/downloads/d...displaylang=en
Will the SDK work on XP?



Reply With Quote
  #5  
Old   
Ciaran O''''Donnell
 
Posts: n/a

Default Re: .NET and multithread networks server application - 01-02-2007 , 05:15 AM



Remoting isnt as fast as real raw sockets but you do get a lot with it.
Remoting isnt just about sending an object down a wire but about getting
remote object references so you can grab a reference to an object that is
running on another machine and you can call methods on it will run on the
remote machine and return the results to the client.

The fastest way to communicate I believe is to setup a tcpclient and
tcplistner to get a socket to socket connection. Then spit bytes down the
wire by serializing things writing raw bytes.

Also, WCF with binary serialization is faster than remoting as the protocal
has been streamlined.

--
Ciaran O'Donnell
http://wannabedeveloper.spaces.live.com


"David Browne" wrote:

Quote:

"Cube" <SiliconJaltz05 (AT) yahoo (DOT) com> wrote in message
news:1166591494.747347.29570 (AT) i12g2000cwa (DOT) googlegroups.com...

The best and most robust of these is the new Windows Communication
Foundation (WCF) in .NET 3.0.

Windows Communication Foundation
http://msdn2.microsoft.com/en-us/library/ms735119.aspx



isnt that vista only?

Windows XP SP2, Windows Server 2003 and Vista. The .NET 3.0 Runtime ships
on vista, and is available as a free download for XP SP2 and Server 2003.


Other good options are Web Services
http://msdn.microsoft.com/webservices/default.aspx

and .NET Remoting.
http://msdn.microsoft.com/webservice...g/default.aspx


Remoting may be interesting we have just had a play with it, security
looks like an issue.


Why?

All of these are substantially simpler than coding TCP/IP and provide
simple
mechanisms to call methods and marshal objects across networks. Of
course
.NET also has easy access to TCP/IP sockets so if you really want to
write
code at that level, you can.


We may just do that, it what we did in win32, however if Remoting will
handle alot of the plumbing we need we will use it.

Remoting is much easier and basically as fast as raw sockets. But using
Binary Serialization together with TCP/IP sockets in .NET is not really
difficult. It's just that Web Services, Remoting and WCF are all easier and
more interoperable.

David



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.