Forum rules


Warning !
Avoid using binary softwares from untrusted users.
Prefer compiling it yourself and verify sources.



Reply to topic  [ 5 posts ] 
Experimental API Server 
Author Message

Posts: 1625
Reply with quote
Post Experimental API Server
Experimental version online. See the nmcapiclient.py example.

https://github.com/phelixnmc/nmcapi

You are welcome to review, especially the nginx config.

Readme:
Code:
nmcAPI
======

API server for Namecoin names.


Features
=======
Handles imports.
Requests and output are obfuscated (nothing is encrypted for now).
Fetching uncached data takes about a millisecond. This is a bottleneck.
All caching is done in Nginx (10 minutes).
Cached responses should be super fast
Rate limiting in Nginx
namecoind and backend run supervisord


Dependencies
==========
bottle:
    pip install bottle

waitless (optional, to improve performance):
    pip install waitless

How to use
=========
Start a local server:
    python ./api.py -debug -port=8080
Start a public server:
    python ./api.py -public

See nmcapiclient.py on how to do lookups. Currently the server can be used with nmcontrol-hyperion and hopefully soon with official nmcontrol.


Performance & Stability
==================
For anything else than personal use the server should run through waitless and nginx and be managed by supervisord. Config files for nginx and to set up supervisord are included. For security you might want to set up a separate user account.


ToDo
====
help at root url (automated via route function?)
improve https handling
check https fingerprint for self signed certs
new query: current block height / block time
serve block headers to improve security
  - for name_op
  - for current height
harden against ddos


License
=======
LGPL unless it says otherwise in the source file.


(edited)

_________________
nx.bit - some namecoin stats
nf.bit - shortcut to this forum


Thu Mar 05, 2015 2:38 pm
Profile

Posts: 1625
Reply with quote
Post Re: Experimental API Server
Now available at api.namecoin.org

_________________
nx.bit - some namecoin stats
nf.bit - shortcut to this forum


Wed Mar 11, 2015 3:04 pm
Profile

Posts: 1625
Reply with quote
Post Re: Experimental API Server
In the meantime I enabled TLS: https://api.namecoin.org/beta1/xname/sO ... =+1Mjxkg==

BTW: It is quite easy to run your own API server:

Install supervisord
Install nginx
Install namecoin
Maybe create special users
copy/paste nginx and supervisord config files, edit paths/users if necessary

_________________
nx.bit - some namecoin stats
nf.bit - shortcut to this forum


Wed Apr 22, 2015 9:10 am
Profile

Posts: 1625
Reply with quote
Post Re: Experimental API Server
The API is still trucking along steadily though I never touched it. :mrgreen:

_________________
nx.bit - some namecoin stats
nf.bit - shortcut to this forum


Tue Jun 16, 2015 3:58 pm
Profile

Posts: 1625
Reply with quote
Post Re: Experimental API Server
Added readme with instructions on how to play with it (e.g. set up your own API server). You need to have namecoind running (and synced) for it to work.

_________________
nx.bit - some namecoin stats
nf.bit - shortcut to this forum


Tue Jul 28, 2015 3:41 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.