Sobes.tech
Junior — Senior

Creating a thread-safe REST service for managing user posts

livecode

Task condition

Develop a REST API that implements the following features:

  1. An endpoint for saving a new message from a user.
  2. An endpoint for retrieving a news feed: returns either all messages or only messages from a specific author based on the user_name parameter.

Implementation requirements:

  • Data should be stored in memory (InMemory).
  • The solution must be thread-safe.
  • Follow object-oriented principles in the design.

Structure of the incoming request:

  • Request:
    • user_name — a unique identifier of the author.
    • message — the message text.