Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Distributed Applications / May 2004

Tip: Looking for answers? Try searching our database.

When To Use .NET Remoting?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hendry - 21 May 2004 09:26 GMT
Hi

Currently I've build a database application (WinForm) using 3 tier technique. All the DataAccess and BusinessLogic Layer resides on user's PC. I'm now going to learn .NET Remoting and have a plan to modify my application to use Remoting, but what's the advantage of Remoting? Is there any perfomance benefit if I use .NET Remoting

Thanks for any suggestion

Hendry
Elp - 21 May 2004 14:40 GMT
> Hi,
>
> Currently I've build a database application (WinForm) using 3 tier technique. All the DataAccess and BusinessLogic Layer resides on user's PC.
I'm now going to learn .NET Remoting and have a plan to modify my
application to use Remoting, but what's the advantage of Remoting? Is there
any perfomance benefit if I use .NET Remoting?

I don't know the exact specifications of your project. So i can't tell you
for sure what is the best for you. However, it seems to me that a web
service approach would be the best for you here. As i understand, a client
application on the user's PC is, in the current configuration, accessing the
Database directly. This forces you to implement Database access and
retrieving/formatting of data from the database in the client itself. If the
database design or location has to change, you'll have to modify the client
and redeploy it. Furthermore, you have no way to use the client on the
internet as it would pose major problems and security risks.

Now, if you create a Web Service that offers functions such as 'int
NumberOfItemsLeft(string itemName)' for example (i don't know what your
application is supposed to do, so i'm picking up a typical example). The
client application will just have to call this Web service function to have
the number of items left for a particular item. This is straitforward to do
on the client.  The web service will access the Dabase, retrieve the info
and pass it back to the client. If the database is redesigned and moved
somewhere else, you'll just have to modify the Web Service while the client
application will keep working as usual without noticing anything. And you'll
be even able to use the client from the Internet, adding more security such
as SSL encryption if needed.
Hendry - 22 May 2004 05:11 GMT
Elp, Thanks very much for your suggestion.

Yup, Web Service is one on top of my head to enable my client accessing my application from the internet, but it's slow for a LAN application, so I decide to use it for outside access

You're right, my application directly connect to a database thru dataaccess layer which installed on every client pc. It's not flexible tough if there's any modification I have to redeployed. So I'm thinking about .NET Remoting, but some people said using remoting will make additional overhead for my application. I'm not really sure about this, so I need some advice from people here

Regards

Hendry
Elp - 23 May 2004 00:11 GMT
> Elp, Thanks very much for your suggestion.
>
> Yup, Web Service is one on top of my head to enable my client accessing my application from the internet, but it's slow for a LAN application, so I
decide to use it for outside access.

Have you tried it already? Web Services can indeed be slower than .NET
Remoting in certain situations; however, if it is used as a Data Layer, it
may be as fast or almost as fast as a .NET Remoting approach, espacially on
a LAN. It really depends on what you are trying to get from your database.
If you want to retrieve a single value, then .NET Remoting with binary
formatters will be faster (well, you also have to take into account the time
needed to connect to your database and retrieve this value. If it takes a
long time then you won't notice a big difference between the 2 approaches).
But if you are retrieving big DataSets, then you will probably have similar
performances with both as Datasets are not binary formatted even if you are
using .NET Remoting with binary formatters. They are always sent in their
XML form so overhead difference between a Web Service request and a .NET
remoting request will be hardly noticable.

> You're right, my application directly connect to a database thru dataaccess layer which installed on every client pc. It's not flexible tough if
there's any modification I have to redeployed. So I'm thinking about .NET
Remoting, but some people said using remoting will make additional overhead
for my application. I'm not really sure about this, so I need some advice
from people here.

In my opinion, having the Datalayer on each client computer is the worse
thing you can do if you are dealing with a consequent number of clients. Of
course, if you have only one or two client applications deployed, then
everything is fine. But if you have several dozens or hundred of clients,
you definitely have to go the .NET Remoting or Web Service way. Or you'll be
stucked each time you want to do even a minor modification in the way your
data is stored or accessed. I don't think that it would add overhead to your
application as your clients need to connect to the remote database anyway.
It won't do any  arm doing it through a Web Service rather than directly.
And, if your Web Service or .NET remoting server has been properly built, it
will make the client application developement and maintenance much easier.

I would be interrested to see what other people here think of that. You
could also post your question on the
microsoft.public.dotnet.framework.remoting and the
microsoft.public.dotnet.framework.webservices newsgroups.
Hendry - 24 May 2004 10:46 GMT
Elp, I've read an article somewhere but I've forgetten. It said that .NET Remoting deals with InterMachine Communication (same as DCOM) so additional overhead exists.

I know there's a trade off here. If I copy my DataAccess Layer to each user machine, it'd be very hard to maintain it, but it can give optimal performance. On the other hand, .NET Remoting makes deployment easier, but it takes additional overhead.  So, I'd go for performance,  I'll stick with installing my DAL on each machine. The Deployment problem can be tackled with Smart Client deployment model.  However, I still need some clarifications on .Net Remoting's overhead. If Remoting's overhead is nolonger an issue,  I'll absolutely go for .NET Remoting (I may post this on another thread in Remoting subject

Anyway, Thanks a lot for telling me that Web Service can be as fast as Remoting for non binary data

Hendry
Elp - 24 May 2004 18:11 GMT
> Elp, I've read an article somewhere but I've forgetten. It said that .NET Remoting deals with InterMachine Communication (same as DCOM) so additional
overhead exists.

I'm using .NET Remoting in my application but not for the Data Access layer.
I'm using Web Services for that. However, i'm not aware enough of the inner
of .NET Remting to give you any advices about a possible overhead it may
have. What i would suggest you is to simply try it yourself. Building a .NET
remoting server that's 3 lines of code. Building a .NET Remoting client is 3
lines of code as well. Building and using a Web service is 3 clicks of mouse
with VS .NET. So why not creating a couple of test applications and see by
yourself if you notice a performance difference between various approaches?
It really depends on what your application is doing and how it has been
developped. There is no definite answer when it comes to choose between
direct access to the database, .NET Remoting or web services, it's all a
mater of compromise.
Yazid Arezki - 24 May 2004 22:30 GMT
Check
http://www.thinktecture.com/Resources/RemotingFAQ/default.html

Regards

Yazid

> > Elp, I've read an article somewhere but I've forgetten. It said that .NET
> Remoting deals with InterMachine Communication (same as DCOM) so additional
[quoted text clipped - 12 lines]
> direct access to the database, .NET Remoting or web services, it's all a
> mater of compromise.
Hendry - 25 May 2004 09:01 GMT
Yes, You're absolutely right, I'm better off giving it a try and see the result by myself.

Cheers

Hendry

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.