Skip to content
This repository has been archived by the owner on Feb 3, 2022. It is now read-only.

Supporting topologies with multiple web servers #5

Open
punkstar opened this issue Jun 7, 2016 · 7 comments
Open

Supporting topologies with multiple web servers #5

punkstar opened this issue Jun 7, 2016 · 7 comments
Assignees

Comments

@punkstar
Copy link
Contributor

punkstar commented Jun 7, 2016

I'm running into a problem in a topology with one admin server and two front end servers. With the extension, in its current form, I run into a problem trying to get the published file pushed out to the front end servers. The publish button exists and is executed on the admin server causing the file to be generated on the admin server, in the skin/ directory. The skin directory isn't something that has generated content and so is typically committed to the repository or, at the very least, isn't shared across multiple servers. Directories that are typically shared are media/ and var/.

I propose the following solutions:

  • Generate the CSS file when requested (if the code notices that the file isn't there, then generate it) and keep the file in the skin directory. This means the file would be generated three times in the example, once on every server.
  • Move the generated files to the media/ directory so that they can be shared across all of the machines. The file would only be written once.

Thoughts?

@tgerulaitis
Copy link
Member

I would love a solution that keeps the file out of the skin/ directory. I had concerns with it initially and suggested generating in media/. However, the reason why the file is generated in skin/ is because Magento doesn't allow files from media/ to be included in the merged css. Only files in skin/ get merged.

At the time, we decided that it was not worth the effort to investigate whether it's even possible to change that. Not sure if it's worth a revisit now to be honest, as it will probably involve significant rewrites to the Design models.

@bobbyshaw
Copy link
Member

The original reason we chose the skin over the media folder was:

  • CSS merging only supports skin folder.
  • Using skin supports multiple themes being used where as media wouldn't automatically
  • Disadvantage of skin folder was permissions not necessarily being available automatically.

The logic at the moment is that the file isn't added to the layout if the file doesn't exist to avoid the situation where the client receives a 404 because it can't be generated for some reason.

I would say the most sane solution would be to move it to the media folder and not support merging on that file. We can evaluate the cost/benefit of trying to integrate it into the merging process.

@ashsmith ashsmith closed this as completed Jun 7, 2016
@ashsmith ashsmith reopened this Jun 7, 2016
@bobbyshaw
Copy link
Member

You had one job @ashsmith.

@ashsmith
Copy link
Contributor

ashsmith commented Jun 7, 2016

I thought the close button was a cancel/clear button 😢

@ashsmith
Copy link
Contributor

ashsmith commented Jun 7, 2016

I agree, not supporting merging and generating the file in media will be the best solution currently. It'll avoid rewrites, and the inevitable conflicts that will come along with it, and avoid the riskiness of generating files on the fly.

@punkstar
Copy link
Contributor Author

punkstar commented Jun 7, 2016

Ok, it seems like consensus here is to move these files to the media/ directory. Lets DO IT.

@bobbyshaw
Copy link
Member

If this is to be incorporated into this extension and not done specifically for a client then we'll need to look to maintain theme support somehow even if it's in the media directory.

ashsmith pushed a commit to ashsmith/magento-configuration-powered-css that referenced this issue Jun 13, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants