Polls are coming to Hive: HAF Plug & Play Development Update #6

haf-plug-play-polls.png

Since my last update, I've made progress on a new feature that I have been working on for a while: polls.

I'm currently doing internal testing, the code is mostly done for the initial version and I expect to have a production release this week. More details are below.

This week's pull request: https://github.com/imwatsi/haf-plug-play/pull/8


What is the "polls" protocol?



Non-technical overview

polls is a new sub-protocol on Plug & Play that enables any Hive-based frontend (like Hive.blog, PeakD, 3Speak or Ecency) to add polls as a feature for users.

When fully integrated, making a poll will be as easy as:

  1. write the question
  2. define the valid answers
  3. choose a tag
  4. set an expiry date
  5. post it

It will be possible to view trending polls, vote on the ones you want to participate in and hold discussions around a poll of interest.

The aim is to allow users and communities to discuss issues/interests and vote to show public opinion or consensus. Polls can be about anything: community decisions, Hive improvement or development proposals, hardfork features, current affairs, favourite music, personal preferences, ideas and goals, trends... anything that you would want to get public opinion and discussion around.

The protocol will also avail stats for dApps to show users information like most popular poll, most active users, etc.

Technical Overview

The polls protocol is built on custom_json ops and JSONRPC endpoints. Any frontend can integrate polls by using the different operations supported by the protocol and then accessing data via the API endpoints.

Example custom_json ops (final, detailed documentation will be available with a production release):

To create a poll:

[
    [1, "app-name/0.01"],
    "create",
    {
        "permlink": "",
        "question": "",
        "answers": [],
        "expires": "",
        "tag": 
    }
]

To vote on a poll:

[
    [1, "app-name/0.01"],
    "vote",
    {
        "author": "",
        "permlink": ""
    }
]

  • discussions (planned): ops to create and comment on discussions, linked to polls
  • stake-based tallies (planned): HAF code to calculate stake and attach it to votes, for viewing or stats

When can "polls" be used?

I am running tests on my current code and I expect to release a production version this week. That's for the backend, on Plug & Play itself. I am working with a frontend developer to create a sample web app that can be used to interact with polls to showcase what's possible. We're still working on this and it should be out in a week or two. I'll keep you posted on its progress.

Removed follow, community and reblog plugs

I have removed the follow, community and reblog plugs from Plug & Play as they will duplicate work currently underway with Hivemind moving over to being a HAF-based app. I plan on developing more protocols like polls that add unique features to Hive using Plug & Play.


Production Server: https://plug-play.imwatsi.com
Dev Server: https://plug-play-beta.imwatsi.com (unstable, may not be available at times)



Current work scope

  • onboard Podping
  • complete the polls protocol and release in production
  • landing page and sample web apps
  • work on improving setup and installation
  • custom_json design recommendations
  • documentation for setting up custom nodes


That's it for this update!


Proposal

The DHF proposal for this project is now funded. Thank you for supporting this project.



  • I run a Hive witness node:

H2
H3
H4
Upload from PC
Video gallery
3 columns
2 columns
1 column
26 Comments