I love SQLite (and use it in a large number of places in our application stack!), but I feel that it suffers from a case of bad defaults. To name a few:
- Foreign key checking (and cascading deletion for that matter) are turned off by default. You need to enable them using `PRAGMA foreign_keys = ON;`.
- There are practically no downsides (and a number of upsides) to using the WAL journalling mode (at least for "use a local database and store it on the disk" use cases). The main one being that reads will conflict with writes if you don't enable it! (which is a problem in a multi-threaded environment) Unfortunately, that's another feature you must remember to enable: `PRAGMA journal_mode = WAL;` (for obvious reasons, this one "stays enabled" after you turn it on).
- Full auto-vacuum cannot be enabled after you start writing to the database unless you enabled incremental auto-vacuum. If you're unsure, it's a good idea to enable incremental auto-vacuum to keep that option open. But, here again, that's not the default: you need `PRAGMA auto_vacuum = INCREMENTAL`.
This tends to be explicitly problematic if you have to perform one or more ad-hoc queries using the SQLite command line on an app's database, and forget to apply the relevant PRAGMAs! I wish there was a way to add "default" PRAGMAs on a sqlite database file to avoid this.
(note: some of these defaults are configurable when compiling sqlite from scratch, but if you're dynamically linking with an OS-provided instance of the library, you can't really do that).
AWS provides you with a number of DNS records for each NLB:
- One record per zone (which maps to the EIP for that zone)
- A top-level record that includes all active zones (these are all zones you have registered targets in, IIRC)
The latter record is health checked, so if an AZ goes down, it'll stop advertising it automatically (there will be latency of course, so you'll have some clients connecting to a dead IP, but if we're talking unplanned AZ failure, that's sort of expected).
That said, this does mean you probably shouldn't advertise the IPs directly if you can avoid it, yes.
(disclaimer: we evaluated NLB during their beta, so some of this information might be slightly outdated / inaccurate)
The default for overcommitting on Linux is heuristic; it doesn't always succeed: if you try and allocate several exabytes or RAM, allocation will definitely fail (in fact, trying to allocate e.g. 2GB of RAM if you only have 1 free will usually fail just the same).
There is an option for "always overcommit" (incidentally; the one Redis recommends you use), in which case allocation will always succeed provided the Kernel can represent what you're trying to allocate (what you're describing), but it's definitely not the default
Unfortunately it looks like the distros have not been particularly diligent about releasing a fix via the security channel (according to the article), so this PPA is a workaround
This principle doesn't necessarily mean functions should never return booleans, though.
Booleans are used in a variety of (popular) Python libraries when checking whether a password is correct (e.g. Django's `check_password` returns False if the password is wrong).
Quick disclaimer: I'm the author of Tini (thanks for the hat tip, by the way!).
Note that for interactive usage, Tini actually hands over the tty (if there is one) to the child, so in that case signals that come "from the TTY" (though in a Docker environment this is an over-simplication) actually bypass Tini and are sent to the child directly. This should include SIGSTP, though I'm not sure I tested this specifically.
That being said, both tools are probably indeed very similar — after all there is little flexibility in that kind of tool! Process group behavior is probably indeed where they differ the most. : )
The GitHub API allows up to 5,000 requests per hour. I currently poll once an hour, so there's a bit of headway. If that becomes a problem, I think I can always space out checks for less-active repositories (there's also the option of allowing users to authenticate with GitHub and use their own quota so they don't have to share it with anyone else).
Indeed, not yet! Private repo support would require authenticating with GitHub, which makes the project a bit more complex.
I definitely plan to add this if there's enough interest. There should be a link to a mailing list to be notified when that rolls around (http://eepurl.com/bILhR1).
It's slightly more convenient for me to get a notification than to periodically pull repositories and check them for changes, but I understand that might not be the case for everyone!
Here's the email I got inviting me to re-post the story. That's all I know : )
Hi there,
https://news.ycombinator.com/item?id=10690114 looks good, but didn't
get much attention. Would you care to repost it? You can do so
here: https://news.ycombinator.com/repost?id=10690114.
Please use the same account (krallin), title, and URL. When these match,
the software will give the repost an upvote from the mods, plus we'll
help make sure it doesn't get flagged.
This is part of an experiment in giving good HN submissions multiple
chances at the front page. If you have any questions, let us know. And
if you don't want these emails, sorry! Tell us and we won't do it again.
Thanks for posting good things to Hacker News,
Daniel
These are great points; thanks for your feedback! :)
I'm trying to validate whether there's any interest in something this, so I definitely cut a lot of corners (e.g. the app doesn't maintain a copy of the repository — it just uses the GitHub API). Also using GitHub in the name might not have been the best idea.. though! ;)
I agree with you regarding the usefulness of watching arbitrary repositories. There's already git-notifier [0] that does pretty much this, but you have to set it up for yourself and it has to be configured using a text file.
When I worked at Scalr, we used Chef's Omnibus (https://github.com/chef/omnibus) to create "full stack" RPM and Deb packages, which basically include all your dependencies all the way down to libc (meaning libc is your only dependency) in a single "fat" package (this does mean you have to keep tabs on security updates to your dependencies; that's a pretty big tradeoff). Chef (obviously) does the same thing for their Chef server.
We'd originally tried shipping the software as a package with dependencies on other OS packages (installed using shell scripts originally, and then using Chef), but this never really worked: every enterprise would have slightly different OS configurations and the install scripts would practically never work.
We did try Docker as a deployment method, but most customers weren't comfortable with it for production deployments (or simply had systems that were too old to run Docker on). Also, orchestration tooling wasn't there yet. Bear in mind that this was a year ago, though.
--
Locked-down VM images (virtual appliances) are to my knowledge quite common as well (e.g. that's how Github enterprise is distributed). With more and more customers using AWS (and other cloud providers), cloud images are becoming another viable option.
Buck2 is actually used internally with Git repositories, so using Sapling / hg is definitely not a requirement