{"id":105408,"date":"2022-10-29T21:36:38","date_gmt":"2022-10-29T19:36:38","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/v-sqlite-dobavlena-podderzhka-wasm-dlya-ispolzovaniya-subd-v-web-brauzere"},"modified":"2022-10-29T21:36:38","modified_gmt":"2022-10-29T19:36:38","slug":"v-sqlite-dobavlena-podderzhka-wasm-dlya-ispolzovaniya-subd-v-web-brauzere","status":"publish","type":"post","link":"https:\/\/prohoster.info\/it\/blog\/news\/v-sqlite-dobavlena-podderzhka-wasm-dlya-ispolzovaniya-subd-v-web-brauzere","title":{"rendered":"In SQLite \u00e8 stato aggiunto il supporto per WASM per utilizzare il DBMS nel web browser.","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Gli sviluppatori di SQLite stanno portando avanti un progetto per implementare la possibilit\u00e0 di compilare la libreria in codice intermedio WebAssembly, capace di essere eseguito nel browser e adatto per gestire database da applicazioni web in JavaScript. Il codice per supportare WebAssembly \u00e8 stato aggiunto al repository principale del progetto. A differenza dell'API WebSQL, che si basa su SQLite, WASM SQLite \u00e8 completamente isolato dal browser e non influisce sulla sua sicurezza (Google ha deciso di abbandonare il supporto per WebSQL in Chrome dopo diverse vulnerabilit\u00e0 in SQLite che potevano essere sfruttate tramite WebSQL per attaccare il browser).    <\/p>\n<p>L'obiettivo del progetto \u00e8 fornire un'interfaccia JavaScript funzionante, equivalente in funzionalit\u00e0 all'API SQLite. Gli sviluppatori web hanno a disposizione un'interfaccia oggetto di alto livello per lavorare con i dati nello stile di sql.js o Node.js, un'interfaccia sopra il basso livello C API e un'API basata sul meccanismo Web Worker, che consente di creare gestori asincroni eseguiti in thread separati. Per nascondere le complessit\u00e0 della gestione dei thread attraverso l'API basata su Web Worker, si sta anche sviluppando una variante dell'interfaccia basata sul meccanismo Promise.     <\/p>\n<p>I dati che le applicazioni web memorizzano nella versione WASM di SQLite possono essere localizzati all'interno della sessione corrente (persi dopo il ricaricamento delle pagine) o salvati sul lato client (conservati tra le sessioni). Per la memorizzazione permanente, sono stati preparati backend per l'archiviazione dei dati nel file system locale utilizzando OPFS (Origin-Private FileSystem, un'estensione all'API File System Access, disponibile attualmente solo nei browser basati su WebKit e Chromium) e in archiviazioni locali del browser basate sull'API window.localStorage e window.sessionStorage. Se si utilizza localStorage\/sessionStorage, i dati sono riflessi negli archivi corrispondenti nel formato chiave\/valore, mentre con OPFS sono previsti due opzioni: simulazione di un file system virtuale tramite WASMFS e un'implementazione separata di sqlite3_vfs, che offre uno strato SQLite VFS basato su OPFS.        <\/p>\n<p>Per compilare SQLite in un formato WASM, viene utilizzato il compilatore Emscripten (\u00e8 sufficiente compilare l'estensione ext\/wasm: &#171;. .\/configure &#8212;enable-all; make sqlite3.c; cd ext\/wasm; make&#187;). In uscita si generano i file sqlite3.js e sqlite3.wasm, che possono essere inclusi nel proprio progetto JavaScript (esempio di HTML e JavaScript).<br \/>\n<br \/>Fonte: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=58004\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 SQLite \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 WebAssembly, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u0432 web-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438 \u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b\u0439 \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0411\u0414 \u0438\u0437 web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 JavaScript. \u041a\u043e\u0434 \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 WebAssembly \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 API WebSQL, \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043b\u0435\u0436\u0438\u0442 SQLite, WASM SQLite \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d \u043e\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0438 [&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-105408","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=\"\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 SQLite \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 WebAssembly, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u0432 web-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438 \u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b\u0439 \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0411\u0414 \u0438\u0437 web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430.\" \/>\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\/v-sqlite-dobavlena-podderzhka-wasm-dlya-ispolzovaniya-subd-v-web-brauzere\" \/>\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\udd47\u0412 SQLite \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 WASM \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0421\u0423\u0411\u0414 \u0432 web-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 SQLite \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 WebAssembly, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u0432 web-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438 \u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b\u0439 \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0411\u0414 \u0438\u0437 web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/it\/blog\/news\/v-sqlite-dobavlena-podderzhka-wasm-dlya-ispolzovaniya-subd-v-web-brauzere\" \/>\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-10-29T19:36:38+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-10-29T19:36:38+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\udd47Supporto per WASM aggiunto a SQLite per l'uso del DBMS nel browser web | ProHoster","description":"Gli sviluppatori di SQLite stanno portando avanti un progetto per implementare la possibilit\u00e0 di compilare la libreria in codice intermedio WebAssembly, in grado di essere eseguito nel browser web e adatto per gestire il lavoro con i database dalle applicazioni web.","canonical_url":"https:\/\/prohoster.info\/it\/blog\/news\/v-sqlite-dobavlena-podderzhka-wasm-dlya-ispolzovaniya-subd-v-web-brauzere","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\udd47\u0412 SQLite \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 WASM \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0421\u0423\u0411\u0414 \u0432 web-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 | ProHoster","og:description":"\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 SQLite \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 WebAssembly, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u0432 web-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438 \u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b\u0439 \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0411\u0414 \u0438\u0437 web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430.","og:url":"https:\/\/prohoster.info\/it\/blog\/news\/v-sqlite-dobavlena-podderzhka-wasm-dlya-ispolzovaniya-subd-v-web-brauzere","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-10-29T19:36:38+00:00","article:modified_time":"2022-10-29T19:36:38+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":[],"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/posts\/105408","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=105408"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/posts\/105408\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/media?parent=105408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/categories?post=105408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/tags?post=105408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}