Brian's Waste of Time

Java Daemonization with posix_spawn(2)
24 Jan 2012 7:00am GMT The traditional way of daemonizing a process involves forking the process and daemonizing it from the current running state. This doesn’t work so well in Java because the JVM relies on several additional worker threads, and fork only keeps the thread calling fork. So, basically, you need to start a new JVM from scratch to create a child process. The traditional way of launching a new program is to fork and exec the program you wish to start. Sadly, this also fails on Java because the...

Configuration Models
20 Jan 2012 7:00am GMT I have been noodling on the best general purpose application configuration model, and mechanism, I can find lately – that is, trying to find something general purpose that I don’t think is miserably bad. Specifically, configuration of heterogeneous applications in a hosted/SaaS/distributed/blah type system. I’ve worked with all kinds of stuff – not everything under the sun, for sure, but quite a few models. For purposes of this discussion, I’ll start with the one...

POSIX from Java
10 Jan 2012 7:00am GMT I have been doing more traditionally unix-y stuff from Java lately, and one of the things I have needed is proper access to POSIX and libc system calls. Luckily, there are now a couple fabulous libraries to make this easy – no more need to do your own JNI muckery. I’ve been using jnr-posix with great success. Using it for something like execv(3) looks like: POSIX posix = POSIXFactory.getPOSIX(new POSIXHandler() { @Override public void error(Errno errno, String s) { ...

Some Atlas Thoughts
28 Dec 2011 7:00am GMT Back in June (that long ago, really? wow!) I first talked about Atlas and my, time has flown. While originally created to help address a very specific problem we were facing at work, the general utility of the approach in Atlas is pretty intriguing. I want to be able to describe a system, such as: system "blog" server "load-balancer:blog" server "wordpress", { base: "linux-server", cardinality: 2, install:...

In Clauses
21 Dec 2011 7:00am GMT The most common feature request I get for jDBI, going back at least seven years now, is for automagic in-clause expansion, or the equivalent. Sadly, there is not correct general case solution for this. There are lots of solutions, but what is the right thing to do is very context dependent. Let’s look at some options. Database Specific Functionality The first option is to use database specific functionality to achieve this. The easiest of these I know of is with PostgreSQL, which has...

1 2 3 4 5 > >>

© dotMobi 2007-2011. All rights reserved