Slim Multi-Read Single-Write Locks
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.
Random Passphrase Generator
I’ve activated a small random pass phrase secure service based on DWScript Web Server.
You can reach it at
DWScript Mandelbrot Explorer (with a twist)
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.
Efficient File Enumeration
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.
UTF-8, UTF-16 or both? (poll)
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.
(more…)
Boosting Work Classes with a mini Object Pool
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.
(more…)
DWScript now supports Delphi XE5
DWScript SVN version will now compile and run under XE5.
There is only one gotcha due to an XE5 regression.
Setting up a Windows 2008 for the metered cloud – part 1
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.
Updated DWSWebServer precompiled binary
The DWS Web Server pre-compiled binary has been updated, it is now packaged in an InnoSetup installer, comes with SQLite 3.8.0.2 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.