18 messages in com.mysql.lists.clusterRe: New Transport
FromSent OnAttachments
Faraz Khan29 Aug 2004 22:59 
Olivier Kaloudoff30 Aug 2004 00:09 
Mikael Ronström30 Aug 2004 00:39 
Faraz Khan30 Aug 2004 00:50 
Sundeep Narravula30 Aug 2004 00:57 
Olivier Kaloudoff30 Aug 2004 04:17 
Tomas Ulin31 Aug 2004 00:36 
Mikael Ronström31 Aug 2004 04:50 
Sundeep Narravula31 Aug 2004 09:08 
Devananda31 Aug 2004 13:01 
Devananda31 Aug 2004 13:07 
Clint Byrum31 Aug 2004 13:35 
Faraz Khan31 Aug 2004 22:14 
John David Duncan31 Aug 2004 22:38 
Mikael Ronström31 Aug 2004 23:21 
Faraz Khan31 Aug 2004 23:30 
Devananda02 Sep 2004 08:49 
Douglas K. Fischer04 Sep 2004 11:29 
Subject:Re: New Transport
From:Mikael Ronström (mik@mysql.com)
Date:08/31/2004 04:50:12 AM
List:com.mysql.lists.cluster

Hi Sundeep,

It is a great to hear that you are considering adding a new transporter. The architecture is designed to allow for smooth addition of new transporters so hopefully it should be possible.

One possibility of using InfiniBand is to use the TCP/IP transporter with TCP/IP over InfiniBand. I am not sure which API you are planning to use.

Some additional details on Transporters:

1) One basic requirement for every transporter is that needs to be safe in the manner that if no crashes occurs it will deliver whatever is sent to the endpoint. Thus UDP as an example is not sufficient alone without adding code and protocols for resending lost data.

2) The main problem in integrating a new transporter is how to integrate it well with the execution handling. The execution loop is found in MYSQL_TOP/ndb/src/kernel/vm/ThreadConfig.cpp in the routine ThreadConfig::ipControlLoop()

This routine goes through the following steps in a loop executing as long as the server is up: 1) checks for new connections every now and then 2) Sends buffered data 3) Checks if there is data to receive 4) Receives data 5) Scans for timed messages 6) Executes messages 7) Handle packed messages

For transporters the tricky part is 3) In Unix a normal method of checking for received messages is the select-method. This is what is used here as well. If the API you are planning to use can also use the select-method then all is well. If not then if you can use the new transporter for all connections then you can use the polling mechanism used the by the IBA API. If you need mixed transporters which require both select and other wait calls then in Unix this can only be solved with multiple threads. In that case one needs to do some tweeks on a number of things to ensure that only one thread at a time is executing messages.

The SHM and SCI handles this problem by not waiting but performing a constant poll. This behaves very well when the machine is dedicated to database operation and for SHM it also needs to be a big tin box. SHM worked like a charm on a 72-cpu box with locking processes to CPU's. For most users that plan to use CPU's for other things as well it is not a very good idea. With SCI one can then use SCI Sockets which uses the TCP transporter but instead intercepts the system calls and converts them into SCI calls. This means that TCP/IP over Ethernet and SCI Sockets can be combined as well in the same system.

More general stuff. Most Transporters use a SendBuffer. This buffer is where data is put when messages are sent from the database code. In 2) above this buffered data is actually sent on the wire of the transporter media. The exception here is the SHM transporter where writes are performed immediately. All transporters use the same SendBuffer implementation found in SendBuffer.cpp

Rgrds Mikael

2004-08-31 kl. 09.36 skrev Tomas Ulin:

Sundeep,

Great!

no such guide is however available. I would suggest the following:

add new files: ndb/src/common/transporter/IBA_Transporter.hpp ndb/src/common/transporter/IBA_Transporter.cpp ndb/src/common/transporter/TransporterRegistry.cpp

(following the examples of the SHM_ SCI_ TCP_)

if you want to be able to configure in config file and setup these additional transporters you need to add stuff in these files: ndb/src/common/mgmcommon/ConfigInfo.cpp ndb/src/common/mgmcommon/IPCConfig.cpp ndb/include/mgmapi/mgmapi_config_parameters.h

(following the examples of the SHM_ SCI_ TCP_)

Good luck,

T

Sundeep Narravula wrote:

Hi all,

I do not have access to SCI. But still want to benifit from better networks. Currently I am looking at IBA for this purpose. So I have the following questions for which I could not find help in the documentations available.

1. What are the main issues in adding a new transport?

2. And is these a where and how guide for development? Especially, with respect to buffer/data management and transport management.

Currently I have started with additions in the src/common/transporter/ on lines of the current transporters.

Plz do let me know.

Thanks in advance,

--Sundeep.

Mikael Ronström, Senior Software Architect MySQL AB, www.mysql.com

Clustering: http://www.infoworld.com/article/04/04/14/HNmysqlcluster_1.html

http://www.eweek.com/article2/0,1759,1567546,00.asp