From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!aioe.org!5WHqCw2XxjHb2npjM9GYbw.user.gioia.aioe.org.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: ANN: Ada Resource Embedder for C, Ada and Go Date: Fri, 11 Jun 2021 21:53:07 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <34845325-0cb5-43ee-a03f-df95a8df1f22n@googlegroups.com> <1ded0c7a-f8b6-43e2-8402-5666561615b0n@googlegroups.com> NNTP-Posting-Host: 5WHqCw2XxjHb2npjM9GYbw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 X-Notice: Filtered by postfilter v. 0.9.2 Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:62185 List-Id: On 2021-06-11 20:44, Stephane Carrez wrote: > Thanks Dimitry for the clarification. > > Different requirements leads to different solutions. > > With ARE, I want to embed a Javascript file (such as jQuery), minify it with closure, compress it with gzip > and make it available as raw content so that the web server can service it without reading any file. > The content being accessible through either an Ada generated variable or through a function, > it is mapped in memory (we avoid an open, read, close system call plus the gzip stuff) and > the server only has to return the buffer content. Same here. In the case of an integrated HTTP server I simply store the HTTP pages as a set of string constants and functions generating dynamic portions of. The HTTP server uses no external files. Most pages never exist in any moment of time, because the server generates portions of them and sends away chunks as soon as possible. For this reason I do not compress any pages. It would waste too much resources on a small embedded system and does not really matter for a large PC. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de