Using remoting in an n-tier application

  • Thread starter Thread starter hardieca
  • Start date Start date
H

hardieca

Hi,

Can anyone point me in the right direction for an example on how to
use remoting to separate my BLL and DAL onto different tiers? Is there
a best-practice pattern or design model for this?

Regards,

Chris
 
Chris,

I have two questions. First, what is the impetus to use remoting? Why
do you feel you have to have the layers on two different machines? Just
because you have a logical boundary between these two tiers, doesn't mean
you have to have a process or machine boundary between the two of them.
Doing this unecessarily will hamper performance.

Second, why aren't you looking at Windows Communications Foundation
(WCF)?
 
HI Nicholas,

Unfortunately, I won't have continuous access to the server where the
db resides. I know there will be a slight performance hit, but
everything is within our LAN so I'm not terribly concerned.

I haven't heard of WCF (I'm still finding my way with .NET). It's .NET
3.0? That's a non-starter for me, I work in government where
everything moves slowly and we won't be moving off .NET 2.0 for a
while yet...

C.

Chris,

I have two questions. First, what is the impetus to use remoting? Why
do you feel you have to have the layers on two different machines? Just
because you have a logical boundary between these two tiers, doesn't mean
you have to have a process or machine boundary between the two of them.
Doing this unecessarily will hamper performance.

Second, why aren't you looking at Windows Communications Foundation
(WCF)?

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


Can anyone point me in the right direction for an example on how to
use remoting to separate my BLL and DAL onto different tiers? Is there
a best-practice pattern or design model for this?

Chris
 
C.,

Yes, WCF is .NET 3.0.

As for not having access to the server where the db resides, this
doesn't mean that you have to have your data layer residing on the server.
If all you are going to do on that machine is access the database, then I
would say to put your data layer on the same machine as your business layer,
something that you will have more continuous access to.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

HI Nicholas,

Unfortunately, I won't have continuous access to the server where the
db resides. I know there will be a slight performance hit, but
everything is within our LAN so I'm not terribly concerned.

I haven't heard of WCF (I'm still finding my way with .NET). It's .NET
3.0? That's a non-starter for me, I work in government where
everything moves slowly and we won't be moving off .NET 2.0 for a
while yet...

C.

Chris,

I have two questions. First, what is the impetus to use remoting?
Why
do you feel you have to have the layers on two different machines? Just
because you have a logical boundary between these two tiers, doesn't mean
you have to have a process or machine boundary between the two of them.
Doing this unecessarily will hamper performance.

Second, why aren't you looking at Windows Communications Foundation
(WCF)?

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


Can anyone point me in the right direction for an example on how to
use remoting to separate my BLL and DAL onto different tiers? Is there
a best-practice pattern or design model for this?

Chris
 
Nicholas said:
Chris,

I have two questions. First, what is the impetus to use remoting? Why
do you feel you have to have the layers on two different machines? Just
because you have a logical boundary between these two tiers, doesn't mean
you have to have a process or machine boundary between the two of them.
Doing this unecessarily will hamper performance.

Second, why aren't you looking at Windows Communications Foundation
(WCF)?
What makes WCF that much more compelling than remoting? I don't know
anything more about it than the name.

I have started a similar project and used remoting. WCF didn't exist
when i started.

dan
 
Can anyone point me in the right direction for an example on how to
use remoting to separate my BLL and DAL onto different tiers? Is there
a best-practice pattern or design model for this?

There's a great book by Rockford Lhotka that covers this topic. Look
for Expert C# 2005 Business Objects. He walks through building a real
framework that handles the tier transitions for you (He calls it
Csla).

I'm using his framework now, and there's simply no going back for me.

Andy
 
Dan,

Remoting does NOT do the following out of the box (all of which WCF
supports or has more options than remoting):

- Authentication/authorization.
- Only three channels with fixed formats for those channels (tcp, http,
pipes) (WCF supports MSMQ out of the box as well and the format of messages
on channels is extremely extensible)
- Supports only two encodings (binary and soap) (WCF supports soap, POX,
binary encoding and can be extended for almost any wire format)
- Transactions
- Dials for scaling (throttling, message size, etc, etc)

Oh, yeah, you have to share assemblies with callers as well with
remoting, and thats a HUGE PITA.

The list goes on, the big one for most people is the first one, lack of
authentication/authorization support. It just isn't there in remoting.

Also, with WCF, the model allows you to switch easily between bindings
and transports, assuming that your service semantics don't change. So if
you had an internal app which used a TCP transport and binary encoding, it's
not going to take much to move it to a web service (using the Basic Web
Services profile, or something more, and assuming you wrote your service as
stateless to begin with).

Finally, the number of extensibility points, for almost every single
aspect of the WCF stack (security, transport, message
inspection/transformation, encoding, the ability to inject services into the
stack) blows remoting out of the water.
 
Nicholas said:
Dan,

Remoting does NOT do the following out of the box (all of which WCF
supports or has more options than remoting):
Is there a webcast or getting started guide on this? Is is difficult to
change from remoting to WCF?

What/Where is a good place to start?

dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top