Roadmap update (1)

in deepcrypto •  6 years ago 

 In the last couple of days we made some changes to the backend:

  • Web Proxy:
    • Replaced NGINX with Traefik, this allows for automatic service detection on Docker Swarm. Which allows us to easily deploy our own services behind a web proxy with minimal configuration.


  • BitShares-UI:
    •  Updated to latest version 180912
    •  Added our API servers and referral to BitShares-UI
    •  Created Docker Image
    •  Deployed Docker Container on Docker Swarm
    •  Setup a staging so we can test new releases, before pushing it to production


 Whats the short term plan: 

  • Migrate the BitShares WebSockets to a new VPS (will still use NGINX, more on that in another blog post) 
  •  Visit BitFest in the Netherlands, Amsterdam!! 


The Golang module for BitShares: 

One of the great things in Golang is a Struct, this ‘thing’ allows for easy marshaling and unmarshaling of JSON data, to/from a format that Golang understand. 

One of the down sides is dynamic json, where a request can have multiple outputs of different types, for example: the Graphene Database API call: get_objects, accepts multiple values of different types, and will also return values of multiple values of different types

Requesting object 1.3.0 (BTS asset) and 1.6.128 (our witness) 

{
"id": 1,
"method": "call",
"params": [0, "get_objects", [["1.3.0", "1.6.128"]]]
}

The Response

{
"id": 1,
"jsonrpc": "2.0",   
"result": [
{"id": "1.3.0",
"symbol": "BTS",
"precision": 5,
"issuer": "1.2.3",
"options": {
 "max_supply": "360057050210207",
 "market_fee_percent": 0,
 "max_market_fee": "1000000000000000",
 "issuer_permissions": 0,
 "flags": 0,
 "core_exchange_rate": {
   "base": {
     "amount": 1,
     "asset_id": "1.3.0"},
   "quote": {
     "amount": 1,
     "asset_id": "1.3.0"}
   },
   "whitelist_authorities": [],
   "blacklist_authorities": [],
   "whitelist_markets": [],
   "blacklist_markets": [],
   "description": "",
   "extensions": []
   },
 "dynamic_asset_data_id": "2.3.0"
},


{
"id": "1.6.128",
"witness_account": "1.2.876613",
"last_aslot": 0,
"signing_key": "BTS7qKGdA9AJWz9a7mu63AgCBoWQ7dRkzF9SsUh2iZ5YXYzk2pxGk",
"vote_id": "1:378",
"total_votes": "8784142496916",
"url": "https://bts.deepcrypto.trade/",
"total_missed": 0,
"last_confirmed_block_num": 0
}
]


As you can see both JSON documents in the result array,  have no similarity at all with the exception of that it is a JSON document with an id field . This makes it a bit harder, but still possible to (un)marshal JSON (to/)into something that Golang can work with. 


I’m will spend some time on this to figure out on how to make an elegant solution. 


-Mouse

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Congratulations @deepcryptotrade! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You got your First payout

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @deepcryptotrade! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

The Steem community has lost an epic member! Farewell @woflhart!
SteemitBoard - Witness Update
Do not miss the coming Rocky Mountain Steem Meetup and get a new community badge!
Vote for @Steemitboard as a witness to get one more award and increased upvotes!