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

What is the purpose of this repository? #1

Closed
deleugpn opened this issue May 13, 2019 · 4 comments
Closed

What is the purpose of this repository? #1

deleugpn opened this issue May 13, 2019 · 4 comments

Comments

@deleugpn
Copy link
Member

deleugpn commented May 13, 2019

I noticed this repository has a package-like style and I was wondering if you're thinking about providing a package that makes it easy to use Bref on Laravel context.

I would be willing to provide with a Pull Request that brings 2 components to this repository: Bref Facade and Lambda Queue Job and Worker.
You can find the code for these here: https://github.com/deleugpn/laravel-lambda/tree/master/app/Components

The relevance of the Bref Facade is to hide the lambda() helper behind an interface that can be swapped using the Laravel IoC container in order to help writing test code. Laravel developers are used to having a toolbox of test suite easy to use and swap implementations when needed.

The Lambda Worker is an extension of the artisan command queue:work that will fetch events from the lambda() helper (using the facade), build a Laravel job class and send it over to the Worker to work it out.

Another thing I can suggest keeping in this repository would be a version of the artisan file that uses an environment variable to decide which command is being issued: https://github.com/deleugpn/laravel-lambda/blob/master/artisan#L39
The motivation for changing the artisan can be found here: brefphp/bref#118 (comment)

@mnapoli
Copy link
Member

mnapoli commented Apr 19, 2020

Sorry @deleugpn, I'm a year late 😄

Since we don't need the lambda() function anymore, I don't think the facade makes sense anymore.

Regarding queues, I've always wanted to integrate with the native behavior of SQS + Lambda (i.e. not polling messages). I have finally managed to push something. If you have any chance to try that out, or review it, I would love that.

I am also looking for people with Laravel experience to tell me how to make that integration in the Laravel style (i.e. something that looks like Laravel practices). That could be with the naming, with the documentation, etc.

@reganjohnson
Copy link

Thanks for putting this out there. Excited to see it released.

If you haven't already, take a look at how Laravel Vapor is handling it's SQS queues, tied into the Laravel systems:
https://github.com/laravel/vapor-core/tree/2.0/src/Queue

@mnapoli
Copy link
Member

mnapoli commented Apr 20, 2020

Thanks, yes this directory is exactly what I started doing initially, but went back to using the native SQS integration.

Also, the way Vapor handles queues is very specific and not aligned with how the SQS + Lambda integration works. In short, they adapted Lambda to Laravel. I am adapting Laravel to Lambda. That lets us use all the features of SQS and Lambda.

@mnapoli
Copy link
Member

mnapoli commented May 5, 2020

Closing for now, still working on this package with a proper documentation.

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

3 participants