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

Move some logic from C++/NAN to plain javascript? #21

Open
joelpurra opened this issue Apr 2, 2017 · 0 comments
Open

Move some logic from C++/NAN to plain javascript? #21

joelpurra opened this issue Apr 2, 2017 · 0 comments

Comments

@joelpurra
Copy link
Collaborator

Some of the logic closely related to javascript objects but done in the C++ code is bulky and not very straightforward. It is also not always necessary to parse the javascript objects with Native Abstractions for Node.js (NAN), perform a relatively simple check, then return build new NAN objects to return as javascript -- the same check in pure javascript code might have been much easier to write.

It might be a good idea to minimize the C++ to the bare minimum, in favor of pure javascript code. As it is right now, the javascript code is instead the bare minimum, but with some asynchronous handling workaround.

Moving some logic to javascript might help with fixing the sync/async problems outlined in #20 The transaction id handling is unleashing Zalgo, especially as dealing with asynchronous wrappers and/or promises in NAN might be cumbersome.

@joelpurra joelpurra changed the title Move some logic from C++/NaN to plain javascript? Move some logic from C++/NAN to plain javascript? Apr 2, 2017
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

1 participant