.NET
  Home arrow .NET arrow Page 2 - .NET Remoting and Delphi
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
.NET

.NET Remoting and Delphi
By: Xavier Pacheco
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 14
    2004-08-09

    Table of Contents:
  • .NET Remoting and Delphi
  • Distributed Architectures
  • Benefits of Multitier Application Development
  • .NET Remoting Basics
  • The ChannelServices Class
  • Object Activation
  • Your First .NET Remoting Application
  • Adding References
  • BankPackage.dll: Contract Between Clients and Servers
  • Implementing the Server
  • Implementing the Client

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    .NET Remoting and Delphi - Distributed Architectures


    (Page 2 of 11 )

    A system divided in two or more executable modules running on different machines, processes, or AppDomains is said to use a distributed architecture. Processes and AppDomains are mentioned because marshalling would still be required.

    Although it could be argued that a single executable divided in several units also represents an example of a distributed architecture, we'll stick to examples in which some form of marshaling is required.

    Distributed architecture had existed for a long time before .NET Remoting was created. These systems and the technologies used to build them have been the foundation for the design and implementation of what is now available in Delphi for .NET and the Microsoft .NET Framework. Each of these architectures makes use of one or multiple remoting technologies to perform remote communication.

    Client/Server

    This is the earliest and most well-known distributed architecture. Delphi applications using technologies such as dbGo, Interbase Express, or the Borland Database Engine/SQL Links are client/server.

    This type of architecture is usually referred to as two-tier in which a client is responsible for the presentation of the data (that is, using data-aware controls such as TDBGrid) and a server for the retrieval and storage of it.

    Although this architecture is simpler to understand and use than others, it has several problems that are critical in today's Internet enabled world:

    • It usually only works in local area network(s).

    • It cannot efficiently serve thousands of concurrent users.

    • It is not easy to update and maintain: Because each client requires a permanent connection to the database and most business logic is contained in the clients themselves, whenever a change is due, all clients need to be redeployed.

    Figure 29.2 illustrates a client/server model.

    delphi

    Figure 29.2
    Client-server model.

    Peer-to-peer

    Peer-to-peer indicates networks without a central server in which each computer acts as a client and a server at the same time. A Windows workgroup without a domain server is a peer-to-peer network, for instance.

    This type of architecture generally only works in local area networks and depends on frequent UDP broadcasts to make each node aware of the status of the others. These broadcasts are normally not possible over the Internet. Figure 29.3 depicts the peer-to-peer network.

    delphi

    Figure 29.3
    A peer-to-peer network.

    Gnutella or Napster are forms of hybrid peer-to-peer systems in which each node communicates with a server to find out about the existence of other nodes and then initiates direct communication with each.

    Although convenient for file sharing and chat programs, this architecture fails to provide benefits to regular, data-oriented applications.

    Multitier

    Multitier is the preferred type of distributed architecture today. Delphi applications built using technologies such as DataSnap or Windows DNA are multitier. You will use .NET Remoting to develop multitier systems in Delphi for .NET.

    This type of architecture is commonly referred to as three-tier, where a client communicates to a process on a remote server and this, in turn, communicates with an RDBMS located on a different server. This is shown in Figure 29.4.

    delphi

    Figure 29.4
    Multitier distributed model.

    The key aspect of this type of architecture is the presence of the middle tier. Middle tiers are usually composed of two layers:

    • Data access—Responsible for querying and updating the underlying data source. It can perform data caching to improve performance and minimize access to the database. It can abstract the RDBMS engine dialect and provide a simple object-oriented API for the business layer.

    • Business—Normally composed by objects accessible from the clients through Remoting. These objects perform data validation, transformation, in-memory calculations, and so on.

    Data access and business layers could reside in different application domains or simply be placed in one. In general, using one application domain makes things easier, although you might opt for a more marked division in a few cases.

    An example could be providing a hot-swappable data access layer that works as a plug-in and can be replaced at runtime or during installation without the need to recompile the business layer.

    The next section lists some of the most evident advantages of multitier systems.

    This chapter is from Delphi for .NET Developer's Guide, by Xavier Pacheco (Sams, 2004, ISBN: 0-672-32443-1). Check it out at your favorite bookstore today.

    Buy this book now.

    More .NET Articles
    More By Xavier Pacheco


       · in time compiling is message:Incompatible types 'IBankManager' and 'Object'where...
       · is in WinformfBankManager := Activator.GetObject( typeof(IBankManager), ...
     

    .NET ARTICLES

    - The Transformed XML Explorer in MFC
    - List Control and Property Grid with the MFC ...
    - Font, Shell and Masked Edit Controls for MFC
    - Color, Link and Image Editor Controls for M...
    - New Controls for MFC
    - The Windows Ribbon Framework
    - Markup Language for the Ribbon Framework
    - Visually Upgrade Your MFC Project
    - New Features for the Statusbar in MFC
    - Working with the Statusbar in MFC
    - Iron Speed Design v60 Review
    - Binary and XML Serialization
    - Using CrystalReportViewer to Display Crystal...
    - Creating Summary .Net Crystal Reports
    - More on Commands, Input and the WPF





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    Stay green...Green IT