Skip to content

Latest commit

 

History

History
 
 

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Wing Examples

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!

Examples

Add yours here!

Cacheable function

In-memory search engine

  • 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

Lock

  • 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

Counting semaphore

Replayable Queue

Task Manager

  • 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

URL Shortener

  • 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 installing node-fetch@2 from npm.
  • Author: @Chriscbr