PDA

View Full Version : Fastest TCP Components



xGTx
21-10-2004, 01:38 AM
What are the fastest TCP components? I hear delphi's components are buggy, and Indy have problems too... Opinions? And why...

Harry Hunt
21-10-2004, 05:46 AM
For games you might want to try DirectPlay. I've been using both Delphi's TCP components and the Indy ones and never had any problems.

cairnswm
21-10-2004, 06:37 AM
I've used a lot of the TCP/IP components in projects - I have required the FTP and Telnet components on multiple projects. I have used the Delphi Components, Indy and ICS.

The Components that come with Delphi are probably the best designed but worst tested of the component sets. For example the FTP component cannot deliver a detailed file list.

The ICS components are probably the other extreeme being the worst designed but the most reliable components. For example all interaction with the FTP component is done through a file.

The Indy components fit into the middle. There are some problems with them but at the same time that are reasonably well designed. The biggest benifit of the Indy components is the internet support for them - almost all of themhave some examples to help you.

If I have to start on a project now I will try and use Indy only.

Have you considered using Web Services? If you are looking at data transfer I think it could be a good option. Set up a web service that does the information delivery on the host and using the WSDL importer you can easily create a client that uses the Web Service. (Similiar to my Web Live tutorial but using actual web services). If you need some help just ask and I'll put together a simple tutorial.

Harry Hunt
21-10-2004, 06:55 AM
Hey cairnswm, I'd very much appreciate a tutorial or introduction to web services. That's something I always wanted to play around with but never actually did.

cairnswm
21-10-2004, 08:40 AM
I'll see what I can do. Work is a bit busy at the moment.

Getting web services working took me about 5 days worth of investigation but I can now set up a web service along with a basic client in under 5 minutes - thats thanks to the way Delphi has wrapped them in Wizards.

Remind me next week sometime please.

xGTx
21-10-2004, 03:57 PM
Yea, i would like to see that too.

What would you suggest most for a MMORPG envorionment. Having to hold and handle many sockets and connections with data in and out of all of them?

WILL
22-10-2004, 01:16 AM
Hmm... if you are planning on being versitile(multi-platforms) DirectPlay might not be the one you want(unless you are offering it as an alternative method). I think that SDL has some network functions aswell.

cairnswm
22-10-2004, 04:49 AM
In a MMORPG I dont see why you need to keep live sockets. Setting up the correct web services could allow you to do everything through standard HTTP connections. (Alowing me to play through my companies firewall).

OK I must admit I dont know if this is really possible. With a socket connection there is a direct link from PC to Server with Web Services you would be using the HTTP protocol and thereby having all the over heads of routers etc (you may be able to get around this by submitting to the server's IP address).

I have just started on a new project at work as the Technical Architect on the project. The decision was already made to develop in Delphi.NET. For the Project I am proposing a 4 tiered system. The Back End will be an Oracle database, on top of that a Business Rules layer comprising web services. Then a Presentation Layer (ASP.NET in Delphi) will consume those web services to deliver web pages to the client - BUT - the client PC could also have a rich client that consumes the web services directly as well.

I see no reason why a MMORPG cannot use the same sort of technology to distribute its information. Have a look at my Web Live tutorial to see how it would be structured. I'll do my best to get a Web Services tutorial up as soon as possible.

<ramblings>
Web Services use XML. With XML you can structure your data in any format you want. This allows a single call to the server to deliver multiple types of information to the client. For example the Details of the room they are standing in - eg Width, Length, color floor, name etc, and can then include a record set of objects actually in the room at the same time.

Web services in Delphi come in two different forms.
1. Sharing datasets accross the internet through the use of remote data sets inside TClientDataSet
2. Sharing objects across the internet through the use of TRemotable objects (this is what I'll write a tutorial on).

The first type allows you to share actual datasets accross the internet along with clild datasets (master/child structure) to many levels.

The second to me is the most interesting because it effectivly makes a copy of an object on the client sharing the data and methods of an object on the server. This means that you can through XML over HTTP make method calls on the remote server. So in the example above instead of seeing it as an XML block of data containing information about a room it is actually a TRoom object that has a dynamic child array of TGameObjects and various properties to represent Width, Length and floor color.

I am waiting for my cgi-bin directory to be set up on my cairnsgames web site and will then make some sort of simple game that uses web services.
</ramblings>

xGTx
22-10-2004, 05:06 PM
I'm not sure i like the idea of using web services for a MMORPG. It seems it wouldnt be as responsive, let alone as vercatile/expandable.

cairnswm
22-10-2004, 09:05 PM
I agree it may not be as responsive. But I'm sure its just as expandable.

I'm doing lots of playing at the moment with Web services so I should be able to let you know soon :)

cairnswm
12-11-2004, 01:24 PM
I finally wrote the web services tutorials I promised. They are under the tutorials section. More to come.

xGTx
14-11-2004, 10:48 PM
Great job ;) .... Wheres the tutorial section?

cairnswm
15-11-2004, 03:51 AM
Creating a web service
http://terraqueous.f2o.org/dgdev/viewtopic.php?t=1634

consuming a web service
http://terraqueous.f2o.org/dgdev/viewtopic.php?t=1635