📜 ⬆️ ⬇️

Global network of discussions and comments

Purpose:
To enable users to comment and discuss any page on the Internet.

How to solve:
To work on the client is implemented BHO, an extension for FF and a plug-in for the opera. When the browser enters the web page, such a plugin makes a request to the server, receives information about the number of comments for this page, and then their content, and if this number is> 0, displays these comments on the page (bottom or side or… how the user will select in the settings of the plugin), in a user-friendly form (page by page N on the page or in the form of a tree or ....) using all the Ajax frills. Very cool would look like a dash on a habr with the number of comments on the page and when you click on it on the page would appear previously hidden content with the discussion.

Those. in other words, the plugin modifies the code of the page generated by the browser, integrating into it a mini-forum.
')
Obviously, the server load will be very significant, so you need to think about the distribution and load balancing of the database immediately. To issue data, an API is implemented that allows the client to authenticate and retrieve data on request in the form of XML or something close to plain text, and also to write new comments to the database.

The server runtime interacts with the database servers, the load on which is distributed for example over the first letter of the domain, i.e. we have several database servers, the first serves RU domains starting from A to F, the other from G to L, etc. Naturally, this is all very simplistic, but in fact such subgroups should be formed on the basis of at least from the domain name naming statistics.

With this formulation of the problem, the question immediately arises how to deal with pages whose URL is unique during each visit, for example, if the site engine transmits the session ID to the URL. I think this problem is mostly solved, and by creating a base of templates for such URLs used in popular forum engines and CMS, you can immediately cover 90% of problematic URLs.

Source: https://habr.com/ru/post/62234/


All Articles