Native Ads Weekly Dev Update #4

in #hivemind5 years ago

Since my last update, I implemented the "ordered workflow" logic, which deals with ad operations; validating them and saving the various state changes to the DB. Here's a brief rundown on what I did:

  • implemented validation checks for all ad operations (adSubmit, adBid, adApprove, adAllocate, adReject)
  • implemented the ordered workflow to handle ad state (draft, submitted, approved)

I also moved core native ad code to the hive/indexer/ module, in two classes:

  • NativeAd: handles initial ad creation, content updates and other common methods
  • NativeAdOp: handles individual ad operations (validating ops & updating the DB)

I did this for modularity, to make integration into the indexer as easy as adding a few lines of code to the core Hivemind codebase, with most code residing in the new hive/indexer/ module. The benefits:

  • limits the code's exposure to upstream changes
  • isolates local changes from the core codebase
  • easier code review during future merges
  • isolated debugging

You can see all the commits I made last week in the native-ads-alpha-dev branch:

This week's scope

  • SQL queries that will be used to update DB state, triggered by ad operations
  • tracking payments, storing them in DB, trigerring updates to ad state
  • performing test operations

See my current branches on GitHub:

Coin Marketplace

STEEM 0.23
TRX 0.12
JST 0.029
BTC 66216.02
ETH 3547.44
USDT 1.00
SBD 3.01