This directory contains a collection of Wing examples of the kinds of apps you can build in Wing! Check out the Wing Contributor's Handbook for a guide on on how to add your own example.
The examples in the tests
directory are examples specifically used for testing the compiler. tests/valid
are examples that should compile successfully, and tests/invalid
are examples that should fail.
The examples in proposed
are examples that may not yet work in the current version of Wing, but we want to make them work in the future!
Add yours here!
- Source code: ./proposed/cacheable-function.w
- Description: A Wing resource where a FaaS is augmented to cache input/output pairs using a object storage bucket.
- Author: @Chriscbr
- Source code: ./proposed/in-memory-search.w
- Description: This is a concept for a Wing app where cloud functions are used to create a search engine where the entire search index exists in-memory, spread across many lambda functions.
- Author: @Chriscbr
- Source code: ./proposed/lock.w
- Description: A naive distributed lock implementation. This lock uses the atomicity of
Counter
internally to guarantee that it can only be acquired by a single inflight function at a time, even if they are on different machines. - Author: @Chriscbr
- Source code: ./proposed/counting-semaphore.w
- Description: A Wing resource that helps access control for a common resource in a cloud environment.
- Author: @flyingImer
- Source code: ./proposed/replayable-queue.w
- Description: A Wing Queue that saves all the messages sent to it on a bucket and allow you to replay all messages
- Author: @ekeren
- Source code: ./proposed/task-manager.w
- Description: A task manager that lets you create background tasks asynchronously, and check their status at any point in time.
- Author: @Chriscbr
- Source code: ./proposed/url-shortener.w
- Description: A URL shortener consisting of two API endpoints,
/create
and/u/:id
. IDs are managed using buckets, but could be swapped with a table or other stateful storage mechanism. Requires installingnode-fetch@2
from npm. - Author: @Chriscbr