namecoin / namecoin-legacy

Legacy client. New version here: https://github.com/namecoin/namecoin-core Note the release branch! - Official website:
https://namecoin.org
MIT License
448 stars 177 forks source link

Plugin interface #103

Closed renne closed 10 years ago

renne commented 10 years ago

A plugin interface allows to extend the functionality of namecoind by other developers with native speed and without an exploding code base. Examples are web-interfaces, DNS resolvers or SIP registrars for VoIP. So I suggest to add a plugin interface to namecoind which plugins can use to access the blockchain and run operations on the blockchain (e.g. name update). To ensure safety all plugins should be able to request information from the blockchain but there should be a rights management for all actions like update, renew, ...

domob1812 commented 10 years ago

I think the best way to integrate with namecoind is to use the RPC interface. Do you have concrete examples of things which could be implemented via RPC only with a significant performance overhead (or other problems)? All of the things you mentioned above seem suited to base off the RPC interface. IMHO, the separation into multiple processes and communication over RPC seems like a good choice security-wise.

renne commented 10 years ago

You can use multi-threading and multiple processes in a native application with plugin interfaces, too. Let's take NMControl as an example: Port 53 -> Python -> random port -> HTTP -> Namecoind-RPC Script-languages like Python are slow and HTTP has a lot of overhead. Consider the situation of one or two Namecoinds as DNS resolvers of a company/university campus with 5000 hosts. 5000 hosts will overload a Namecoind/NMControl combo.

Namecoin is an excellent theoretical idea but implementations don't seem to consider the scaling effects in the real world ...

domob1812 commented 10 years ago

I understand your concerns. However, I don't see how a plug-in infrastructure would help in the example you cite. The main problem I see with using a namecoind for 5000 clients is that the namecoind itself will be overloaded. It doesn't matter whether it is accessed via RPC or directly from within using plug-ins. At least that is my own impression.

phelixbtc commented 10 years ago

I'm with domob on this one. Plugins should go into NMControl. It already does support plugins.

In the example given I don't understand why namecoind would be overloaded. Communication between namecoind and NMControl is not affected by connections to NMControl.

phelixbtc commented 10 years ago

I suggest for this discussion to be moved to the forum.