{"id":104506,"date":"2022-06-25T15:36:47","date_gmt":"2022-06-25T13:36:47","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/redbean-2-0-platforma-dlya-web-prilozhenij-upakovannyh-v-universalnyj-ispolnyaemyj-zip-arhiv"},"modified":"2022-06-25T15:36:47","modified_gmt":"2022-06-25T13:36:47","slug":"redbean-2-0-platforma-dlya-web-prilozhenij-upakovannyh-v-universalnyj-ispolnyaemyj-zip-arhiv","status":"publish","type":"post","link":"https:\/\/prohoster.info\/it\/blog\/news\/redbean-2-0-platforma-dlya-web-prilozhenij-upakovannyh-v-universalnyj-ispolnyaemyj-zip-arhiv","title":{"rendered":"Redbean 2.0 \u2014 una piattaforma per applicazioni web, confezionate in un archivio ZIP eseguibile universale","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>\u00c8 stato presentato il rilascio del progetto Redbean 2.0, che offre un web server in grado di fornire applicazioni web sotto forma di file eseguibile universale, che pu\u00f2 essere eseguito su Linux, Windows, MacOS, FreeBSD, NetBSD e OpenBSD. Tutte le risorse associate all'applicazione web e al server sono compresse in un unico file eseguibile, compatibile con il formato degli archivi ZIP, consentendo l'utilizzo dell'utilit\u00e0 zip per aggiungere file aggiuntivi. La possibilit\u00e0 di eseguire un singolo file su diversi sistemi operativi e la sua riconoscibilit\u00e0 come archivio ZIP sono realizzate grazie alla manipolazione degli header dei file eseguibili e al binding con la libreria standard C multipiattaforma Cosmopolitan. Il codice del progetto \u00e8 distribuito sotto licenza ISC.      <\/p>\n<p>L'idea del progetto \u00e8 di fornire un unico file eseguibile \"redbean.com\" con un server web incorporato. Lo sviluppatore di applicazioni web pu\u00f2 utilizzare l'utility zip per aggiungere a questo file file HTML e Lua, ottenendo cos\u00ec un'applicazione web autonomamente funzionante, eseguibile su tutti i sistemi operativi popolari e che non richiede l'avvio di un server web separato nel sistema.         <\/p>\n<p>Dopo aver avviato il file eseguibile appena ricevuto, per accedere all'applicazione web memorizzata nel file si utilizza un server web integrato. Per impostazione predefinita, il gestore \u00e8 collegato a localhost, ma il server pu\u00f2 essere utilizzato anche come un normale server web pubblico (ad esempio, questo server gestisce il sito del progetto). Il server web integrato supporta l'accesso tramite HTTPS e pu\u00f2 essere eseguito utilizzando l'isolamento sandbox, che consente di controllare a quali interfacce di sistema viene effettuato l'accesso. Per gestire il funzionamento del server durante la sua esecuzione, \u00e8 fornita un'interfaccia interattiva REPL (basata su Lua REPL e sulla libreria bestline, equivalente a GNU Readline), che consente di modificare lo stato del processo in modo interattivo.      <\/p>\n<p>Si afferma che il server web sia in grado di gestire oltre un milione di richieste al secondo su un comune PC, servendo contenuti compressi con il metodo gzip. L'alta prestazione \u00e8 favorita dal fatto che zip e gzip utilizzano un formato comune, quindi i dati vengono restituiti senza la necessit\u00e0 di ripacchettizzare dalle aree gi\u00e0 compresse nel file zip. Inoltre, poich\u00e9 l'eseguibile \u00e8 stato creato utilizzando il collegamento statico e ha una dimensione ridotta, la chiamata alla funzione fork non comporta praticamente costi aggiuntivi quando \u00e8 in memoria.       <\/p>\n<p>Oltre a gestire contenuti web statici ed eseguire JavaScript nel browser, la logica delle applicazioni web pu\u00f2 essere ampliata tramite script in linguaggio Lua, il framework web Fullmoon e il database SQLite. Tra le funzionalit\u00e0 aggiuntive si segnala il supporto per lo schema di hashing delle password argon2, la possibilit\u00e0 di determinare la regione IP tramite il database MaxMind e l'accesso alle API Unix della libreria Cosmopolitan. La dimensione dello stack di base, che include il server web, MbedTLS, Cosmopolitan, Lua e SQLite, \u00e8 di soli 1.9 MB.     <\/p>\n<p>Il file eseguibile universale viene generato combinando segmenti e intestazioni specifici per diversi sistemi operativi (PE, ELF, MACHO, OPENBSD, ZIP) in un unico file. Per garantire l'esecuzione di un file eseguibile sia in Windows sia nei sistemi Unix viene utilizzato un trucco, basato sulla codifica dei file Windows PE in forma di script shell, sfruttando il fatto che Thompson Shell non utilizza il marker per gli script \"#!\". Ne risulta un file eseguibile che combina diversi formati utilizzati in Linux, BSD, Windows e macOS. $ curl https:\/\/redbean.dev\/redbean-demo-2.0.7.com &gt;redbean.com $ chmod +x redbean.com $ zip redbean.com hello.html $ zip redbean.com hello.lua $ .\/redbean.com -vv I2022-06-23T08:27:14+000767:redbean] (srvr) listen http:\/\/127.0.0.1:8080 &gt;: waiting for command\u2026 $ curl https:\/\/127.0.0.1:8080\/hello.html hello $ printf 'GET \/hello.lua\n\n' | nc 127.0.0.1 8080 hello        <center>  <video id=\"video\"  controls=\"\" style=\"width: 700px; height: 350px; max-width:100%\"><source src=\"https:\/\/storage.googleapis.com\/justine\/redbean2\/redbean-2.0-demo.mp4\" type=\"video\/mp4\"><\/video><\/center>    <\/center><br \/>\n<br \/>Fonte: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=57407\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432\u044b\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Redbean 2.0, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0449\u0435\u0433\u043e web-\u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0432 Linux, Windows, MacOS, FreeBSD, NetBSD \u0438 OpenBSD. \u0412\u0441\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043a\u043e\u043c\u043f\u043e\u043d\u0443\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u0438\u043d \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c \u0430\u0440\u0445\u0438\u0432\u043e\u0432 ZIP \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0442\u0438\u043b\u0438\u0442\u0443 zip \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-104506","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432\u044b\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Redbean 2.0, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0449\u0435\u0433\u043e web-\u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0432 Linux, Windows, MacOS, FreeBSD, NetBSD.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/it\/blog\/news\/redbean-2-0-platforma-dlya-web-prilozhenij-upakovannyh-v-universalnyj-ispolnyaemyj-zip-arhiv\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"it_IT\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47Redbean 2.0 \u2014 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 ZIP-\u0430\u0440\u0445\u0438\u0432 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432\u044b\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Redbean 2.0, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0449\u0435\u0433\u043e web-\u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0432 Linux, Windows, MacOS, FreeBSD, NetBSD.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/it\/blog\/news\/redbean-2-0-platforma-dlya-web-prilozhenij-upakovannyh-v-universalnyj-ispolnyaemyj-zip-arhiv\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2022-06-25T13:36:47+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-06-25T13:36:47+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Redbean 2.0 \u2014 piattaforma per applicazioni web impacchettate in un archivio ZIP eseguibile universale | ProHoster","description":"\u00c8 stata presentata la versione 2.0 del progetto Redbean, che offre un web server in grado di fornire applicazioni web sotto forma di file eseguibile universale, eseguibile su Linux, Windows, MacOS, FreeBSD e NetBSD.","canonical_url":"https:\/\/prohoster.info\/it\/blog\/news\/redbean-2-0-platforma-dlya-web-prilozhenij-upakovannyh-v-universalnyj-ispolnyaemyj-zip-arhiv","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"it_IT","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47Redbean 2.0 \u2014 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 ZIP-\u0430\u0440\u0445\u0438\u0432 | ProHoster","og:description":"\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432\u044b\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Redbean 2.0, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0449\u0435\u0433\u043e web-\u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0432 Linux, Windows, MacOS, FreeBSD, NetBSD.","og:url":"https:\/\/prohoster.info\/it\/blog\/news\/redbean-2-0-platforma-dlya-web-prilozhenij-upakovannyh-v-universalnyj-ispolnyaemyj-zip-arhiv","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2022-06-25T13:36:47+00:00","article:modified_time":"2022-06-25T13:36:47+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"104506","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2022-06-25 13:36:54","updated":"2022-09-28 11:49:08","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/posts\/104506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/comments?post=104506"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/posts\/104506\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/media?parent=104506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/categories?post=104506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/tags?post=104506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}