Re: commons-fileupload2-jakarta

2023-07-09 Thread Romain Manni-Bucau
@Dennis: good question but how many servers do reuse commons? I know most of them reimplemented it (to own it or cause they dont use servlet or want a reactive based API) or reused tomcat forked (payara for ex or other tomcat based servers). So at the end I think the question is not "why" which is

Re: commons-fileupload2-jakarta

2023-07-09 Thread Dennis Kieselhorst
Hmm why should every server create it's own impl instead of sharing capabilities like multipart handling and parsing as a common library? I agree with the consumer part but the lib is still useful in the future to handle server side of things Dennis

Re: [commons-io] question: file content merge sort and binary search

2023-07-09 Thread ssz
A few remarks: -- I think, (CSV/Java) Stream API is not suitable directly, it is difficult to implement sorting just using streams. If you can suggest a simpler solution, I will really appreciate it because the simpler the code, the better. In the library, of course, streams (channels) and streams

Re: commons-fileupload2-jakarta

2023-07-09 Thread Emmanuel Bourg
On 09/07/2023 18:01, Gary Gregory wrote: I think it might be helpful to think about this in terms of existing and legacy code bases that need to migrate to the Jakarta namespace in a simple manner, as opposed to green-field development. Here the sensible migration path is to switch to the Servl

Re: [commons-io] question: file content merge sort and binary search

2023-07-09 Thread Gary Gregory
I've thought about this a little more and it seems to me that sorting and searching through any old binary file does not fit the remit of Commons IO or CSV. If anything it would be a new component, but it feels like the kind of database operations that do not fit in Commons. What do others think?

Re: [commons-io] question: file content merge sort and binary search

2023-07-09 Thread Gary Gregory
Commons CSV supports the Java Streaming API so you can do whatever that API offers, including filtering, sorting, finding, and so on. More than plain CSVs are supported, and I encourage you to peruse the site https://commons.apache.org/proper/commons-csv/ If you think that component can be enhan

Re: commons-fileupload2-jakarta

2023-07-09 Thread Romain Manni-Bucau
@Dennis: the point is more about not encouraging users to consume it, tomcat has no big issue integrating the project as it is in its own code base but as an servlet API user, importing it means either to not use servlet 3 api or to not use fileupload but both together can become a nightmare when m

Re: commons-fileupload2-jakarta

2023-07-09 Thread Dennis Kieselhorst
It's not redundant as Servlet API is just the API and commons-fileupload offers a server-side implementation that even Tomcat could use (forked code lives here https://github.com/apache/tomcat/tree/main/java/org/apache/tomcat/util/http/fileupload). See also: https://issues.apache.org/jira/browse

Re: [commons-io] question: file content merge sort and binary search

2023-07-09 Thread ssz
Does common-csv support **sorting** large? Does it support binary search? What should I do if I have a non-csv text file? Actually I didn't say that textfile-utils is a library for working with csv files. I just provided you with an example. On Sun, Jul 9, 2023 at 8:23 PM Gary Gregory wrote:

Re: [commons-io] question: file content merge sort and binary search

2023-07-09 Thread Gary Gregory
If the intent is to process CSV files, you're missing quite parameters in order to process all of the different CSV flavors, see Apache Commons CSV. Gary On Sun, Jul 9, 2023, 13:16 ssz wrote: > text-files sort. e.g. CSV. > > Example: > content: `d,420;b,42;b,21;a;21;c;"42"`, delimiter ';' > af

Re: [commons-io] question: file content merge sort and binary search

2023-07-09 Thread ssz
More example (in code): (sort) https://github.com/DataFabricRus/textfile-utils/blob/main/src/test/kotlin/MergeSortTest.kt#L202 (search) https://github.com/DataFabricRus/textfile-utils/blob/main/src/test/kotlin/BinarySearchTest.kt#L20 On Sun, Jul 9, 2023 at 8:14 PM ssz wrote: > text-files sort.

Re: [commons-io] question: file content merge sort and binary search

2023-07-09 Thread ssz
text-files sort. e.g. CSV. Example: content: `d,420;b,42;b,21;a;21;c;"42"`, delimiter ';' after sort by prefix: `a:21;b,42;b,21;c:"42";d,420` binary search by prefix `b`: `b,42;b,21` The project is completed with tests and documentation. It is open source. Github: https://github.com/DataFabricRus

Re: commons-fileupload2-jakarta

2023-07-09 Thread Romain Manni-Bucau
Whereas I can envision the migration point but means putting an API on top of Servlet, not doing a v2 which is the v1 in a new namespace with conflict in the target env so if really a migration thing it should likely be marked as "to drop asap". For wicket, for example, I don't see them keeping it

Re: commons-fileupload2-jakarta

2023-07-09 Thread Gary Gregory
I think it might be helpful to think about this in terms of existing and legacy code bases that need to migrate to the Jakarta namespace in a simple manner, as opposed to green-field development. For example, Apache Wicket has a branch using FileUpload 2 snapshot. I plan on cutting a release cand

Re: [commons-io] question: file content merge sort and binary search

2023-07-09 Thread Gary Gregory
Hello, This seems to be me like a mismatch with Commons IO. What does it even mean to "sort" a file which are really a bunch of bytes. Do you have a relevant example (Java base)? This feels more like a database primitive to me. What am I missing? Gary On Sun, Jul 9, 2023, 10:42 ssz wrote: >

Re: commons-fileupload2-jakarta

2023-07-09 Thread Romain Manni-Bucau
Le dim. 9 juil. 2023 à 16:45, Emmanuel Bourg a écrit : > Dumb question: what's the benefit of using commons-fileupload in 2023 > instead of the equivalent file upload feature of the Servlet API? > +1, sounds redundant and can potentially break servlet API (or file upload one depending how it is

Re: commons-fileupload2-jakarta

2023-07-09 Thread Emmanuel Bourg
Dumb question: what's the benefit of using commons-fileupload in 2023 instead of the equivalent file upload feature of the Servlet API? The use case I had in mind was to support file upload in very old Servlet containers still in production (Tomcat 6 or Jetty 7 for example, both EOL), but ser

[commons-io] question: file content merge sort and binary search

2023-07-09 Thread ssz
It seems to be well-known and generic functionality, so it would be nice to have it in some well-known common place. Is *apache/commons-io* this place? Here is the draft: https://github.com/DataFabricRus/textfile-utils This is my library made for DataFablic, it is written on kotlin with coroutines