{"id":13620108,"url":"https://github.com/StanfordSNR/gg","last_synced_at":"2025-04-14T19:31:02.552Z","repository":{"id":47248528,"uuid":"86755415","full_name":"StanfordSNR/gg","owner":"StanfordSNR","description":"The Stanford Builder","archived":false,"fork":false,"pushed_at":"2023-02-21T22:13:16.000Z","size":8923,"stargazers_count":989,"open_issues_count":30,"forks_count":70,"subscribers_count":32,"default_branch":"master","last_synced_at":"2024-11-08T06:40:25.747Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StanfordSNR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-03-30T22:40:45.000Z","updated_at":"2024-11-02T11:44:30.000Z","dependencies_parsed_at":"2024-01-14T04:58:02.920Z","dependency_job_id":"0e88c078-6b80-46f1-aa2b-091d98218336","html_url":"https://github.com/StanfordSNR/gg","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanfordSNR%2Fgg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanfordSNR%2Fgg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanfordSNR%2Fgg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanfordSNR%2Fgg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StanfordSNR","download_url":"https://codeload.github.com/StanfordSNR/gg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248945777,"owners_count":21187384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T21:00:52.336Z","updated_at":"2025-04-14T19:31:01.441Z","avatar_url":"https://github.com/StanfordSNR.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# gg [![Build Status](https://travis-ci.org/StanfordSNR/gg.svg?branch=master)](https://travis-ci.org/StanfordSNR/gg)\n\n[![xkcd.com/303/](https://s3-us-west-2.amazonaws.com/stanfordsnr/gg-xkcd.jpg)](https://xkcd.com/303/)\n\n\n## Research Paper\n\n\"[From Laptop to Lambda: Outsourcing Everyday Jobs to Thousands of Transient Functional Containers](https://www.usenix.org/system/files/atc19-fouladi.pdf),\" in 2019 USENIX Annual Technical Conference (USENIX ATC '19).\n\n## Demo\n\nBuilding FFmpeg with `gg` on AWS Lambda\n\n[![asciicast](https://asciinema.org/a/257545.svg)](https://asciinema.org/a/257545)\n\n## Tech Video\n\n`gg` was presented at 2019 USENIX Annual Technical Conference (USENIX ATC '19). The talk was given on July 11, 2019.\n\n[![Alt text](https://img.youtube.com/vi/VVWVN6Czji4/0.jpg)](https://www.youtube.com/watch?v=VVWVN6Czji4)\n\n\n## Build directions\n\n**Notice: If you are Docker adept, follow [this instruction](https://github.com/StanfordSNR/gg/blob/master/docker/README.md).**\n\nTo build `gg` you need the following packages:\n\n- `gcc` \u003e= 7.0\n- `protobuf-compiler`, `libprotobuf-dev` \u003e= 3.0\n- `libcrypto++-dev` \u003e= 5.6.3\n- `python3`\n- `libcap-dev`\n- `libncurses5-dev`\n- `libboost-dev`\n- `libssl-dev`\n- `autopoint`\n- `help2man`\n- `texinfo`\n- `automake`\n- `libtool`\n- `pkg-config`\n- `libhiredis-dev`\n- `python3-boto3`\n\nYou can install these dependencies in Ubuntu (17.04 or newer) by running:\n\n```\nsudo apt-get install gcc-7 g++-7 protobuf-compiler libprotobuf-dev \\\n                     libcrypto++-dev libcap-dev \\\n                     libncurses5-dev libboost-dev libssl-dev autopoint help2man \\\n                     libhiredis-dev texinfo automake libtool pkg-config python3-boto3\n```\n\nTo build `gg`, run the following commands:\n\n```\n./fetch-submodules.sh\n./autogen.sh\n./configure\nmake -j$(nproc)\nsudo make install\n```\n\n## Usage\n\n### Environment Variables\n\nTo use `gg`, the following environment variables *must* be set:\n\n- `GG_MODELPATH` =\u003e *absolute path* to `\u003cgg-source-dir\u003e/src/models/wrappers`.\n- `GG_STORAGE_URI` =\u003e\n  - **S3**: `s3://\u003cbucket-name\u003e/?region=\u003cbucket-region\u003e`\n  - **Redis**: `redis://\u003cusername\u003e:\u003cpassword\u003e@\u003chost\u003e[:\u003cport\u003e]`\n- `GG_LAMBDA_ROLE` =\u003e the role that will be assigned to the executed Lambda.\nfunctions. Must have *AmazonS3FullAccess* and *AWSLambdaBasicExecutionRole*\npermissions.\n- `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` =\u003e your AWS access key\n- `AWS_REGION` =\u003e your AWS region, where the functions are installed\n\n### Installing the Functions\n\nAfter setting the environment variables, you need to install `gg` functions on\nAWS Lambda. To do so:\n\n~~~\ncd src/remote/\nmake ggfunctions\n~~~\n\n### Example\n\nTo build [`mosh`](https://github.com/mobile-shell/mosh) using `gg`, first we\ncheckout the mosh source code:\n\n~~~\ngit clone https://github.com/mobile-shell/mosh\n~~~\n\nMake sure that you have all the dependencies for building `mosh`. In Ubuntu,\nyou can run:\n\n~~~\nsudo apt-get install -y automake libtool g++ protobuf-compiler libprotobuf-dev \\\n                        libboost-dev libutempter-dev libncurses5-dev \\\n                        zlib1g-dev libio-pty-perl libssl-dev pkg-config\n~~~\n\nInside the `mosh` directory, first you need to prepare `mosh` to build:\n\n~~~\n./autogen.sh\n./configure\n~~~\n\nThen,\n\n~~~\ngg init # creates .gg directory\ngg infer make -j$(nproc) # creates the thunks\n~~~\n\nNow, to actually compile `mosh-server` on AWS Lambda with 100-way parallelism,\nyou can execute (it's important that `--jobs` comes before `--engine`):\n\n~~~\ngg force --jobs 100 --engine lambda src/frontend/mosh-server\n~~~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStanfordSNR%2Fgg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStanfordSNR%2Fgg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStanfordSNR%2Fgg/lists"}