The challenge you have in front of you now, is to perform additional actions to attachments such as, automatic translation, transcoding, automatic closed captioning. These actions are triggered once the media file is uploaded. As an initial step, you must create the skeleton of the back-end service for performing the automatic closed captioning under these assumptions: The closed captioning is performed through an external service (AWS or GCloud). There should be an internal controller that: Receives the recordings to be processed from a requester Sends the recordings to the external service Receives its response Updates the recoding with the resulting closed captioning; and Responds back to the requester The recordings can be processed simultaneously, but there is a limit of only 5 concurrent processes that can be handled by the sender. Therefore, there should be a queue that will act as a buffer for the overhead. Once the recording is processed, the external service responds with a callback, therefore a listener should be ready to receive that request and update the object with a text file containing the strings for the closed captioning. Only audio and video can be processed. The processing time depends on the length of the recording. Task Main class Write a Main class that you will use as the simulator for testing you Classes Closed-captioning controller Write the class that will simulate the recording to be processed, which contains an id, the media, a length and the strings for closed captioning. Write a class that will be the actual controller (or spooler). Write a class that will act as the worker for processing closed captioning through an external service Implement the queue and callback actions This is the main class i have so far, im trying to figure out how to add a queue to mostly. import java.util.LinkedList; import java.util.List; import java.util.UUID; public class Main {     public static void main(String[] args) {         List recordings = new LinkedList();         // Set the mock-up recordings.         for (int i = 0; i < 15; i++) {             String fileName = "Recording " + String.valueOf(i);             Long fileSize = (long) (Math.random() * (1024L - 1L));             String media = null;             String cC = null;             recordings.add(new Recording(UUID.randomUUID(), media, fileName, fileSize, cC ));         }         // Enqueue recordings for closed captioning.         CCSpooler spooler = new CCSpooler();         recordings.forEach((recording) -> {             spooler.enqueue(recording);         });         spooler.shutdown();     } }

icon
Related questions
Question

The challenge you have in front of you now, is to perform additional actions to attachments such as, automatic translation, transcoding, automatic closed captioning. These actions are triggered once the media file is uploaded.

As an initial step, you must create the skeleton of the back-end service for performing the automatic closed captioning under these assumptions:

  • The closed captioning is performed through an external service (AWS or GCloud).
  • There should be an internal controller that:
    • Receives the recordings to be processed from a requester
    • Sends the recordings to the external service
    • Receives its response
    • Updates the recoding with the resulting closed captioning; and
    • Responds back to the requester
  • The recordings can be processed simultaneously, but there is a limit of only 5 concurrent processes that can be handled by the sender.
  • Therefore, there should be a queue that will act as a buffer for the overhead.
  • Once the recording is processed, the external service responds with a callback, therefore a listener should be ready to receive that request and update the object with a text file containing the strings for the closed captioning.
  • Only audio and video can be processed.
  • The processing time depends on the length of the recording.

Task

Main class

  • Write a Main class that you will use as the simulator for testing you Classes

Closed-captioning controller

  • Write the class that will simulate the recording to be processed, which contains an id, the media, a length and the strings for closed captioning.
  • Write a class that will be the actual controller (or spooler).
  • Write a class that will act as the worker for processing closed captioning through an external service
  • Implement the queue and callback actions

This is the main class i have so far, im trying to figure out how to add a queue to mostly.

import java.util.LinkedList;
import java.util.List;
import java.util.UUID;

public class Main {

    public static void main(String[] args) {
        List<Recording> recordings = new LinkedList<Recording>();
        // Set the mock-up recordings.
        for (int i = 0; i < 15; i++) {
            String fileName = "Recording " + String.valueOf(i);
            Long fileSize = (long) (Math.random() * (1024L - 1L));
            String media = null;
            String cC = null;
            recordings.add(new Recording(UUID.randomUUID(), media, fileName, fileSize, cC ));
        }

        // Enqueue recordings for closed captioning.
        CCSpooler spooler = new CCSpooler();
        recordings.forEach((recording) -> {
            spooler.enqueue(recording);
        });
        spooler.shutdown();
    }

}

 

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Multimedia tools and applications
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, data-structures-and-algorithms and related others by exploring similar questions and additional content below.