Serving Okapi longhorn F-A-A-S

Issue #6 new
Bijoy Paul created an issue

Hi, Recently we came across a situation where we need to deploy okapi longhorn into AWS Lambda. We have achieved our goal by adding a new class/module for lambda and also we are using S3 to maintain the working directory state. Now we are thinking to make the codebase be available to all.

If you think it would be a good feature we can check in our code and raise a PR. We are hoping to hear from you soon.

Comments (4)

  1. Chase Tingley

    I'd be very interested in looking at this! I am curious about how it works with Lambda, given that Longhorn is very file-based, and my understanding of Lambda was that local files were not meant to persist past a single operation.

  2. Bijoy Paul reporter

    The plan is to upload all the working directory files to the S3 before the end of the each Lambda execution and cloning the files from S3 by project id before each lambda execution and write it to the specific file location. @diwakarbhatt have worked on this feature. He also can give some context on this.

  3. Diwakar Bhatt

    Thank you @bijoypaul for the explanation. So as Bijoy explained the way we handle file operation for Longhorn is by uploading the whole working directory to S3 bucket and downloading when required.

    On calling a lambda function following steps would take place - * Download the working directory from S3 to local in the appropriate path(If present). * Get the batch config file & source file from S3.(We are passing S3 URL with request instead of file). * Perform the Execution. * Upload the working directory back to S3 bucket.

    Also currently as per requirements, we have two lambda functions one that performs XLIFF extraction from source document another that perform merging(generating translated source document back from XLIFF).

    We are currently performing some refactoring, restructuring, once that is done we'd be very happy to contribute this to existing codebase.

  4. Chase Tingley

    Hi @bijoypaul and @diwakarbhatt,

    I hope your project is going well! I wanted to check in and see if there were any issues you'd found with Longhorn or ways we could help on our end.

  5. Log in to comment