Skip to content

Example: Comment replies

Esta Nagy edited this page Feb 11, 2023 · 3 revisions

It is not hard to imagine situations when a site allows people to comment in threads. One possible implementation can fetch the thread starters in one query and then all of the replies organized by their thread starter ids. A similar example can be found under this folder. The request and response packages are self-explanatory, while raw contains the origin service and the service caller we implemented for wrapping it. The transform package defines how caching will be done, and how we will split/merge the request and response objects similarly to the other examples detailed by this wiki.

To illustrate how the comment threads would look like, please refer to the following example:

Article: Caching is not always easy

Comments:

J. Kidding wrote: First!

K. Bye replied: Second!

J. Kidding replied: Almost!

S. Serious wrote: Great article, thank you!

O. Pen wrote: Do you have an example project?

O. Pen replied: Please ignore me, just found it on my own.

S. Serious replied: I am looking for one too, could you send a link?