Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventBridge support #144

Open
coder17934 opened this issue Sep 11, 2020 · 5 comments
Open

EventBridge support #144

coder17934 opened this issue Sep 11, 2020 · 5 comments

Comments

@coder17934
Copy link

Hi,

This project looks great, can't believe that I haven't seen it before! I would love to help out by adding support for EventBrige but before I get started I just wanted to check if you already had any thoughts on how to implement is so I don't veer off course?

Thanks

@sam-goodwin
Copy link
Owner

Hey, thanks for your interest in Punchcard! I'd love to work with you to add support for this.

I haven't thought much about EventBridge other than it seems to be a source of data that adheres to some type. i.e. EventBridge<T extends Shape>? Do you think it's similar to a SQS.Queue<T extends Shape> in how it will be used? E.g. "for each event in this source, invoke this lambda function".

If so, then it might follow the Stream pattern which gives you methods for chaining computations from an EventSource, e.g. forEach, map, flatMap etc.

See: https://github.com/punchcard/punchcard/blob/master/packages/punchcard/lib/util/stream.ts
SQS is a simple example of how this pattern is implemented: https://github.com/punchcard/punchcard/tree/master/packages/punchcard/lib/sqs

@coder17934
Copy link
Author

That's great, my first port of call was to look at the SNS implementation. EventBridge is essentially a serverless pub/sub system with flexible rules when it comes to routing. I think they routing rule piece could be really interesting, I saw that you have a jsonpath shape package so that might be a good start.

Either way, I'll get cracking on a fork so you can have visibility and steer in terms of direction.

@sam-goodwin
Copy link
Owner

Oh that will be interesting. I took a quick look at https://link.medium.com/9JBEiQCRG9

Looks like JSON path covers most of the complexity. The transformer input will need to infer a new shape from the transformed data. I think that might be the trickiest bit, but definitely achievable.

@coder17934
Copy link
Author

Do you use Slack or Gitter or something like that? Just for one-off questions as I look through the code? I don't want to pollute this issue with my random questions.

@sam-goodwin
Copy link
Owner

I have a slack: https://join.slack.com/t/punchcard-dev/shared_invite/zt-h5t4hlmv-ZBXhggP9QXrnkRwED7GKrA

There’s only a couple of people in there. Come on by!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants