As mentioned in my recent post http://47rooks.com/2017/04/15/word-puzzles-in-dead-languages/ I published the puzzles.fortysevenrooks.com word puzzles website. Here are a few technical details for the techies among you.
As with the previous post this is based on the Text-Fabric library, this time for the Greek and Hebrew word lists used to construct a word search puzzle. Another key library is the uniseg UAX 29 segmentation library which allows one to segment a string with diacritics in it into a list of letters for each box in the grid. In pointed Biblical Hebrew of course each letter will contain diacritic marks. uniseg allows one to group the consonant with its vowels and other marks correctly for display. The same is true of the Greek where accents are common.
Regarding hosting environments. I decided to pilot using Google Cloud Platform for this. I initially thought to try using AppEngine for it but hit a snag. The first issue is that one must configure a custom AppEngine environment because the code I use needs Python 3.6 and GCP, as of this writing, only supports up to 3.5 pre-installed. But this is not a great difficulty and getting 3.6 is ok. The second problem is harder though. It appears that they do not support the use of sqlite in AppEngine. This pretty much sank the attempt. There are various speculations on the web as to why this might be. It really doesn’t matter much because if it isn’t supported uniseg will not run as it relies on it.
So to ComputeEngine. Now CE requires more setup but with it you get more flexibility. I initially tried the smallest CE instance they offer, an f1-micro instance. This instance is simply too small. My bottle container kept getting killed and my suspicion is that it was the CPU hogging protection. I suspect I would have had memory issues too. In the end my container stabilizes at about 2.4GB resident with both Greek and Hebrew data loaded. An f1-micro only has about half a GB if I recall. After that I simply went to a n1-standard-1 (1 vCPU, 3.75 GB memory) instance. That works very well and is noticeably more performant. I won’t bore you all with the details of how I set it up unless there is interest.
But suffice to say, with a bit of playing with Google’s Cloud DNS configuration and some iptables magic I have a serviceable network presence and a nice little VM in which to further develop this project.
It’s currently built on bottle which I suspect it just not adequate so I’ll probably look at other options pretty soon.
Let me know if you have any suggestions, comments or problems.