This will be a custom solution, below can be high level thoughts which can get you started.
Below 2 Lists are required at least, assuming you already have Article Pages library.
CommentId, - Unique id
CommentText - Comment text provided by user
CommentBy - Person and Group who gave comment
ParentCommentId - Lookup CommentId if it is replied to any parent comment
PageId - Lookup from Article Page Library.
PageURL - URL of Page(not sure if it is required)
Like Count - total number of likes on this comment.
LikeId - unique id
Liked By - Person and Group
CommentId- Lookup from Comment List.
Idea is to write custom CSOM or rest API to read/write comments for particular page. All of below are just CRUD operations on Lists, I have not provided on examples of how to perform create,read, update, delete operation on list via CSOM or REST API, you can refer to MSDN or any other site, there are plenty of examples available.
Now coming to all your questions
- Comments for each page should be mutually exclusive i.e.
comments posted on page A should not be visible on page B
Query Comment list based on Page id, you will get list of all comments for this particular page Id.
When user add comment, Create new entry in comment list with PageId. Keep ParentCommentId to empty, from this you can identify that current comment is parent comments.
when any user like a comment, create new entry in Like list with CommentId, also update comments list entry by incrementing counter.
If you want them to undo like, do the reverse.
2a Like the comment (and effectively increment the like counter for the comment. Like counter is also displayed on page)
Query Like list and display current likes for a particular comment. Add entry in Like list when a comment is liked.
2b. Reply to the comment (Replies should be indented appropriately to the parent comment so that they are easily classified as replies. Replies can also have replies (n level deep). Replies can also be liked/shared)
When a reply to comment is given, create new entry in Comment List, but in this case also update ParentCommentId. this will identify that this is child comment of some parent comment.
Use your html skills to make indentation based on wheather a comment is parent comment or reply to some comment. your code logic should handle replied within replies etc based on ParentCommentId column.
2b. Share the comment (via email)
Question 3 - this will be purely based on how effective your code retrieves list data...this is very open ended question.
Hope this helps..!!
To make sure list threshold values are handled properly, create Indexes on below columns and make sure you are always using filter in order of column mentioned below.... Ideally SharePoint list can hold millions of records and if our information architecture is designed properly and indexes and CAML query are based on this filters, we should be good.
PageId, CommentId, ParentCommentId