Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reconnect functionality #11

Open
youurayy opened this issue Jan 13, 2014 · 9 comments
Open

reconnect functionality #11

youurayy opened this issue Jan 13, 2014 · 9 comments

Comments

@youurayy
Copy link

Sorry guys but the reconnect functionality is not ok.

  1. When voltdb goes away, the driver keeps calling the error callback once per second. (This in itself is a complete anti-pattern in Node.js, because once you return from a function with a success callback, you never return again either with success or error. This is just a broken design. You don't call return more than once.)
  2. When voltdb comes back, nothing happens, the error callback is still being called once per second.
  3. There's no way to handle this because the driver doesn't offer a close() functionality, so the only solution is to restart the Node.js process, which is lame.

Do you think you can fix this?

@youurayy
Copy link
Author

Also the event callbacks aren't of use here. When it's not possible to connect, the event CONNECTION with code -3 is reported, instead of the CONNECTION_ERROR event.

Also there is no event to indicate that the connection was lost.

@jpiekos
Copy link

jpiekos commented Jan 16, 2014

HI Juraj, many of our clients are community supported. Would you be interested in contributing updates for this client? If so, please email me a signed copy of our contributor agreement (found here: http://voltdb.com/contributor-license-agreement/).

Thanks,

John

@youurayy
Copy link
Author

Hi John, I was thinking about writing a new Node.js driver for VoltDB from scratch. Would this be potentially something VoltDB would be interested in doing on a contract basis with me?

Best,
Juraj

@jpiekos
Copy link

jpiekos commented Jan 22, 2014

Hi Juraj,

I'm interested in discussing this further. We did have industry Node.js
guru's review the code (Felix Geisendörfer). Can you outline the
deficiencies and why a rewrite would be necessary? Also I'd be interested
in a proposal for the work, w/test cases, and possibly a node.js voltdb
sample application.

John

On Sun, Jan 19, 2014 at 8:51 AM, Juraj Vitko notifications@github.comwrote:

Hi John, I was thinking about writing a new Node.js driver for VoltDB from
scratch. Would this be potentially something VoltDB would be interested in
doing on a contract basis with me?

Best,
Juraj


Reply to this email directly or view it on GitHubhttps://github.com//issues/11#issuecomment-32708676
.

  • John Piekos_, VP of Engineering
    *VoltDB, Inc._

_E: *jpiekos@voltdb.com
O: 978.528.0576
M: 508.517.3218
www.voltdb.com
Follow VoltDB on Twitter http://twitter.com/voltdb,
Facebookhttps://www.facebook.com/VoltDB?sk=wall,
and LinkedInhttp://www.linkedin.com/company/857257?goback=.fcs_GLHD_volt+db_false__2__2__2__2__2__2__2__2__2__2__2_*2&trk=ncsrch_hits
http://www.voltdb.com/

@youurayy
Copy link
Author

Hi John,

I'll send you all of that to your Gmail, if that's OK.

Best,
J.

@victorat
Copy link

victorat commented Jun 6, 2014

I did solve reconnection issue. How to contribute?

@jpiekos
Copy link

jpiekos commented Jun 9, 2014

Hi Victor,

We'd love a contribution - you can create a pull request on that
repository, also, could you sign a contributor license agreement? It can
be found here: http://voltdb.com/contributor-license-agreement/

Thanks,

John

On Fri, Jun 6, 2014 at 6:43 PM, victorat notifications@github.com wrote:

I did solve reconnection issue. How to contribute?


Reply to this email directly or view it on GitHub
#11 (comment)
.

  • John Piekos_, VP of Engineering
    *VoltDB, Inc._

_E: *jpiekos@voltdb.com
O: 978.528.0576
M: 508.517.3218
www.voltdb.com
Follow VoltDB on Twitter http://twitter.com/voltdb, Facebook
https://www.facebook.com/VoltDB?sk=wall, and LinkedIn
http://www.linkedin.com/company/857257?goback=.fcs_GLHD_volt+db_false__2__2__2__2__2__2__2__2__2__2__2_*2&trk=ncsrch_hits
http://www.voltdb.com/

@sp-suresh
Copy link
Contributor

Any update?

mattyouill added a commit to burnian-engineering/voltdb-client-nodejs that referenced this issue Sep 7, 2017
- Tracks connections that have been opened so they can be closed.
- Tracks background tasks that have been setup so they can be shut down.
- Closes connection sockets.
- Shuts down background tasks.

This was needed to run the test cases as a suite. Previously they only worked individually.

Bound client exit to exit function and also improved debug logging.

This is a step towards fixing VoltDB#11 but more needs to be done. At least the test suite runs now :)
nshi pushed a commit that referenced this issue Sep 15, 2017
* Fix how the client is setup and torn down so that it:
- Tracks connections that have been opened so they can be closed.
- Tracks background tasks that have been setup so they can be shut down.
- Closes connection sockets.
- Shuts down background tasks.

This was needed to run the test cases as a suite. Previously they only worked individually.

Bound client exit to exit function and also improved debug logging.

This is a step towards fixing #11 but more needs to be done. At least the test suite runs now :)
@aamadeo27
Copy link

I'm still having this issue when I pass a login request with a bad password.
In this case I have 1 callback call with errorCode === null, and then every second a call with errorCode == -3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants