sam-goodwin / eventual

Build scalable and durable micro-services with APIs, Messaging and Workflows
https://docs.eventual.ai
MIT License
176 stars 4 forks source link

Runtime: Docker Lambda Runtime and Base Image #231

Open thantos opened 1 year ago

thantos commented 1 year ago

I want to...

FROM eventual:base as builder

COPY my-src/ /container-dest/

WORKDIR container-dest/

RUN make

FROM eventual:base
cp --from=builder /container-dest/build/ /home/bin/

https://discord.com/channels/985291961885949973/1053066041149886596/1063453800800727230

Workaround - Using Async Activities

Eventual Developers can interact with any resource, including a customized lambda, any AWS resource, or any non-AWS resource by using Async Activities.

const myActivity = activity("processBigData", () => {
   // the invoked runtime will return a string, could return anything though
   return asyncResult<string>(async (token) => {
       // call other runtime with token.
   });
});

// in the custom runtime

const serviceClient = new AwsHttpServiceClient({ serviceUrl: MY_SERVICE_URL });
await serviceClient.sendActivitySuccess({ activityToken: input.token, result: "someResult" })
sam-goodwin commented 1 year ago

cc @yehudacohen