GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - LucaMueller1/Lithops-Thumbnails-CodeEngine: Serverless deployment on IBM Cloud Code Engine that uses the Lithops Framework to process images in parallel

BranchesTags
Open more actions menu

Latest commit

 

History

32 Commits
32 Commits

Folders and files

NameName
Last commit message
Last commit date
dataset
dataset
 
 
documentation
documentation
 
 
stats
stats
 
 
testingScripts
testingScripts
 
 
.gitignore
.gitignore
 
 
.lithops_config
.lithops_config
 
 
Dockefile.default-codeengine-runtime
Dockefile.default-codeengine-runtime
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
server_thumbnails_multi.py
server_thumbnails_multi.py
 
 
server_thumbnails_sequential.py
server_thumbnails_sequential.py
 
 
serverless_thumbnails.py
serverless_thumbnails.py
 
 

Repository files navigation

Repository for Research Paper: Serverless Thumbnail Generation

Serverless deployment on IBM Cloud Code Engine that uses the Lithops Framework to process images in parallel

English Title: Juxtaposition of thumbnail generation on IBM Cloud Code Engine with multiprocessing through the Lithops Framework and the traditional deployment on a virtual machine

German Title: Gegenüberstellung eines serverless Batch Jobs basierend auf dem Lithops Framework zur parallelen Generierung von Thumbnails auf IBM Cloud Code Engine und der Bereitstellung auf einem Virtual Server im Hinblick auf Performance, Skalierbarkeit und Kosten

(susceptible to change)

This repository contains:

  • The code for the thumbnail generator as used for the research paper
    • server_thumbnails_sequential.py (Sequentially generate thumbnails on local machine)
    • server_thumbnails_multi.py (Use the standard python multiprocessing library to generate thumbnails in parallel on local machine)
    • serverless_thumbnails.py (Uses Lithops to create a Batch Job that will spawn one worker per image to be processed. Benefits from principle of unlimited capacity in the cloud)
  • Documentation including charts and architecture
  • The dataset of images I used for the research paper
  • Logs&Stats of all the experiments I conducted for transparency

Recreating the results from the research paper:

  • Closely follow the following steps to set everything up
  • Run server_thumbnails_sequential.py and server_thumbnails_multi.py on a virtual machine with the configuration:
    • 2 vCPU
    • 8 GiB Memory
    • 4 Gbps Network-Bandwidth
    • Ubuntu 20.04.2
    • Python 3.8
  • Even when following the instructions the results might vary from the ones in the paper because of:
    • Your used images (My dataset of images is in the /dataset directory)
    • Varying response time of IBM Cloud COS, IBM Cloud Code Engine
    • OS-specific configuration of the virtual machine

RUNNING MY SCRIPT WILL CREATE COSTS due to high bandwidth usage of COS and usage of Code Engine or a Virtual Server

Running the Thumbnail Generator

Setting up requirements

  • Create an IBM Cloud IAM Key here
  • Create an IBM Cloud COS Bucket and store all images to be processed in a directory called images
  • Create an IBM Cloud Code Engine Namespace
  • Add these keys with your values to the .lithops_config:
lithops:
    storage: ibm_cos
    storage_bucket: <YOUR BUCKET NAME>
    backend: code_engine
    mode: serverless
    
ibm:
    iam_api_key: <IAM_API_KEY>
   
code_engine:
    namespace: <NAMESPACE>
    region: <REGION>
    runtime: ibmfunctions/lithops-ce-v385:235

For more info, have a look here

Sequential Thumbnail Generation

  1. Run server_thumbnails_sequential.py
  2. The script will read the available images in the bucket
  3. Specify the number of images to be turned into thumbnails in the console
  4. The script will generate the thumbnails and will save them to the /thumbnails directory in your bucket root

Multiprocessing Thumbnail Generation

  1. Run server_thumbnails_multi.py
  2. The script will read the available images in the bucket
  3. Specify the number of images to be turned into thumbnails in the console
  4. The script will generate the thumbnails and will save them to the /thumbnails directory in your bucket root

Serverless Thumbnail Generation (Lithops)

  1. Run serverless_thumbnails.py
  2. The script will read the available images in the bucket
  3. Specify the number of images to be turned into thumbnails in the console
  4. The script will generate the thumbnails and will save them to the /thumbnails directory in your bucket root

Architecture

Thumbnail Generator System Context

Thumbnail Generator Architecture

Results

Dataset images

All images are taken from Unsplash and do not require attribution. To find the author of each image, add the image name to the following url: https://unsplash.com/photos/

About

Serverless deployment on IBM Cloud Code Engine that uses the Lithops Framework to process images in parallel

Topics

batch-jobcode-engineibmibm-cloudlithopspythonpython-serverlessserverlessserverless-batch-jobthumbnails

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

1 watching

Forks

1 fork
Report repository

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.