Compiling Java Classes with Clojure Deps

October 24, 2019

In the past, I used Leinigen for Clojure projects. It downloads dependencies, compiles, handles the classpath, runs tests etc. Clojure 1.9 introduced the clj command line and the deps tooling. You can specify a deps.edn file and declare the dependencies in there. Deps not a build tool by design. it only downloads dependencies from Maven- and git repositories and builds the Java classpath. It doesn’t have other build features. However, for smaller Clojure projects that is enough and you can go without an extra build tool.

So, I started to use Deps as the starting point and it serves me well so far. Recently I wanted to add a Java class to my project. I do that when using Clojure-Java interop gets complex and it is just easier to have a few helper Java classes. However, how do I compile these classes? Leiningen has the lein javac command, but Deps doesn’t do builds.

Continue reading →

Java, Let me use the damn FileDescriptor!

October 15, 2019

Last Update 2024-01-30, see below

Recently I hacked on some utility in Java which should be able to bind low ports like 80 or 443 on demand without running as root. When I needed to bind these port I wanted to execute an external process as root which opens the ports for the main process and then sends the ports via Unix domain socket.

Continue reading →

Intro to MVStore, an embedded key value store

September 25, 2019

MVStore is the backend storage for the popular embedded H2 relational database. If you don’t need a relational database, but a lower level storage MVStore is maybe an option. The MVStore has a good nice range of features. The documentation isn’t as detailed, but the intro documentation gives a decent overview. Anyway, this post is another small intro.

H2 vs MVStore
Figure 1. H2’s companion, the MVStore
Continue reading →

Missing SNI with Java's HTTPS client

September 6, 2019

Recently I got strange exceptions connection to HTTPS while developing a Java app. The app connected to my local machine using it’s host name with the Apache HTTP client:

CloseableHttpClient client = HttpClientBuilder.create().build();
String url = "https://gamlor-turboro/files/info.txt";
try (CloseableHttpResponse result = client.execute(new HttpGet(url))){
    String body = EntityUtils.toString(result.getEntity());
    System.out.println(body);
}
Continue reading →

Good Bye Turbo.net

September 4, 2019

I left my work at https://turbo.net this month, taking a break before looking for a new opportunity. Some reflection of over 6 years working there.

Turbo-lent Years: Heavy Evolution of the Product

When I joined Turbo.net it was known as Spoon.net. It could launch sandboxed Windows apps and provided a Dropbox liked sync service. During my time we introduced Turbo.net application containers. Think of Docker containers for Windows desktop apps.

After the Desktop containers system was running, we started to implement cloud remote applications. That allows you to launch Windows apps on your iPad, Mac, Windows and any HTML5 capable browser. Turbo.net provisions and manages Windows machines for you to run the apps on and uses the app containers to move apps onto the blank Windows machines. Your organization doesn’t need to manage Windows machines. You launch the app and use it.

Turbo.net History
Figure 1. Turbo.net History
Continue reading →