Warner Music LLD Round

warner music logo
warner music
November 19, 20251 reads

Summary

I had an LLD round for Warner Music on November 21st, where I was tasked with designing an 'Artifact Generation' client to process music orders, orchestrate metadata and asset production, and handle various failure scenarios according to strict business rules.

Full Experience

I recently had an LLD (Low-Level Design) interview round with Warner Music on November 21st. I was provided with a pre-read for coding that allowed the use of AI tools, along with a PDF containing the problem statement. The core of the interview revolved around designing an "Artifact Generation" client. This client needed to ingest individual song "Orders" from a queue, orchestrate the production of associated Metadata (XML) and Assets (like audio WAV and cover art TIFF files), and then publish the results for further processing.

The challenge was significant because it involved interacting with a series of JSON APIs, which were explicitly stated to be potentially unreliable. Therefore, my design had to robustly handle various failure scenarios. Key orchestration requirements included taking an order from the queue first, completing asset generation before initiating metadata generation, and preventing metadata generation if asset generation failed. Depending on the success or failure of asset and metadata generation, I had to submit either a FailedOrder (with or without asset data) or a ShippableOrder. The problem also emphasized that breaking the state machine or submitting incorrect orders would be irreversible, highlighting the need for a precise and resilient design.

Interview Questions (1)

Q1
Design an Artifact Generation Client for Music Orders (LLD)
System DesignHard

You will build an “Artifact Generation” client that ingests Orders from a queue, orchestrates the production of Metadata and Assets, along with their respective AssetDetails, and publishes the results for further processing. This happens via a series of JSON APIs, implemented in a testserver binary that you have been / will be provided. These APIs may not always reliable, and your client must handle failure correctly.

Context

WMG distributes music to partners like Spotify via the concept of an Order, which represents an individual song. These Orders are delivered to partners in the form of Metadata (XML) and Assets (audio WAV, coverart TIFF, etc) files.

What You Need to Do

Generally speaking, for each Order, you will:

  • take an Order from the queue
  • queue Asset generation
  • wait till it finishes, and then get Asset and AssetDetail data
  • queue Metadata generation
  • wait till it finishes, and then get Metadata data
  • bundle all the data together and submit it as a ShippableOrder

Data Model

The relationship between Orders, Assets, AssetDetails and Metadata is as follows:

  • An Order has 1:many Assets => An Asset belongs to a single Order
  • An Order has 1 Metadata => A Metadata belongs to a single Order
  • An Asset has 1 AssetDetail => An AssetDetail belongs to a single Asset

Orchestration Requirements

Specifically, there are some rules you must follow while processing each Order, as listed below:

  1. You must "take" an Order from the queue before doing anything else with it
  2. You must finish Asset generation before triggering any Metadata generation
  3. You must not trigger Metadata generation if Asset generation failed
  4. If Asset generation fails:
    • You must submit a FailedOrder without Asset/AssetDetail or Metadata data
  5. If Metadata generation fails:
    • You must submit a FailedOrder with Asset/AssetDetail data but without Metadata data
  6. If both Asset and Metadata generation succeed:
    • You must submit a ShippableOrder with both the Asset/AssetDetail data and Metadata data

Tips

  1. There are no dependencies between Orders; the status/processing of one Order does not impact any other Order
  2. If you break the state machine by failing to follow the above orchestration rules, you cannot recover it
  3. If you submit an Order incorrectly (incorrect data/status), you cannot recover it
Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!