Closed tomerd closed 5 months ago
@tachyonics wdyt?
@tachyonics wdyt?
This will work for our use case although not quite as convenient as what I had. My only concern is that handlerProvider
returns a ByteBufferLambdaHandler
which has a makeHandler
function requirement that will not actually get used. In our code we can just not implement that method but conceptually it seems a bit odd at the runtime level.
@tachyonics wdyt about https://github.com/swift-server/swift-aws-lambda-runtime/pull/310/commits/792d1c1adb0f49704a28f9093e87b618d48b5f5b? I dont love the name CoreByteBufferLambdaHandler
but hopefully this address the need better?
thanks @tachyonics, so now to the hard part - choosing a name.
cc @fabianfett @sebsto @yim-lee @ktoso
any good ideas?
so now to the hard part - choosing a name
@tomerd NonInitializingByteBufferLambdaHandler
?
@tachyonics updated to NonInitializingByteBufferLambdaHandler
. wdyt?
Just some small comments about comments. Otherwise lgtm.
@tachyonics new name idea: LambdaRuntimeHandler
. wdyt?
I'm good with this!
@fabianfett any concerns?
Tbh. I think this doesn't solve the actual issue. The lifetime handling in Lambda was designed and implemented before ServiceLifecycle came about. For this reason, using long running clients in Lambda currently feels absolutely weird.
For this reason, I think, we should reconsider what the Lambda API should look like taking into account that it should play nicely with ServiceLifecycle.
General ideas:
LambdaRuntime
should implement Service
ServiceGroup
to handle signal handling
Motivation: Provide the flexibility for custom initialization of the HandlerType as this will often be required by higher level frameworks.
Modifications:
Originally suggested and coded by @tachyonics in https://github.com/swift-server/swift-aws-lambda-runtime/pull/308