Comments (7)
- 1 it's fine to return error codes... when there's an error... when the result is "OK" I wouldn't expect an err object at all... this seriously breaks node callback convention.
//typical node convention
function callback(err, result) {
if (err) return doSomethingWithError(err);
...
}
//when using your module
function callback(err, result) {
if (err && err.code !== aerospike.status.AEROSPIKE_OK) return doSomethingWithError(err);
...
}
I know this breaks compatibility, and would need a full semver bump, but definately suggest at least considering this change.
- 2 awesome, I'm assuming you'll also test against iojs?
- 3 cool... I'm not targetting aerospike myself, was mainly pointing out some things worth considering... I came across your project via a discussion on hacker news, and wanted to see where the node client stood.
- 4 Yes, I mean connection pooling... ie: an example of how best to use the client, when making multiple requests... does your module implement connection pooling, or would one have to create a wrapper around say
generic-pool
and handle pooling oneself?
from aerospike-client-nodejs.
- Regarding error object - We are seriously considering the implications of moving to model where we do not return error codes. The current users of this module have designed around this model where an error object is returned. And moving away from this will break backward compatibility. We will discuss internally and keep you posted.
- Regarding node v0.12.0 compatibility - We are in the process of integrating with Nan module, so that Aerospike module is compatible with both node v0.10.* and node v0.12.*. This will be released within this week.
- Regarding promise based implementation, We discuss this internally and prioritize, meanwhile we accept pull requests from community, so feel free to contribute :)
- When you say pooling, do you mean connection pooling?
from aerospike-client-nodejs.
- We will consider this seriously and come up with a solution for this.
- I am not testing against iojs for now, but in the subsequent release I'll test and release note it.
- Yes we do connection pooling in the underlying implementation. The number of connections that are opened can be configured when creating an aerospike object. By default, there are 300 connections maintained in the connection pool. If the client has to serve more than 300 connections, new connections are opened and reused.
Thanks
from aerospike-client-nodejs.
+1 for the "do not return an error when there is no error"
Also, all the error codes are not specified in the docs like the {code: -1, message: 'Failed to see cluster'}.
Is there any way to disable client->log ? When I can not connect to the cluster this line is sent to stderr
Apr 29 2015 10:53:08 GMT: ERROR(8478) [connect.cc:69] [Connect] - Connecting to Cluster Failed
from aerospike-client-nodejs.
+1 for not using underlying C driver but implement the protocol in pure JS.
Also, open source the protocol, if it is not.
from aerospike-client-nodejs.
The protocol has been defined, and both the client and server are open source, so anyone is able to write a client. Anyone who would like to write a pure JS client is welcome to.
from aerospike-client-nodejs.
All issues in this discussion are addressed except for promise support. For updates on promise support refer issue #78 . Closing this issue.
from aerospike-client-nodejs.
Related Issues (20)
- What is the latest version of Aerospike goes with Ubuntu 18.04 HOT 2
- error TS2304: Cannot find name 'Class' HOT 12
- Does aerospike-client-nodejs need python on runtime as well? HOT 1
- I cant install on windows 10 HOT 2
- Issue with using client.operate with policy exists: AS.policy.exists.CREATE HOT 1
- Serialized and blocking connection
- Unable to install aerospike with nexus3 HOT 16
- Unable to install v5.9.0 with yarn, published version requires "npm-run-all" HOT 3
- System's openssl version since static linking in v5.6.0 HOT 4
- Missing 'bool/AS_EXP_TYPE_BOOL' in exp bin type HOT 2
- Unable to use pnpm package manager because of preinstall script of the package HOT 2
- Client.close(true) does not release underlying event loop HOT 2
- Segmentation fault with secondary index query HOT 12
- Typescript build fails HOT 1
- Segmentation fault crash core dump with 5.11.0 HOT 3
- Can't install with node 22 HOT 2
- --build-from-source is broken on Rocky 9, node 20
- Unable to get a record by filter 'contains' if bin array includes > 1 element
- Unable to find record by regexp pattern
- Aerospike.maps.returnType.KEY_VALUE is missing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aerospike-client-nodejs.