Releases: byronka/minum
v8.0.1 - documentation
Extra documentation in key areas, and some minor adjustments. See RELEASE_NOTES.md
v8.0.0 - partial ranges
See RELEASE_NOTES.md for further information
Handle incoming body better
See RELEASE_NOTES.md
v6.0.0 Handle streaming large files
New feature: streaming output from server
Breaking change: Response constructors converted to factory methods. Order of parameters adjusted in certain cases for greater consistency.
A missing capability of the Minum server was to send large files. Yes, it was reasonable to send files up to around several megabytes, but before this change, the data would take room in the server's memory. If the server were making a large
file available and there were many requests, it could easily eat up the entire memory.
Now, the Response object and WebFramework have had their code adjusted to enable this without undue requirements. The constructors in Response were converted to factory methods, and some of these are intended to be used for streaming large data, such as buildLargeFileResponse and buildStreamingResponse.
There is no limit to the file size being served. Memory usage will be minimally impactful.
To migrate to version 6 more easily:
Do a global search and replace: "new Response" -> "Response.buildLeanResponse". That will fix a bunch of the cases. The rest are likely "Response.buildResponse", but update those as necessary. In several cases, it will be required to reorder the parameters - the extraHeaders parameter is now the second parameter in almost all the Response factory methods. In some cases, you will find calls to a now-deleted constructor which would provide a status code and body but no extra headers. These should be fixed to include the necessary headers, such as Map.of("Content-Type", "text/plain")
v5.0.0 - Refactorings
Excellent test coverage enables fearless refactoring.
It is closing in on a year past beta. We have stability and high test
coverage, let's apply the recommendations from linting tools, informed
by our tests and usage scenarios.
Improvements:
- Several class methods and constructors would pass mutable data, leading to the possibility of
subtle bugs. Where possible, these have been corrected. - Made several methods package-private, to lower scope. Removed methods if possible - e.g. see
Context. - Consistency and conventionality improvements.
- Applying recommendations from linting tools that would forestall bugs, such as setting the charset
instead of relying on the system default. - Organizing the files better. All files are now in subpackages of "minum".
- Improved documentation.
- Removed need for
Contextobject during construction of some classes. - Added new tools for regular examination of the code - information is provided during compilation
and runningmake lint.
Moved to different package:
- Context (globally adjust like this:
find src/ -type f -name "*.java" -exec sed -i 's/com\.renomad\.minum\.Context/com.renomad.minum.state.Context/g' {} \;) - Constants (globally adjust like this:
find src/ -type f -name "*.java" -exec sed -i 's/com\.renomad\.minum\.Constants/com.renomad.minum.state.Constants/g' {} \;) - ActionQueue (globally adjust like this:
find src/ -type f -name "*.java" -exec sed -i 's/com\.renomad\.minum\.utils\.ActionQueue/com.renomad.minum.queue.ActionQueue/g' {} \;)
Removed:
- Context.getFileUtils - instead of obtaining from Context, build:
new FileUtils(logger, constants); - Several other public methods from Context that only related to Minum internals
Adjusted:
- PathDetails is no longer a record. Its methods moved to be prefixed with "get" with adjusted capitalization
- TagInfo, same thing
- HtmlParseNode, same thing
- On TagInfo, the attributes are further encapsulated - it is no longer possible to grab the collection. Get an attribute with "getAttribute()"
Removed use of Context in constructors:
- Headers
- RequestLine
Moved:
- RequestLine.PathDetails was moved to its own file. It can now be called on its own, "PathDetails" (globally adjust like
this:find src/ -type f -name "*.java" -exec sed -i 's/RequestLine\.PathDetails/PathDetails/g' {} \;)
v4.0.3 - Templating correctness improvements
- Templates will now complain with a TemplateRenderException if the user supplies
keys that end up not being used. For example, in this template:Hello {name},
then if the user provides keys ofMap.of("name", "world", "foo", "bar"), rendering
will return an exception with a message,No corresponding key in template found for these keys: foo
Adding this functionality slightly slowed down the template processor (35k/sec to 32k/sec), but
it is still faster than the web handler (20k/sec), which is the bottleneck in this situation.
Correctness and simplicity is more important than speed in this situation. - SPECIAL NOTE: Because the templates are stricter, you may find your application complaining
where it was lenient before. Take care to notice the issues, if any exist. - Make the key in LRUCache a generic (the value was already generic)
v4.0.2
v4.0.1 - fix stopwatch
- Minor fix - request handling timer was outside the keep-alive loop, showing incorrect timing in the log statements.
v4.0.0 - Redesigns and refactors
- Noticed that the utils package had a dependency on the web package
in the FileUtils class. Moved code to avoid this cyclical dependency. - Disentangle methods in the web code to make stacktraces and debugging simpler
- Configuration
- Removed flag to redirect to HTTPS from the HTTP endpoint. This behavior
is now provided by writing appropriate code in WebFramework.preHandler. Examples
are provided in the documentation for the method.- Related: removed REDIRECT_TO_SECURE property
- Removed ability to choose non-virtual threads. Having two major modes of thread
execution increases the testing surface area unnecessarily. Since Java 21 is
required, will just use the primary intention.- Related: removed USE_VIRTUAL property
- Related: Removed ExtendedExecutor class and makeExecutorService method
- Increased default maximum for query string count from 20 to 50
- Changed default value for using virtual threads to true
- Changed default value for using the brig to true
- Including the default values as text in the minum.config file
- Rename MAX_TOKENIZER_PARTITIONS to MAX_BODY_KEYS_URL_ENCODED
- Better documentation in the configuration file
- Removed flag to redirect to HTTPS from the HTTP endpoint. This behavior
- Database
- Made Db.stop() a publicly available method
- Db.values now returns an unmodifiable collection. This was always the intent,
but by using Collections.unmodifiableCollection, this concept is more
strictly enforced.
- TheBrig
- Calling
.stop()on TheBrig will now stop its associated Db. - More informative log messages in TheBrig.
- Better locking
- Calling
v3.2.1 Adjust maximum partitions in serializer
- Adjust maximum partitions in serializer. A bug was found: text that was large but still reasonably sized (it more than ten thousand lines) was causing a failure in templating. The serializer utility allowed a maximum of ten thousand "partitions" (i.e. lines) before throwing an exception. While it does make sense to set a maximum on any loop, ten thousand was too low. This value was raised to ten million, based on the concept that sending an HTML template with a million lines would be absurdly high, and then putting a safety factor multiple on top of that.
- Extra testing