Giter VIP home page Giter VIP logo

thrift-pool's People

Contributors

azylman avatar bgveenstra avatar cozmo avatar ipam73 avatar jonahkagan avatar mohit avatar nathanleiby avatar nbhatia823 avatar prime-time avatar renatoprime avatar rgarcia avatar towertop avatar xavi- avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

thrift-pool's Issues

Error suppressed - connection refused

I basically tried to test the library with no thrift server running. constructor option is

{
    host: "127.0.0.1",
    port: 8000,
    max_connections: 1,
    min_connections: 0,
    idle_timeout: 1 * 1000,
    ssl: false
}

then i got an error of

"TypeError: cb is not a function"
at /node_modules/node-thrift-pool/index.js:143:18

but i'd expect the same error as in debug message:

  thrift-pool in error callback +0ms
  thrift-pool Connection acquired +2ms
  thrift-pool { err: { Error: connect ECONNREFUSED 127.0.0.1:8000 at Object.exports._errnoException (util.js:1007:11) at exports._exceptionWithHostPort (util.js:1030:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14) code: 'ECONNREFUSED', errno: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8000 } } +1ms
  thrift-pool in close callback +8ms

is this error message expected?

Check if connection is open.

Hi, how can I check if the thrift connection is open/valid before I use the client method? Is there a way to know if the connection was established correctly when I'm creating a thrift client?

If I just do this:

var thrift_client = thriftPool(thrift, Service, {host: "localhost", port: 9090});

How can i guarantee that the connection is working before i call a method on the client?

Thrift-pool: Connection closed

I am getting this error immediately after connection is created.

Here is my code:
var options = {
    transport: thrift.TBufferedTransport,
    protocol: thrift.TBinaryProtocol,
    path: "/data",
    timeout:10000
};
var thrift_client = thriftPool(thrift, thClientService, {host: "hostname", port: 80 }, options);
thrift_client.getData(id, function(err, data){
         if(errr){
           console.log(error);
        }
         console.log(data);
}); 

Calling oneway function

When I try to call oneway function, I get "Connection timeout" error after timeout. But actually the message reaches my server. This isn't what I have expected, because the callback should have been called immediately without any error.

Multiple Hosts

Just an idea, it would be great to be able to specify multiple hosts, so we could pool connections across multiple hosts :)

How can I close a pool?

I have dynamic backend thrift services, those micro services come and go periodically, they are very dynamic. The problem is that when a service is removed, how can I close the thrift connection pool immediately?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.