{"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\/es\/blog\/news\/v-sqlite-dobavlena-podderzhka-wasm-dlya-ispolzovaniya-subd-v-web-brauzere","title":{"rendered":"SQLite ahora incluye soporte para WASM para utilizar la base de datos en un navegador web.","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Los desarrolladores de SQLite est\u00e1n trabajando en la implementaci\u00f3n de la posibilidad de compilar la biblioteca en c\u00f3digo intermedio WebAssembly, el cual puede ejecutarse en un navegador web y es adecuado para manejar bases de datos desde aplicaciones web en JavaScript. El c\u00f3digo para soporte de WebAssembly se ha a\u00f1adido al repositorio principal del proyecto. A diferencia de la API WebSQL, que se basa en SQLite, WASM SQLite est\u00e1 completamente aislado del navegador y no afecta su seguridad (Google decidi\u00f3 retirar el soporte de WebSQL en Chrome tras varias vulnerabilidades en SQLite que pod\u00edan ser explotadas a trav\u00e9s de WebSQL para atacar al navegador).    <\/p>\n<p>El objetivo del proyecto es proporcionar un envoltorio JavaScript funcionalmente equivalente a la API de SQLite. Se ofrece a los desarrolladores web una interfaz de alto nivel orientada a objetos para trabajar con datos al estilo de sql.js o Node.js, un envoltorio sobre la API C de bajo nivel y una API basada en el mecanismo Web Worker, que permite crear manejadores asincr\u00f3nicos ejecutados en hilos separados. Para ocultar los detalles de la gesti\u00f3n de hilos sobre la API basada en Web Worker, tambi\u00e9n se est\u00e1 desarrollando una variante de la interfaz basada en el mecanismo Promise.     <\/p>\n<p>Los datos que las aplicaciones web guardan en la versi\u00f3n WASM de SQLite pueden ser localizados dentro de la sesi\u00f3n actual (se pierden tras recargar las p\u00e1ginas) o guardados en el lado del cliente (se conservan entre sesiones). Para almacenamiento persistente, se han preparado backends para almacenar datos en el sistema de archivos local mediante OPFS (Origin-Private FileSystem, una extensi\u00f3n de la API de acceso al sistema de archivos, disponible solo en navegadores basados en WebKit y Chromium) y en los almacenes locales de los navegadores basados en la API window.localStorage y window.sessionStorage. En caso de usar localStorage\/sessionStorage, los datos se reflejan en los respectivos almacenes en formato clave\/valor, mientras que al usar OPFS se contemplan dos opciones: simulaci\u00f3n de un sistema de archivos virtual mediante WASMFS y una implementaci\u00f3n separada de sqlite3_vfs, que ofrece una capa SQLite VFS basada en OPFS.        <\/p>\n<p>Para compilar SQLite en una representaci\u00f3n WASM, se utiliza el compilador Emscripten (basta con compilar la extensi\u00f3n ext\/wasm: '.\/configure --enable-all; make sqlite3.c; cd ext\/wasm; make'). Al final, se generan los archivos sqlite3.js y sqlite3.wasm, que se pueden incluir en su proyecto de JavaScript (ejemplo de HTML y JavaScript).<br \/>\n<br \/>Fuente: <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.2 - 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\/es\/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.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"es_ES\" \/>\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\/es\/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\udd47Se ha agregado soporte WASM en SQLite para usar la base de datos en el navegador web | ProHoster","description":"Los desarrolladores de SQLite est\u00e1n trabajando en la implementaci\u00f3n de la capacidad de compilar la biblioteca a c\u00f3digo intermedio WebAssembly, capaz de ejecutarse en navegadores web y adecuada para organizar el trabajo con bases de datos desde aplicaciones web.","canonical_url":"https:\/\/prohoster.info\/es\/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":"es_ES","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\/es\/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\/es\/wp-json\/wp\/v2\/posts\/105408","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/comments?post=105408"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts\/105408\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/media?parent=105408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/categories?post=105408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/tags?post=105408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}