Framed transport #51

Open
PlayerOne opened this Issue Dec 22, 2010 · 0 comments

Projects

None yet

1 participant

@PlayerOne

We are currently using framed transport for thrift. Pandra has support for this, but it would be nice to make this easily configurable. To be able to configure the transport type we made the following adjustments:

in file config.php:

define('THRIFT_TRANSPORT_BUFFERED', 1);
define('THRIFT_TRANSPORT_FRAMED', 2);
define('THRIFT_TRANSPORT', THRIFT_TRANSPORT_FRAMED);

in file lib/Core.class.php, in both functions connect() and connectSeededKeyspace():

if (THRIFT_TRANSPORT == THRIFT_TRANSPORT_BUFFERED) {
    $transport = new TBufferedTransport(new TSocket($host, $port, PERSIST_CONNECTIONS, 'PandraCore::registerError'), 1024, 1024);
} else {
    $transport = new TFramedTransport(new TSocket($host, $port, PERSIST_CONNECTIONS, 'PandraCore::registerError'), 1024, 1024);
}

And finally change the definition of the function _authOpen in file lib/Core.class.php to:

static private function _authOpen(TTransport &$transport, $keySpace)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment