Skip to content

Conversation

@sc0ttdav3y
Copy link
Contributor

This PR adds support for concurrent execution of Bref.

This addresses #15, but uses a different approach that discussed in that ticket.

This PR uses docker exec to run the bref-local CLI tool directly within the Bref PHP container, where it can run multiple processes concurrently.

I've found the Docker approach is more robust than using Lambda RIE (and I was pushed to write it because Lambda RIE began crashing for me). It's also much, much faster. It does however move away from the AWS RIE tool and some folks may still want to use that, so i've left that code in place as a BC option for others.

I haven't worked on test automation as I'm not quite sure how's best to do this, plus I'm currently having troubles even getting this project's tests working on my machine (I think something's going on with node since an update in early 2025). Anyway, I'm happy to help work on this but I figure a collaboration with you is best if you want to incorporate this fork, plus I'm blocked right now in doing so.

I've put together a video to talk through the code and show a demo of it running:
https://www.loom.com/share/a906c414a33c418993c34fe1a0d7ec1c

@sc0ttdav3y
Copy link
Contributor Author

Hi @mnapoli, wondering whether you've had a chance to look over this PR?

Let me know your thoughts...

Thanks, Scott

…ref due to additional header data logged from stdout logging in the application. This strips everything before "END Duration" which guarantees no further output from code other than Bref.
@mnapoli
Copy link
Member

mnapoli commented Feb 7, 2025

Hey! I haven't looked too much in the details but this is a hard one, the change of behavior is significant. If I went this far with changes I'd probably create a new project for a completely different approach. The goal of this project is to use RIE to stay true to how Lambda works.

I'm not sure, this isn't top of priority for me so I can't invest more time into it right now, sorry about that! Since this project is fairly small it might be worth creating an alternative project on GitHub, that way you can use it immediately.

@sc0ttdav3y
Copy link
Contributor Author

Hi @mnapoli, thanks for responding. I understand your points, especially your point on the priority relative to all the other things you do, to which I say thanks for all you do with Bref.

FWIW I think this project's aim should be to maximise DX for local Bref development. My team's DX since the change has seen a massive improvement as our app now runs at full speed.

Anyway, I'm happy to run this as a forked project for now if that's what you'd prefer. If things change, let me know.

@mnapoli
Copy link
Member

mnapoli commented Jun 14, 2025

👍 makes sense, closing for now

@mnapoli mnapoli closed this Jun 14, 2025
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

Successfully merging this pull request may close these issues.

2 participants