JavaEE Caching Standards

| Comments

JSR-107: JCACHE - Java Temporary Caching API

JSR-107 standardises the Java Temporary Caching API. The deliverables for this JSR, including the specification, the technlogy compatibility kit (TCK) and the reference implementation (RI) can all be found on github.

There’s even a demo containing a unit test demonstrating how the simple map-like API works:

This API should allow developers to choose implementations of a standard API instead of rolling their own caches, allowing features such as write through to be implemented later using the standard.

JSR-107 is scheduled for inclusion in JavaEE 7.

JSR-347: Data Grids for the Java Platform

JSR-347 intends on building on the work of JSR-107.

The JSR makes a distinction between a temporary cache and a data grid. It will likely extend JSR-107 with proposed features such as an asynchronous API, distributed code execution (Map/Reduce) and a colocation API for locating related entries near each other.

As is usual these days, discussion on the JSR is on an open mailing list.

This JSR is targeting Java EE 8, in turn allowing for use of language changes in Java 8 such as the use of closures defined by JSR-335 (Lambda Expressions).

Shared BASH Configuration

| Comments

What?

I use a github gist to share bash configuration between machines, allowing for shared aliases, useful PS1 variables within git repositories, etc.

Anyway, just add the following to your ~/.bashrc:

1
2
3
curl --silent https://gist.github.com/raw/4572711/bash.sh -o /tmp/bash.sh
source /tmp/bash.sh
rm /tmp/bash.sh

I’m sure that could be a one liner, I had trouble sourcing the output of curl for some reason. Then ensure the URL matches a gist.

There are obvious security concerns with executing code from a remote location, but if you’re willing to overlook that there are plenty more aliases at http://alias.sh.

Retrieving a POP3 Password

| Comments

Scenario

I was away with relatives over Christmas and one of them was having some trouble with email on their iPad. Changing them over to a local SMTP server allowed them to send email but they still weren’t able to retrieve their email. I suspected that this might also be because we were in a different country and the webmail system would work but they didn’t know their own email password.

So I set about getting hold of it. What followed is probably the most convoluted way of pulling a password out of an iPad, but it worked, so I’m keeping this record of it.

Execution

I installed dnsmasq, a caching DNS on my Macbook and configured it to map the mail server’s domain name to my Macbook:

1
2
# port install dnsmasq
# cat "address=/mail.server.com/192.168.1.100" >> /etc/dnsmasq.conf

Next I setup a fake POP3 server on my Macbook:

The above being run with:

1
$ python pop3.py

I then modified the network connection on the iPad to use my machine for DNS and watched the credentials appear. Well, eventually, after a few iterations.