This would allow for lightweight applications: Firefox browser plugin with TLS, file signatures, name browsing

* Should use Nmcontrol (integrated or query) or maybe a custom Python script
* Server should run on nginx, tornado, supervisord
See some old config files of mine here: http://blockchained.com/stuff/tornado_config.7z (includes Namecoin TLS support)
* Should implement some kind of query time / size limit and DDOS protection in Nmcontrol
* Should have an ICANN domain name or subdomain (not on namecoin.org)
* Has to run for at least one year
* All files need to be open source on github with a free license
* Should come with an example query file in python
* a .bit domain with TLS support would be nice (should be very simple with the config files above)
* should be reasonably performant (cached name list)

* For much later: offer some security by adding the original block + a couple of following blockheaders

Ahh, after reading your post a bit more carefully I don't have that exact setup. I have setup a JSON-RPC interface using PHP as well as a Node.js.

However, both of these are just stop-gaps until I could get PouchDB running. Why PouchDB? Because PouchDB can use LevelDB as the backend, which as soon as Namecoin is "rebased" on Bitcoin .8+ will be what Namecoin uses as well. Then it can directly read from the blockchain without any JSON-RPC overhead. Of course, the REAL reason I am using PouchDB is because I want to use CouchDB as the front-end server. So why CouchDB?

You say you want some sort of query time or size limit as well as DDOS protection ... well, once you have made something a static document the only DDOS protection left should be done at the network edge, not by the origin server. I was planning on a 15 minute TTL, at least in the beginning. If clients are throwing bogus requests, it won't hit the Namecoind instance, it will just hit CouchDB.

If you are planning on having this as a public service then I assuming that the overwhelming use-case is simple record retrieval, so I'm not sure what could be gained from using nmcontrol.

Of course, I don't know the first thing about LevelDB nor have I played with the raw blockchain data before. But even if I have to use the JSON-RPC interface I'll still use CouchDB for the REST API and scaling it provides.

khal wrote:Can you add a description how it would work,
what services the API need to provide,
should it be integrated into nmcontrol or do queries on it (and why),
etc ?

To be honest I have no idea

khal wrote:

* Has to run for at least one year

Should a public server with the API be provided ?
For what usage ? testing the API and having a first server before other people create their own ?

Yes, a public API is the whole point of it so people can start developing lightweight services.

@indolering
I am open to other solutions though I would prefer it to be in Python as a lot of Namecoin stuff is in Python and I myself use it. As for nmcontrol... I think it is the easiest solution, allows extra features and part oft the work can maybe reused for running locally.

khal wrote:Can you add a description how it would work,
what services the API need to provide,
should it be integrated into nmcontrol or do queries on it (and why),
etc ?

To be honest I have no idea

If you want to write a bounty to provide an API. then you really do need to define this. It's trivial to create a REST API for any random program because it is just a RPC (if you think about it, URLs are really just a wacky interface for Linux).

phelix wrote:
I am open to other solutions though I would prefer it to be in Python as a lot of Namecoin stuff is in Python and I myself use it. As for nmcontrol... I think it is the easiest solution, allows extra features and part oft the work can maybe reused for running locally.

Since everything is just a RPC, nmcontrol is no better/worse than a straight interface and the work you are asking for is pretty useless for running local utilities. For the initial work, I just cloned a Bitcoin Node.js RPC client and added a few lines for Namecoin specific commands.

Seriously though, I am 1-3 weeks from completing this anyway and the Node/CouchDB implementation is much more useful for web developers. What's great about PouchDB is that it is primarily an in-browser/client-side storage library, so the code will be immediately reusable for the very clients you are looking to support.

phelix wrote:The API would be really simple for a start.... just like namecoind nmcontrol name_show

Do we need something else?

Bounty stands as described.

Can I call dibs to work on it? If it's about speed, I could simply install namecoin on a server and have name_show working in 30 minutes, but you wouldn't get much for your money. I would also like to donate the bounty to fund the new server and whatnot.

phelix wrote:The API would be really simple for a start.... just like namecoind nmcontrol name_show

Do we need something else?

Bounty stands as described.

Can I call dibs to work on it? If it's about speed, I could simply install namecoin on a server and have name_show working in 30 minutes, but you wouldn't get much for your money. I would also like to donate the bounty to fund the new server and whatnot.

Sure thing. Sounds great, looking forward to this. Hope it will be integrated with the Firefox plugin someday so that we will have lightweight Namecoin Tor with TLS.

phelix wrote:
Sure thing. Sounds great, looking forward to this. Hope it will be integrated with the Firefox plugin someday so that we will have lightweight Namecoin Tor with TLS.

It's funny that you posted this, I just got the blockchain dumped into CouchDB and I'm hoping to have the client-side front end working tomorrow.

I should try to work with Sugarpuff on this, I haven't had much time to grok what he is doing. I can't use his as it's JUST and API, not a full syncing database and no client caching. But his security is much better as mine just relies on TLS.