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

KadNode as a library #70

Closed
chriamue opened this issue Aug 16, 2017 · 9 comments
Closed

KadNode as a library #70

chriamue opened this issue Aug 16, 2017 · 9 comments

Comments

@chriamue
Copy link
Contributor

Is it possible that this project serves a library to include in other projects.
I really would like to use it for example in chat applications to
resolve ip by public key as 'dns' .

@chriamue chriamue changed the title KadNode library Question: KadNode library Aug 16, 2017
@mwarning
Copy link
Owner

It is not possible yet, but I would love to do it and will give it a shoot very soon.
The project has recently been rewritten and I currently prepare the new release (packaging, testing etc.).

@chriamue
Copy link
Contributor Author

I've already created some cmake projects based on this cmake template (https://github.com/cginternals/cmake-init) which also has packaging for deb and rpm.
Let me know if I can help anyhow.

@mwarning
Copy link
Owner

Thanks, but that would be too much of a change right now.
Anyway, how do you like the library to operate?

  • kadnode, just as a library?
  • how should the API look like?

So far this is the first API method I came up with:
int kadnode_lookup( const char query[], IP addr_array[], size_t addr_num );

How should settings be provided?

@mwarning
Copy link
Owner

Also important, how should the (non-blocking) event loop be integrated?
Maybe the library should utilize its own thread.

@chriamue
Copy link
Contributor Author

I plan to provide to config as strings, not as file.
For my own I would run the event loop in my own thread, but for convenience the library should
additionally have its own thread.

Here is an example how I would like to use it. https://github.com/hyphaproject/hypha/blob/namesystem/source/utils/source/namesystem.cpp

@mwarning
Copy link
Owner

I think it good practice to not do threading in the library.
Some people want to use pthreads or other libs that might not be compatible.
Your example looks about right. Might take a few days to implement something usable.

@mwarning
Copy link
Owner

mwarning commented Sep 1, 2017

Library support won't make it into 2.0.0. There is too much work to be done. It will be a testing release anyway.

@mwarning mwarning changed the title Question: KadNode library KadNode as a library Sep 1, 2017
@melroy89
Copy link

melroy89 commented Sep 9, 2024

I'm still interested in this. If there is a library, be sure to create Language binding to C++ but also other languages most likely.

@mwarning
Copy link
Owner

mwarning commented Nov 3, 2024

Sorry, no time to create and support a library right now.

@mwarning mwarning closed this as completed Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants