Failed launch of V2.x

There were no any news for quite a while now. I guess no one really noticed, but last week I tried to launch V2 of this project. It included following updates:

  • Background computing of Proof-of-Work, so user don’t have to manually “unlock” form at all
  • Preserving Proof-of-Work between page reloads. This allows to calculate proof-of-work and use it on current page or next. So for example if you read 10 pages and want to comment on last article – you most likely don’t have to wait at all, just click submit, because by that time you accumulate enough proof-of-work already to submit form.
  • API to use this proof-of-work in other applications (like in-game currency)
  • Better feedback for older browsers, so users could see why they can’t submit form using Internet Explorer 8 :)

These were major targets for V2, and it does work indeed when testing locally, but totally failed when deployed to production. Here are lessons I learned:

  • Ability to quickly roll-back is GREAT :)
  • Socket.IO is totally useless with any serious number of concurrent users. I am going to use `ws` node.js module and directly browser’s WebSocket API in next release.
  • I need to have two identical clusters ready and ability to slowly switch incoming users from old one to new one. Right now I have one server running few docker containers and when deploying new version all users immediately get switched to new release. While in theory it should be all good, in practice I want to have more granular and smooth control over deployment progress. My current plant is to create two identical clusters based on Deis.io and adjust config of HAProxy (this is what used as a load balancer currently) to allow changing PERCENTAGE of users going to cluster A or cluster B.
  • Proof-of-work currently used is Dogecoin’s scrypt blocks hashing. The way in-browser miner works with it – uses server software to proxy `getwork` requests. The problem with this approach is that after certain number of concurrent users, `getwork` method is just not able to keep up with submitted work. I am currently working on implementing hybrid based on stratum protocol.

All in all I am moving steadily toward V2.1 which should include all changes above. Hopefully next launch will be successful :)

3 thoughts on “Failed launch of V2.x”

  1. is there something to accomodate non-js users or just people with sadly too old browsers?
    there sadly are enviromnents where IE is the only browsers and more often than not even that is up to date (or it cant be newer, like ie9 is max on vista)

    1. April, unfortunately there is no way to make anything like proof of work calculation without client-side javascript. So in these cases some alternative should be automatically used.

      Depending on application i would see these possibilities:

      – prevent user from registering, but tell them to reach out support team to create account
      – allow to post comment, but mark it for moderation
      – ask user solve old image-based CAPTCHA instead

      All of these options has their downsides, and should be considered carefully based on specific application, that’s why I left it out from hashcash.io . But all of these three could be good candidate to be part of wp-hashcash plugin for WordPress, again, after careful consideration, since we probably do not want to admin to moderate zillions of spam…

      I do not have any timeline for any of these features at this time, but I will gladly accept pull requests on GitHub :)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>