-
Notifications
You must be signed in to change notification settings - Fork 13
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
Adding support for printing to work with a shared volume (cloud environment) #25
Conversation
Removing the caching mechanism
Fixing the mistake of version changes
Persistent volume
Hi @jodygarnett , can you please review PR? |
Okay! Yeah many other geoserver extensions end up with a shared database (rather than a shared json) to communicate state across instances. I wish we had a good shared module for that which could use an appropriate storage / communication to avoid all the duplication we are seeing. |
Can I ask you to include a note on the docs about this as it is a pretty important changed :) |
…onment) Adding documentation
…onment) Adding documentation
@ritika-t-thakur-alb updated documentation. |
@@ -4,7 +4,7 @@ Upgrade | |||
Version 2.3.2 | |||
------------- | |||
|
|||
* Support for printing in a cloud environment and in an environment without sticky sessions : generates a requested printout metadata json file and stores it in the tempDir. With this information peristed, there is no need for sticky sessions and printing module can be used in a cloud environment with shared volume. | |||
* Support for printing in a cloud environment and in an environment without sticky sessions : generates a requested printout metadata json file and stores it in the tempDir. With this information persisted, there is no need for sticky sessions and printing module can be used in a cloud environment with shared volume. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So how does this work in a could environment - don’t they need to share a temp folder or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @jodygarnett ,
I elaborated my documentation a bit more.
Answering your question: depending on the cloud environment, engineers an pick an option to share a volume between multiple instances and pass the path in the existing MAPFISH_PDF_FOLDER environment variable.
I have already updated installation.rst file with the documentation for MAPFISH_PDF_FOLDER.
I think the steps for creating a shared volume is not related with this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jodygarnett, i think everything is done from our side.
Do you need more information?
…onment) Adding documentation
If you rebase to resolve conflict we should be able to merge? |
Hi @jodygarnett i think we don't have any conflict. |
Okay I could not rebase but I can do a squash and merge |
@jodygarnett when you release print-2.3.2, please update also in geoserver: Thank you :) |
I think it is all done |
Before this change, print-lib generates a file into disk, and cache the file pointer into a Java map (in memory).
The problem of this, is after generating a file, the next request to get the file MUST be to the same geoserver instance. Other geoservers, doesn't have any reference to this generated file. In a k8s environment this is a problem.
Before implementation:
To solve it:
IN SUMMARY:
What was saved in an instance into an hashmap, now is persisted on disk.
After releasing version with this PR, create a ticket in geoserver like this "https://osgeo-org.atlassian.net/browse/GEOS-11480" to update mapfish-print version.