Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-4273

New API endpoint for synchronous file translation

Details

    • New Feature
    • Resolution: Unresolved
    • None
    • None
    • InstantTranslate
    • High
    • Hide
      Added new endpoint for synchronous file translation:
      editor/instanttranslateapi/filepretranslatenow
      Show
      Added new endpoint for synchronous file translation: editor/instanttranslateapi/filepretranslatenow

    Description

      problem

      The InstantTranslate filepretranslateAction API endpoint is receiving data, starting the whole import workers and is ending it self. The ready translated data can then be fetched later.

      For a specific use case with very small data (given as fileData and fileName POST parameter) this taken to much resources since the client is making multiple polls to check if the task is ready. Also the client wants really fast results, so the seconds between the poll calls must be removed.

      solution

      We provide a separate endpoint in Editor_InstanttranslateapiController, which does basically the same as the filepretranslateAction, with the difference that it directly returns the results of the translated task (connection stays open for the call that uploads the file for translation and returns the translated file, once it is ready).

      Should be a separate endpoint (and not just a parameter in the existing one) in order to control access burst restrictions in nginx for that endpoint.

      The response of the new endpoint should contain the id of the created task, so that it can e. g. be deleted with another request via api.

      Attachments

        Issue Links

          Activity

            People

              volodymyr@mittagqi.com Volodymyr Kyianenko
              tlauria Thomas Lauria
              Thomas Lauria
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: