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

Extract some functionality to make writing custom App/Receiver easier #388

Closed
4 of 9 tasks
seratch opened this issue Jan 30, 2020 · 6 comments
Closed
4 of 9 tasks
Labels
discussion M-T: An issue where more input is needed to reach a decision enhancement M-T: A feature request for new functionality

Comments

@seratch
Copy link
Member

seratch commented Jan 30, 2020

Description

To enable developers to implement their own Receiver like https://github.com/seratch/bolt-aws-lambda-proof-of-concept , we need to extract some functionalities in ExpressReceiver and expose them to 3rd parties.

Those works should be based on @barlock 's PRs for v2.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.
@seratch seratch added enhancement M-T: A feature request for new functionality semver:major labels Jan 30, 2020
@seratch seratch added this to the V2 milestone Jan 30, 2020
@seratch seratch self-assigned this Jan 30, 2020
@barlock
Copy link
Contributor

barlock commented Jan 30, 2020

I think it's time to make bolt a monorepo too?

I'd be interested in helping maintain a KoaReceiver after all those go in.

I've also been developing one for testing with jest.

@seratch
Copy link
Member Author

seratch commented Jan 31, 2020

@barlock
At least in the short term, we're not planning to have multiple modules in this project. My intention here is to enable any 3rd parties to build Bolt extensions more easily.

Let me share what I want to extract from App and ExpressReceiver in detail. Some of the code are already outdated though.

From App, I would like to extract these.
https://github.com/seratch/bolt-aws-lambda-proof-of-concept/tree/master/src/added/app
By doing this, the onIncomingEvent part could be much simpler. Developers don't need to repeat the same. https://github.com/seratch/bolt-aws-lambda-proof-of-concept/blob/master/src/added/TwoPhaseApp.ts

From ExpressReceiver, I want to extract the following after refactoring them to be independent from Express.

The extraction allows me to easily implement my own Receiver (TwoPhaseReceiver is a sub-interface of Receiver) like this:
https://github.com/seratch/bolt-aws-lambda-proof-of-concept/blob/master/src/added/AwsLambdaReceiver.ts

@barlock
Are you interested in implementing some of these ideas? If so, I'm happy to work together! But don't feel pressured at all. I was going to start working on this. I just wanted to know if you were also planning to do the similar.

In the case I'll work on this, my pull request on top of your commits will be coming early next week. I'd appreciate it if I could have your reviews on it. 🙏

@barlock
Copy link
Contributor

barlock commented Jan 31, 2020

It's all yours! I appreciate the offer, and I appreciate more you basing it off my commits. 🤞 Here's hoping it get's reviewed soon.

Maybe we can finally close #81 ! What a long 3 year wait it's been 😛

@seratch seratch changed the title Extract some functionalities to make writing custom App/Receiver easier Extract some functionalitiy to make writing custom App/Receiver easier Feb 4, 2020
@seratch seratch changed the title Extract some functionalitiy to make writing custom App/Receiver easier Extract some functionality to make writing custom App/Receiver easier Feb 4, 2020
@seratch seratch modified the milestones: v2.0, v2.1 Mar 26, 2020
@aoberoi aoberoi modified the milestones: v2.1, v2.0 Mar 27, 2020
@stevengill stevengill added discussion M-T: An issue where more input is needed to reach a decision and removed semver:major labels Apr 2, 2020
@seratch
Copy link
Member Author

seratch commented Jun 9, 2020

I should have verified our v2 implementation and checked if we can close this issue but I haven't done yet. When I do those in the near future, I will update you here.

@seratch
Copy link
Member Author

seratch commented Nov 23, 2020

While working on #670, probably we can resolve this issue.

@seratch
Copy link
Member Author

seratch commented Mar 19, 2021

I know there are still rooms for improvement but, with the latest version, writing a custom receiver is much easier now. Let me close this issue I raised here.

@seratch seratch closed this as completed Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion M-T: An issue where more input is needed to reach a decision enhancement M-T: A feature request for new functionality
Projects
None yet
Development

No branches or pull requests

4 participants