[registry] Currency registrry + name registry

I think i could be insteresting to have :

  • a currency registry : a simple web site, that can register a new currency (from a node), with search capabilities. Such registry could be hosted by “ucoin.io”.
    I was thinking about using elasticsearch as main framework, with a Java frontend node to manage authentication. Authentication could simply use a currency node (the currency Wot) to allow only currency member’s to post data.

Such currency registry could have additionnal features, like :

  • computed statistics on Wot, to speed up search on client software (distance between two memebers, etc.)
  • advanced search features on blockchain : download all trsnaction of a user, in one call, …)
  • “ask for certification” feature : for new member.
    A client like uCoin-Apps must have such high level facilities to speed up navigation.
  • decentralized implemnetation (one or more registry node, with a peer-to-peer synchronization)
  • a name registry : like a DNS, this could be useful to retrieve a pubkey on a compagny, even if :

    • The compagny change it’s pubkey (e.g. password has to be changed for security reason).
    • The compagny use many free currencies : witch pubkey to use ?
      For compagnies with a web site, with not to define a simple file format, to deploy like any other deploy ROBOTS.txt or sitemap.xml files ? for instance a ucoin.xml ?

Such name registry could be use by member too. A example (for bitcoin only) : https://onename.com/vitalik

For currencies and people registry, gnunet is doing some nice things. Their GNS (Gnu Name System) which purpose is to create a decentralized and anonymous DNS can be forked to create a CRS (Currency Registry System) and IRS (Identity Registry System) pretty easily I think.

2 « J'aime »

Few days ago, I stopped my development on uCoin Apps (Android client), because I really need to download too many data on the smartphone : more than i really need.

Last days, I tried some solutions to solve that. I think ElasticSearch (ES). Thank you @vit for this suggestion !

This tool is really cool ! I could re-use my Java code to get the blockchain, then put it back into a ES node.
I have exactly all the blcokchain (same block) in JSON, and can knwon ask some part of it, using a simple and powerful query API.

Some queries examples :

*EDIT : more fun queries:

More documentation here :

1 « J'aime »

Could this be implemented for the high level API we were talking on ucoin nodes ?

Or maybe, like for bitcoin, a user on smartphone should choose a elastic-ucoin server as its data references ?

1 « J'aime »

It could be cool to have a ucoin architecture that include ElasticSearch :

   | uCoin Client                    |  
                   |  Clients send requests
                   |   using common syntax (Basic Merkled API)
                   |     e.g. /blockchain/parameters   ...
                   |   OR using ElasticSearch syntax API
                   |     e.g. /_search?q=...
   +------------------------+     HTTP    +--------------------+
   | uCoin Node (Core API)  |   <------>  | Another uCoin Node |
   +------------------------+             +--------------------+
                   |  uCoin node delegate search queries
                   |   and send new block for indexation in ES
                   |                                    |
                   ▼                                    ▼
   +-----------------------+    SYNC (port 9300)    +-----------+
   | ElasticSearch Node 1  |   <----------------->  | ES Node N |
   +-----------------------+    (internal network)  +-----------+

This architecture :

  • use NodeJS / ucoin as front server

  • allow to define many Elastic Search nodes

  • avoid to deal with ElasticSearch security issue (a security module exists, but not it’s not free :frowning: )

  • avoid synchronization issue on ES nodes dispath every where : sync is only done inside a private network (e.g behind a DMZ). Synchronization between remote nodes if done using the the uCoin basic API, then event are dispathed to ES sub-nodes.

  • allow (anyway) advance features, such as load balancing : Apache server could be configured as a front server, and could dispatch search requests (e.g. like “/search?q=”) directly to ES node. This will allow huge traffic, to many ES nodes, even if only one NodeJs instance is running.

    | uCoin Client                    |  
    | Apache frontend                 |
                    |  Redirect requests on core API
                    |  to NodeJS instance   +---------------+
                    +---------------------->| uCoin NodeJS  |
                    |                       +---------------+
                    |                                    |
                    |  delegate search queries           | Ask
                    |   to ES nodes                      | for new
                    +---------------------------\        | blocks 
                    |                           |        | indexation
                    ▼                           ▼        ▼
    +----------------+    SYNC (port 9300)    +-----------+
    | ES Node 1      |   <----------------->  | ES Node N |
    +----------------+    (internal network)  +-----------+

Your opinion ?

1 « J'aime »

I see that my little suggestion is growing fast in the master mind heads ! :smile:

I am amazed by the simplicity of this implementation and the endless possibility of searching in the blockchain with ES !

I suggest that you help cgeek to implement the sync event to an ES server (when he’ll have time…).

By the meantime, any worker daemon in any language could sync an ES server from a ucoin server at regular interval…

For Cutecoin 2.0, it will be tremendous to use ES to build numerous charts, histograms, etc, at the speed of light…

"Do you smell ? It smells Victory !"
Général Patton.

I’m glad ES can give you such facilities to query the blockchain. It seems very convenient and powerful.

I guess yes, this can be used to provide a higher API. :wink:

However, I think this API should not be provided by classical ucoin software in its core, but as a pluggable feature instead like what @kimamila proposed: ucoin could bind to an elastic search instance (or several?) and provide these features:

  • add an other API to the node endpoints list, providing high level requests (transactions of a key, …)
  • the node would ensure to feed ES correctly with new blocks
  • on call of a method of the new API, make request to the ES instances

If possible, I would prefer to consider we only have 1 ES node to bind to, and that behind the scene some load balancer would do the job of dispatching.

You are right, I do not know anything about ES right now. :grin:

Yes, 1 is enough : if you send data to one ES node, other nodes will be notified and synchronized, using a specific port (9300). We have nothing special to implement for that (just configuration).

I will try (with your help) to add events on ucoin (such as new block), using a plugin/extension point mechanism.
ES is very (very) easy to use, you will see. :wink: