Here are a few findings on Multi-Read Exclusive-Write Synchronizer from a recent upgrade of DWScript‘s GlobalVar functions.
I ran some comparisons between a plain Critical Section, Delphi’s TMultiReadExclusiveWriteSynchronizer and Windows Slim Reader/Writer Lock, of which an implementation was added to the dwsXPlatform unit.
I’ve activated a small random pass phrase secure service based on DWScript Web Server.
You can reach it at
The twist is that the computations are handled server-side, using DWScript JIT compiler, so exploration can be fairly fast and comfortable even on low-powered hardware, be it an iPad, a Smartphone or an old laptop.
Delphi offers two ways of enumerating files in a directory and its sub-directories, the first is the classic (and buggy) FindFirst/FindNext, the second is IOUtils TDirectory.GetFiles and not very efficient.
Here is why and how I implemented DWScript‘s dwsXPlatform.CollectFiles, and a tip about getting a small system-wide boost as a bonus.
The FreePascal version of DWScript has been stalled for a little while on the incomplete UnicodeString (utf-16) support among other things.
It’s hard to blame the FreePascal team for that, given that Linux is primarily utf-8, and that utf-8 has quite a few advantages over utf-16.
Work and processing classes are typically short-lived, created to perform one form of processing or another then freed. They can be simple collections, handle I/O of one kind of another, perform computations, pattern matching, etc.
When they’re used for simple workloads, their short-lived temporary nature can sometimes become a performance problem.
DWScript SVN version will now compile and run under XE5.
There is only one gotcha due to an XE5 regression.
In DWScript WebServer in the metered cloud, I mentioned setting up a light weight Windows 2008 r2 Virtual Private Server to serve as web server host.
A parallel series of articles deals with the DWScript Web Server itself, and this is a mini-series about setting up Windows 2008 with minimal memory, CPU, storage and vulnerability surface.
The DWS Web Server pre-compiled binary has been updated, it is now packaged in an InnoSetup installer, comes with SQLite 220.127.116.11 and other changes (see below).
The installer is still rather simple, but includes command files for service installataion/uninstallation, link to online documentations and an uninstaller. The previous Getting Started guide still applies, but is thus simplified.
A pre-compiled server executable is available from google code (1008 kB), built from current trunk version.
edit 2013-08-30: the zip has now been replaced by a proper installer
Below is a quick start guide to playing with that server, I hope to later find time for more complete guide up to setting up a complete “production server”.