-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for discussions #13
Comments
ContextCurrently the Browsing online, the most well-known platform that allows to implement discussions on any website is probably Disqus. This service allows any user to implement a comment-and-answer based system inside any HTML page. The aim of this implementation proposal is to allow anyone to create a new Post that provides the same functionality. Discussion support implementation proposalThe support for discussions that I've thought is based on a revisit of the type Post struct {
PostID PostID `json:"id"`
ParentID PostID `json:"parent_id"` // Id of the post of which this post is an answer of
Message string `json:"message"`
Created int64 `json:"created"`
LastEdited int64 `json:"last_edited"`
Owner sdk.AccAddress `json:"owner"`
AllowsComments bool `json:"allows_comments"` // Tells whether the user can comment or not on this post
Comments []PostID `json:"comments"` // Ids of the comments that are answers to this post
} Changes
New operationsNo new operation should be implemented. The creation of discussion posts can be done through the creation of simple posts. State managementThere must be a change into how the state is managed, particularly on what happens when a new post is created. Currently, when a post is created, the only operation that is done is saving it inside the state. Now, with the addition of the
|
Can we build an iterator to find out all the child |
You are right. This is always a trade-off for using key-value pair database. I see the same issue on MongoDB as well. It's not like how we can retrieve data in RDBMS. Keep the |
Signed-off-by: RiccardoM <[email protected]>
This will be very useful for proposal discussions on Cosmos Hub
The text was updated successfully, but these errors were encountered: