[Purebiblesearch-release] PureBibleSearch WebAssembly Release
GUI Application to Search and Count the Pure King James Bible
Brought to you by:
dewhisna
|
From: Pure B. S. R. N. L. <pur...@li...> - 2020-04-05 15:23:46
|
To All King James Pure Bible Search Users: Many of you may recall a strange server outage for the PureBibleSearch.com website on March 12th. To this day, I still don't know exactly what caused that. It might have been COVID-19 related or it could have been that the handle of the broom of the janitor in the computer data center accidentally hit the power switch to the server. I suspect the former and someone needing more computer resources at AWS and yanked my spot instance. The type of service I have only gives a 2 minute warning prior to going down. The only clues I have from the log files and history reports is that it started shutting down at 14:52:01 UTC, a few seconds after it was notified of the pending shutdown, and was offline about 2 minutes later at 14:53:55 UTC... Since I was at work when it happened, it took me about 12 hours to configure a replacement server and get it back online by that evening. But I'm happy to report it has been running without issues ever since. These certainly are strange days and bizarre times, but I have not let them go to waste. Since I've had more time at home and not so focused on other tasks, it has given me opportunity to explore porting the King James Pure Bible Search software to the new WebAssembly target. WebAssembly is essentially the next generation of Emscripten. So what are Emscripten? And WebAssembly? Glad you asked... Emscripten (https://emscripten.org/) is a toolchain designed to cross-compile C/C++ code originally to Javascript (the native scripting language for most web browsers) and now to WebAssembly. This allows applications to be compiled to run right inside your browser without having to install anything on your computer. And unlike the WebChannel and VNC versions of KJPBS, which run on a remote cloud computer server and are only accessed via the browser, run entirely locally within your browser itself. Ever since February 2014, I have had an Emscripten version of KJPBS available on the PureBibleSearch.com website that allowed users to run a version of KJPBS in their browser as Javascript. While this was great, and was no small feat, it was considerably slower and more clunky than the full application, because Javascript is (mostly) an interpreted language and had to deal with a set of browser sandbox restrictions that varied from one browser to another. Recently, a new technology has emerged called WebAssembly (https://webassembly.org/). WebAssembly is a binary instruction format language that has been adopted as a standard by all of the major browsers. Emscripten was extended to target this new instruction set and cross-compile applications to run within WebAssembly on these browsers. WebAssembly, being a binary instruction format language, is much faster and more efficient than its Javascript predecessor. It's quicker to load and requires less overhead. And by being a specific standard, it has a standardized sandbox environment on all browser platforms. What is this sandbox I keep talking about, you may wonder? A sandbox is a restricted environment for a script or application that allows a limited set of system resources to be accessed. The application can "play", but only within its "sandbox" (much like a kid who is isolated to play alone in a sandbox on a playground is isolated from the rest of the playground). When you visit any website that needs to run code on your local computer, you wouldn't want that code to have full, unlimited access to everything on your computer, as you might stumble across a nefarious website with malicious code and it could take over your computer. So the web browser, puts all code it runs from remote sites into its own "sandbox", allowing it to run, but with only limited and specific access to system resources. This new WebAssembly technology is very new and was only first adopted by some browsers in 2017 and now in all major browsers by 2019. As such, to run any WebAssembly application, you must have installed the latest version of your browser (compatible browsers are listed at the https://webassembly.org/ link). This weekend, I just posted the first WebAssembly version of KJPBS to the http://www.PureBibleSearch.com/ website. It is still somewhat experimental and you will certainly find various quirks with it -- for example, one quirk that I haven't figured out what to do about yet is the shortcut keys within the application, as the browser is intercepting them for its own shortcuts. Since it is a sandboxed application, which makes it difficult to save a local user notes file, this version, like the former Emscripten version and VNC version of KJPBS, is a "Lite Version" of KJPBS that doesn't allow user text highlighting, notes, or cross-references, because there is no good way to save them -- meaning you'd lose your notes and highlighting when you exit your browser and/or clear its cache. So those features are simply disabled. In general, this gives yet another way to run KJPBS that will grow as WebAssembly grows and is adopted by other browsers and platforms. I have had a few people test it on mobile devices, but so far, it seems that at least iOS and Android do not yet support it. Perhaps they will in the near future? However, even though I haven't been able to test it yet, I do suspect it will work on a Windows Tablet with an appropriately new enough compatible browser installed, like Chrome or Firefox, since a Windows Tablet is essentially just a Windows laptop computer in a different form factor. But if anyone is able to make KJPBS WebAssembly run on either an iOS or Android device, please let me know the exact Operating System version and which browser was used and its exact version, so that I can document it and notify other users. You can find the KJPBS WebAssembly version on the same page as the VNC and Emscripten versions of KJPBS on PureBibleSearch.com at: http://www.purebiblesearch.com/online/index.html Note that the WebAssembly version requires an initial download of about 100megs each time you launch it. This transfer contains all of the Code, Bible Databases, and Dictionaries and copies it to your computer's browser to run. However, once it begins running, it runs entirely within your browser and no longer needs web access until you close the page and start all over. But, if you are on a limited data plan, please be aware of this 100meg transfer. I hope this version proves useful to someone. God Bless, Donna (You are receiving this email because you are subscribed to the SourceForge purebiblesearch-release mailing list) |