Convergence RPC calls

Namecoin, NMControl
Post Reply
domob
Posts: 1129
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Convergence RPC calls

Post by domob »

I noticed that Convergence's routine for RPC calls (in getNamecoinDnsField or so) is very complicated, using a low-level Mozilla API. While it works, what do you think about switching over to the code used by the NameID extension to perform RPC calls? I think it is less complicated, but of course that's just a matter of taste. Since the code is already there and working, it won't change that much for maintainance. But if you think that is a good idea, I can work on a patch.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: Convergence RPC calls

Post by phelix »

Sounds good but it should be biolizard89's decision.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

biolizard89
Posts: 2001
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Re: Convergence RPC calls

Post by biolizard89 »

domob wrote:I noticed that Convergence's routine for RPC calls (in getNamecoinDnsField or so) is very complicated, using a low-level Mozilla API. While it works, what do you think about switching over to the code used by the NameID extension to perform RPC calls? I think it is less complicated, but of course that's just a matter of taste. Since the code is already there and working, it won't change that much for maintainance. But if you think that is a good idea, I can work on a patch.
nmcontrol uses TCP RPC rather than HTTP RPC like namecoind. I believe NameID uses namecoind, so HTTP, is that correct? I couldn't find a better way of doing TCP RPC via a Firefox extension... is there something I missed?
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

domob
Posts: 1129
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: Convergence RPC calls

Post by domob »

biolizard89 wrote:
domob wrote:I noticed that Convergence's routine for RPC calls (in getNamecoinDnsField or so) is very complicated, using a low-level Mozilla API. While it works, what do you think about switching over to the code used by the NameID extension to perform RPC calls? I think it is less complicated, but of course that's just a matter of taste. Since the code is already there and working, it won't change that much for maintainance. But if you think that is a good idea, I can work on a patch.
nmcontrol uses TCP RPC rather than HTTP RPC like namecoind. I believe NameID uses namecoind, so HTTP, is that correct? I couldn't find a better way of doing TCP RPC via a Firefox extension... is there something I missed?
Yes, NameID uses namecoind and HTTP. But if IIRC (have to check that), the HTTP-part is done manually, so it would be easy to remove it from the code. I believe the TCP API used is on a higher level than the one used in Convergence. Would you oppose to changing that if my assumptions turn out to be true and I provide a patch?
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

biolizard89
Posts: 2001
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Re: Convergence RPC calls

Post by biolizard89 »

domob wrote:
biolizard89 wrote:
domob wrote:I noticed that Convergence's routine for RPC calls (in getNamecoinDnsField or so) is very complicated, using a low-level Mozilla API. While it works, what do you think about switching over to the code used by the NameID extension to perform RPC calls? I think it is less complicated, but of course that's just a matter of taste. Since the code is already there and working, it won't change that much for maintainance. But if you think that is a good idea, I can work on a patch.
nmcontrol uses TCP RPC rather than HTTP RPC like namecoind. I believe NameID uses namecoind, so HTTP, is that correct? I couldn't find a better way of doing TCP RPC via a Firefox extension... is there something I missed?
Yes, NameID uses namecoind and HTTP. But if IIRC (have to check that), the HTTP-part is done manually, so it would be easy to remove it from the code. I believe the TCP API used is on a higher level than the one used in Convergence. Would you oppose to changing that if my assumptions turn out to be true and I provide a patch?
Most likely I'd be fine with that, but I'd appreciate it if you can send me a link to some info on the TCP API you're using so I can take a look before you write the patch. But yeah, I agree that the API used in FreeSpeechMe is a pain... I'm not sure why Moxie would have used an unnecessarily low-level API... making it more readable would certainly be a plus.
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

Post Reply