What are the Slack Archives?
It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hey! I am trying to use the queue client in an Yves controller, but noticed that it doesn’t work sin
Hey! I am trying to use the queue client in an Yves controller, but noticed that it doesn’t work since the broker env-variables are not passed to the Yves container. Adding the broker include block from zed.env.twig to yves.env.twig fixes it, but I am wondering if that is a proper fix. Is there a proper way to get the queue client to work?
Comments
-
Hello Andreas,
What is the reason you want use broker from Yves?
0 -
Hey Mike,
I am trying to create a file on the filesystem when a certain form is submitted in Yves. Since the form does not need to be created instantly, I wanted to solve this through a queue for better performance.0 -
On which filesystem?
0 -
Zed, in the project’s /data directory
0 -
Ok. Thanks for clarification.
Please, consider my notes:
- Yves is stateless Frontend server. Any persistent data flow must go via Zed gateway.
- Yves containers should have limited access to the services and should be in isolated network conditions. Only Zed gateway, denormalized data access, session and caches should be accessible.
- Filesystem of the container cannot be assumed as a persistent storage. You would have multiple zed servers for high availability and scaling purposes.
- A message in a broker queue should not be overloaded with the huge payload. Most message brokers have strict limitations on that.
- The cost of putting file into the queue would be the same as putting into a file storage service or even better.
So my suggestions are: - I would propose to not use containers filesystem as a persistent storage. Even more: I would recommend to avoid any RO/RW operations within PHP containers.
- If you do not want to use Zed gateway for the uploading you would consider using another service that can manage file storing.
- You can use https://www.php.net/manual/en/function.fastcgi-finish-request.php to release client and upload file in background.
I would propose something more particular if you would give me more context, production environment specification and other info.
0 -
Alright thanks 🙂 Was just confused by the presence of the QueueClient since it made me think that the Queue should be able to be accessed by Yves.
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 69 Spryker News
- 896 Developer Corner
- 758 Spryker Development
- 83 Spryker Dev Environment
- 361 Spryker Releases
- 3 Oryx frontend framework
- 34 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 23 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 68 Spryker Safari Questions
- 50 Random