Meeseeker Op Timestamps - 0.0.5

in utopian-io •  7 days ago

As of 0.0.5, op results contain a timestamp field. This field was missing because it's not really part of the op, but it makes sense to add it so if your app actually needs it, there's no need to do an additional look up. In steemd, account history already has it for similar reasons.

In addition to this change, I had to switch to internal handling of the operation streams. This is primarily because timestamp is not available unless requesting the entire block, which is abstracted away by steem-ruby. This results in a slight performance improvement because I can ask for the entire block without needing to request block headers (fewer API calls).

So, the only change clients will see is the addition of timestamp in the result, for example, from redis-cli, if we wanted to get an op:

$ redis-cli
127.0.0.1:6379> get steem:31069068:ea222fa499b8f284e31c2ca92d876696941b94d2:0:custom_json
"{\"type\":\"custom_json_operation\",\"value\":{\"required_auths\":[],\"required_posting_auths\":[\"lottoshi\"],\"id\":\"drugwars\",\"json\":\"{\\\"author\\\":\\\"lottoshi\\\",\\\"type\\\":\\\"fight\\\",\\\"payload\\\":{\\\"target\\\":\\\"piaristmonk\\\",\\\"units\\\":[{\\\"key\\\":\\\"knifer\\\",\\\"amount\\\":1},{\\\"key\\\":\\\"bazooka\\\",\\\"amount\\\":6},{\\\"key\\\":\\\"big_mama\\\",\\\"amount\\\":3},{\\\"key\\\":\\\"mercenary\\\",\\\"amount\\\":5},{\\\"key\\\":\\\"bouncer\\\",\\\"amount\\\":93},{\\\"key\\\":\\\"ninja\\\",\\\"amount\\\":2},{\\\"key\\\":\\\"gunman\\\",\\\"amount\\\":36},{\\\"key\\\":\\\"rowdy\\\",\\\"amount\\\":146},{\\\"key\\\":\\\"hitman\\\",\\\"amount\\\":5},{\\\"key\\\":\\\"sniper\\\",\\\"amount\\\":22}]}}\"},\"timestamp\":\"2019-03-11T20:20:54\"}"

Special thanks to @emrebeyler for requesting this change. It's great to know that devs are using this tool in their projects.


To update your gem:

gem update meeseeker

Previous posts:

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:  

Hello, @inertia!

Thank you for your contribution. This is a great project, and it's good to see all the development being made. Your post is interesting and contains useful information about the recent developments.

In terms of content, this was a mixed bag for me. Even though I like all the information provided, I have to admit that I wanted to read a bit more about the changes described in your review. Furthermore, I have to admit that I wish you had presented all the information in a simplified manner; the post is highly technical, which makes it hard for the average reader to get a flavour of the key points for the whole text. Regardless, the post is editorial, and I truly appreciate the effort you put into your work.

I look forward to your next contribution.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

·

Thank you for your review, @lordneroo! Keep up the good work!

Thanks for the fast update!

For my use case, I have needed a way to listen specific custom jsons (by id) and report them in a discord channel.

Since discord.py uses asyncio, all your client code must use async libraries. Using sync libraries in a event loop never ends well. That requirement eliminates all python clients of steem. (except maybe asyncsteem of @pibara, but I have a negative bias to twisted :P).

Keeping that in my mind, I thought meeseeker may have a use case here since using redis in an async way is much easier on discord bots, (aioredis) plus, meeseeker remove some boilerplate code to parse, filter new transactions in the blockchain.

·

Perfect use case. I hope that works out.

Hi @inertia!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 6.595 which ranks you at #144 across all Steem accounts.
Your rank has improved 3 places in the last three days (old rank 147).

In our last Algorithmic Curation Round, consisting of 205 contributions, your post is ranked at #3. Congratulations!

Evaluation of your UA score:
  • You've built up a nice network.
  • The readers appreciate your great work!
  • Great user engagement! You rock!

Feel free to join our @steem-ua Discord server

Hi, @inertia!

You just got a 1.04% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.