3100 - Developing TCP/IP-based Server Applications using Indy Components  Christian Wilkerson.

Slides:



Advertisements
Similar presentations
WEB AND WIRELESS AUTOMATION connecting people and processes InduSoft Web Solution Welcome.
Advertisements

Web Server Implementation On DE2 Final Presentation
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
KX-NS1000 Initial Set Up For step by step : 16 May,
The Internet and Java Sockets ICW Lecture 5 Tom Chothia.
VxWorks Real-Time Kernel Connectivity
Slide 1 Client / Server Paradigm. Slide 2 Outline: Client / Server Paradigm Client / Server Model of Interaction Server Design Issues C/ S Points of Interaction.
By Frank Minichini IS 373 Kerberos. Introduction Kerberos is a network authentication protocol used to securely send and receive nodes in communication.
Object-Oriented Enterprise Application Development Tomcat 3.2 Configuration Last Updated: 03/30/2001.
Web Server Hardware and Software
The Museum Project The Museum Project Yoav Gvili & Asaf Stein Supervisor : Alexander Arlievsky.
CS3771 Today: network programming with sockets  Previous class: network structures, protocols  Next: network programming Sockets (low-level API) TODAY!
Understanding Networks. Objectives Compare client and network operating systems Learn about local area network technologies, including Ethernet, Token.
Interpret Application Specifications
Understanding Networks I. Objectives Compare client and network operating systems Learn about local area network technologies, including Ethernet, Token.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
Implementing Application Protocols. Overview An application protocol facilitates communication between applications. For example, an client uses.
VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital.
Lecture 8 Epidemic communication, Server implementation.
What Is TCP/IP? The large collection of networking protocols and services called TCP/IP denotes far more than the combination of the two key protocols.
Fundamentals of Python: From First Programs Through Data Structures
ITGS Networks Based on the textbook “Information Technology in a Global Society for the IB Diploma” by Stuart Gray.
NovaBACKUP 10 xSP Technical Training By: Nathan Fouarge
16.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 16: Examining Software Update.
PHP and MySQL Week#1  Course Plan.  Introduction to Dynamic Web Content.  Setting Up Development Server Eng. Mohamed Ahmed Black 1.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
2440: 141 Web Site Administration Remote Web Server Access Tools Instructor: Enoch E. Damson.
Web Servers Web server software is a product that works with the operating system The server computer can run more than one software product such as .
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
1 Web Server Administration Chapter 9 Extending the Web Environment.
Hands-On Microsoft Windows Server 2008 Chapter 1 Introduction to Windows Server 2008.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
14 Publishing a Web Site Section 14.1 Identify the technical needs of a Web server Evaluate Web hosts Compare and contrast internal and external Web hosting.
UNIX SVR4 COSC513 Zhaohui Chen Jiefei Huang. UNIX SVR4 UNIX system V release 4 is a major new release of the UNIX operating system, developed by AT&T.
1 Web Server Administration Chapter 1 The Basics of Server and Web Server Administration.
Cognos TM1 Satya Mobile:
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Application Layer Functionality and Protocols.
World Wide Web Hypertext model Use of hypertext in World Wide Web (WWW) WWW client-server model Use of TCP/IP protocols in WWW.
Greg Van Dyne December 4, Agenda Introduction Technical Overview Protocols Demonstration Future Trends References.
HOW WEB SERVER WORKS? By- PUSHPENDU MONDAL RAJAT CHAUHAN RAHUL YADAV RANJIT MEENA RAHUL TYAGI.
SUSE Linux Enterprise Desktop Administration Chapter 12 Administer Printing.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
Bonrix SMPP Client. Index Introduction Software and Hardware Requirements Architecture Set Up Installation HTTP API Features Screen-shots.
1 Version 3.0 Module 11 TCP Application and Transport.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.

Lecture 16 Page 1 Advanced Network Security Perimeter Defense in Networks: Virtual Private Networks Advanced Network Security Peter Reiher August, 2014.
Computing Infrastructure for Large Ecommerce Systems -- based on material written by Jacob Lindeman.
Fundamentals of Proxying. Proxy Server Fundamentals  Proxy simply means acting on someone other’s behalf  A Proxy acts on behalf of the client or user.
1 Chapter 28 Networking. 2 Objectives F To comprehend socket-based communication in Java (§28.2). F To understand client/server computing (§28.2). F To.
The Intranet.
FTP File Transfer Protocol Graeme Strachan. Agenda  An Overview  A Demonstration  An Activity.
1 Client-Server Interaction. 2 Functionality Transport layer and layers below –Basic communication –Reliability Application layer –Abstractions Files.
19 – 21 MARCH 2006 Riyadh, Saudi Arabia. Internet communication with Indy Olaf Monien IT Consultant.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
CS533 - Concepts of Operating Systems 1 Threads, Events, and Reactive Objects - Alan West.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
CSE 434: Computer Networks Project Single vs. Per Connection vs. Pooling Threading Techniques Dominic Hilsbos, Dorothy Johnson, Chris Volpe, Andy Wong,
1 BCS 4 th Semester. Step 1: Download SQL Server 2005 Express Edition Version Feature SQL Server 2005 Express Edition SP1 SQL Server 2005 Express Edition.
IPEmotion License Management PM (V1.2).
APACHE Apache is generally recognized as the world's most popular Web server (HTTP server). Originally designed for Unix servers, the Apache Web server.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Progress Apama Fundamentals
The Intranet.
Network Load Balancing
Enterprise Application Architecture
Viney Sindhu Dr. Yanqing Zhang
IS 4506 Server Configuration (HTTP Server)
Configuring Internet-related services
When you connect with DHCP, you are assigned a
Presentation transcript:

Developing TCP/IP-based Server Applications using Indy Components  Christian Wilkerson

What is Indy? (A User’s Perspective)  Indy is short for Internet Direct  Project founded by Chad Z. Hower, aka Kudzu  Originally called WinShoes  Comes with Delphi or freely downloaded at  This presentation focuses on Indy.Sockets Server components

Our company chose Indy because…  Actually I chose Indy based on usage with pet projects dating back to when it was called WinShoes  I originally liked these components because they were FREE!  The company that I worked for basically did an RFP among its developers based around a need for networking ideas  Using Indy I was the only one who developed a viable solution  Now on with the show…

Indy.Sockets Version 10  Ships with Delphi 2005  Contains 45 different server components  Implements many standard protocols

Using TidHTTPServer  Does the world really need another WebServer?  Thinking of rewriting Apache? Or IIS? Why bother?  What about configuring software remotely?  Network administrators could resolve server issues from the comfort of their office…or home.  Or turn your desktop application into a browser based application without having to master a technology outside of Delphi?  You may still have to learn HTML or AJAX, but you would not have to rely on IIS

Example 1 – TidHTTPServer  This application will have an embedded web server that allows for it to be configured remotely  Let’s look at the code…

Using TidQOTDServer  Here’s another example of the many Servers Indy provides  Quote Of The Day (QOTD) – Provides a way for a server program to provide a message to clients

Example 2 - QOTDServerExample  This application will run a QOTD server and allow entering in any quote  But wait! We also need a client application for this.

Example 2 – The client application  This is the application we will use to test the server application  Now let’s take a look at the code for both applications…

TidTCPServer – The mother of all TCP based servers  The server components used in previous examples are from the Indy.Sockets collection and are derived from TidTCPServer  TidTCPServer is the counterpart to TidTCPClient  Gives the developer the ability to implement powerful TCP based applications  Enterprise level  Peer-to-peer  Implement standards that do not yet exist

Before getting started…  Socket Blocking is the way Indy operates  No other code executes during communication  Every Server connection runs in its own thread  This eliminates any obstacles blocking introduces  Designed properly Indy servers scale very well

Multi-Threaded Programming  It is NOT evil  Indy 10 helps Multi-Threaded beginners by introducing support for fibers  Fibers are NOT threads  They must be synchronized with a scheduler  Multi-Threaded servers will run faster than Fiber servers  By default, Indy uses threads

Do you need to develop a server?  Remember, servers do not initiate connections  Clients initiate connections  If you are developing the next great peer-to-peer program you need both a server and a client

What are ports?  A port is a number that is used to identify connections using your protocol  Be careful choosing a port number as it may be used by another application  To get more information on port numbers go to the Internet Assigned Numbers Authority or

One Last Question…  Will clients remain connected to the server?  Under Windows, connections have a nasty habit of going stale  Sometimes this fools Indy  A Heartbeat mechanism can help to maintain connections over long periods of time  Send routine messages every few seconds  Immediately know when a connection goes down

Command Handlers – A Quick Overview  Previous to Indy 10, TidTCPServer allowed for the use of an OnExecute event OR using Command Handlers  OnExecute – Event that handles ALL client communication  CommandHandlers – Custom event handlers for specific TCP messages  TidCmdTCPServer is now the component to descend from for using Command Handlers  Set CommandHandlersEnabled to TRUE – As of 2/1/05 This is no longer needed or allowed  At some point our new component can be placed on the palette and dropped on a form, but we will not be doing that today

Designing Your Protocol  The developer needs to decide on the necessary commands  Cryptic or Verbose – It is up to the developer  The example that follows is a variation of the original webserver example  Allows for remote configuration of software  Uses a single command “COLOR” with different parameters for setting our form color  To maintain connections with the client, it implements a heartbeat mechanism

High Speed Command Handling Using PostMessage  Command Handlers are event handling objects that run in their own connection thread  Every TidCommandHandler object has an OnCommand event that needs to have a Try…Except surrounding its code  PostMessage is used to get commands to the GUI  This is a multi-threaded program, therefore special care must be taken  Whenever the application writes to a client a TThreadList is accessed

Example 3 - TCPServerExample  The main form…

Example 3 – The Client Application  The main form…  Now let’s see the code…

Congratulations!  If everything worked out, you just ran the server and the client much like the earlier HTTP Server demonstration  Any questions?

Conclusion  This is only the beginning  For Standard Protocols or custom protocols Indy is a solid way to go  Indy is Free  Source Code is included  Newsgroup Support  You can buy technical support

Thank You Thank You so much for your time!