32 Commits

Author SHA1 Message Date
Sébastien Stormacq f42dda3fca Update soundness.sh to support 2024 and 2025 (#335) 2024-08-05 18:01:17 +02:00
Sébastien Stormacq 5d300b2e1b ignore swift files part of docc (#307) 2023-09-11 09:30:19 -07:00
tomer doron c915322eca API Refactoring (#273)
motivation: define stable API in preperation 1.0 release

changes:
* require swift 5.7, remove redundant backwards compatibility code
* make LambdaHandler, EventLoopLambdaHandler, and ByteBufferLambdaHandler disjointed protocols to reduce API surface area
* create coding wrappers for LambdaHandler and EventLoopLambdaHandler to provide bridge to ByteBufferLambdaHandler
* reuse output ByteBuffer to reduce allocations
* add new SimpleLambdaHandler with no-op initializer for simple lambda use cases
* update callsites and tests
* update examples

Co-authored-by: Yim Lee <yim_lee@apple.com>
Co-authored-by: Fabian Fett <fabianfett@apple.com>
2022-11-09 10:08:36 -08:00
Yim Lee 98a23b64bb DocC setup (#270) 2022-08-21 20:29:08 -07:00
YR Chen cb340de265 Fix performance test script (#264) 2022-06-06 09:39:40 -07:00
tomer doron 81f8d27365 packaging plugin (#254)
motivation: add an easy wasy for lambda users to package their lambda and upload it to AWS

changes:
* add SwiftPM plugin to package the lambda as zipfile, with the verb "archive"
* use docker to build and package the lambda(s) on macOS and non-amazonlinux
* build directly on when on amazonlinux, zip correctly

Co-authored-by: Yim Lee <yim_lee@apple.com>
Co-authored-by: Fabian Fett <fabianfett@apple.com>
2022-06-01 09:41:05 -07:00
Fabian Fett f6c7c5a852 Add script to check for API breaks (#258)
Co-authored-by: tomer doron <tomer@apple.com>
2022-04-15 10:36:12 -07:00
Stefan Nienhuis c1f694f35a Add default value for traceID header (#246)
* Add default value for traceID header
* Implement Invocation traceID test
2022-02-19 14:16:51 -08:00
YR Chen 39b34a159b Modernize app example (#231)
Since we already required Swift 5.5 for Concurrency (Xcode 13), it's natural to update the demo app to reflect latest SwiftUI changes, which makes the code neater and more expressive.
2021-12-06 11:30:50 +01:00
tomer doron b757de0241 Update and add examples to new APIs (#228)
* take advantage of @main where possible
* move the top level Sample code to the examples subdirectory
* extract a few examples form the "LambdaFunctions" directory (which is really a deployment demo) and move them to the top level Examples directory
*  rename "LambdaFunctions" examples as "Deployments" to make their intent clearer
* add a sample that demonstrates how to test a lambda now that SwiftPM can test executables directly
* update the test-sample docker setup to build & test th new samples
* fix a few typos and In/Out typealias left overs
* remove LinuxMain since its no longer required
2021-09-25 10:30:04 +02:00
Fabian Fett ab13e51984 Performance Improvements (#199)
Modifications:
- Replace `HTTPHandler` with `NIOHTTPClientResponseAggregator`, to fix a CoW issue. This increases performance.
- Ensure that we only use one `EventLoop` in tests.
- Use `syncOperations` to setup the `HTTPClient`.
2021-04-14 00:21:38 +02:00
tomer doron 9166653bd8 update code of conduct (#190)
motivation: align with swift project coc update

changes: update coc to the version used by the swift project (contributor-covenant.org  1.4)

Update 0226-package-manager-target-based-dep-resolution.md

Co-authored-by: Konrad `ktoso` Malawski <ktoso@apple.com>
2021-03-05 12:16:07 +09:00
Fabian Fett bfdeb75e32 Use welcoming language (#184) 2021-01-21 21:05:43 -08:00
tomer doron 64ee5a215c small fixes to the perf script (#78)
motivation: keep script up to date

changes:
* use 5.3 nightly
* better support for perf symlink as the location is a moving target
* info about cold/warm start
2020-05-12 16:04:30 -07:00
tom doron b5f18dad4b move examples into a subdirectory
motivation: easier to find and reason about

changes: move exmaples from a seperate repo into a subdirectory
2020-05-07 08:56:31 -07:00
tom doron d5368bbe25 moving examples into a subdirectory 2020-05-06 12:19:03 -07:00
tachyonics d3c72e93e6 Add a SAM template for deploying the lambdas to AWS. (#2)
motivation: demonstrate how to deploy with SAM

changes:
* Add a SAM template for deploying the lambdas to AWS. 
* Updated README with instructions on how to do this.
2020-04-06 09:31:43 -07:00
tomer doron 40d05992f7 breakdown examples intro separate targets (#1)
motivation: easier to reason about examples

changes:
* move each example to its own target
* update deployment script to prompt for desired target when multiple targets exist
* add code comments on what the example is about
* add feature-reach example (CurrencyExchange) to help testing use of Foundation features that require curl and libxml
2020-04-02 11:01:27 -07:00
tomer doron 1685d891b0 update perf script (#51)
motivation: beter perf script

changes:
* adjust to latest version of perf
* higher frequency sampling
* more debug symbols
2020-03-27 15:32:14 -07:00
tom doron e1ee4ea0dd initial commit 2020-03-25 16:08:42 -07:00
tomer doron c2673d4634 update contributors list (#43)
motivation: keep contributors list up to date

changes:
* add mailmap
* run contributors script
2020-03-17 18:25:48 -07:00
tomer doron b61aab012e rename project to SwiftAWSLambdaRuntime (#38)
motivation: unique, accurate name

changes:
* rename project to SwiftAWSLambdaRuntime
* rename main module to AWSLambdaRuntime
* rename / simplify sample module names
* adjust readme and scripts
2020-03-13 14:48:25 -07:00
tomer doron 88f3b504f4 swift 5.2 (#37)
motivation: amazon linux support will land in 5.2

changes:
* remove inline as its default in 5.2
* remove linux test and lean on --enable-test-discovery
* adjust package syntax
* format code to match 5.2
2020-03-13 12:54:12 -07:00
tomer doron 9d15930563 improve linux perf script (#34)
motivation: more details from perf / flamegrpah

changes:
* run docker in privileged mode and turn off kptr_restrict
* fix typo
2020-03-12 10:38:16 -07:00
tomer doron 2e04511741 move config, lifecycle, context to separate files (#32)
motivation: easier code navigation

changes: move config, lifecycle, context to separate source files
2020-03-11 12:01:18 -07:00
tomer doron b8a6466577 add docker support (#15)
motivation: enable CI

changes: add docker files support for ubuntu 16.04 and 18.04 and swift 5.0 and 5.1

note that eventyally this will need to move to AL2 docker images, but we dont have official ones yet
2020-03-06 18:43:16 -08:00
tomer doron 95cf94e4ad add script to help setup performance measuring in linux (#12)
motivation: performance tuning

changes: add script with setup code and example for running strace and perf
2020-03-06 15:23:03 -08:00
tomer doron 3fc1b1ae5a Scale test iterations independently (#6) 2020-03-05 13:51:30 -08:00
Tom Doron 209906d390 performance improvments (#17)
motivation: better performance

changes:
* simply url configuration to ip and port so we can reoslve the socket add ress faster
* skip happy eyeballs
* limit eventloop group to 1 thread
* remove use of UUID and URL
* fix backtrace url
2020-03-04 13:54:55 -08:00
Tom Doron c3d4ad5a39 performance tests (#16)
motivation: benchmark for comparison of warm/cold runs

changes:
* refactor configuration
* add mock server that can be used by perf tests
* add simple perf test script
* change redundant classes to structs, make remaining classes final
* make offloading opt-in
* safer locking
* fix format
2020-03-04 11:01:15 -08:00
Tom Doron c31ee33105 refactor (#12)
motivation: make code simpler to reason about, better use of swift-nio

changes:
* remove main loop on global queue + wait, replace with recursion
* make better use of EvenLoopFuture, instead of result types to signal errors
* inject lifecycleId so we can share offloading queue
* improve logging
* adjust and improve tests
* update sanity and generate linux tests script to work better with dates and swiftformat
2019-09-16 10:05:02 +01:00
tomer doron 93c9cfdf63 initial commit 2018-11-13 17:48:44 -08:00