Node Diggity


I’m getting fully stuck into Node.js today, writing a POC service with a number of REST endpoints, using Express. I do like the quick simplicity of setting up entire services in this way, often in just a single file, there’s always that buzz you get from the initial rapid development of any project in its early stages.

One thing I will say, though, is that I do have doubts about my own ability/knowledge when it comes to securing a Node app, as opposed to a Spring/Java service which I’m a lot more accustomed to. I need a bit more experience with Node in production before I reach a reasonable level of confidence in security matters.

In this case, however, the service I am writing is a purely public search engine wrapper, with only GET endpoints and no intrinsic vulnerabilities provided by the endpoints themselves (I have taken care of the obvious SQL injection stuff etc.). With that in mind, I don’t have any huge concerns in deploying the finished version to production.

Best crack on.



ElasticSearch and Solr


Oh, I’ve started a new job by the way. I’ve waved goodbye to the best group of people I’ve ever worked with in Salford, and I’m starting afresh in Bromborough with another group of fine folks. My jobs have been getting consistently better over the years, and I hope this trend continues.

Anyway, I’ve been looking at ElasticSearch and Solr today – having spent the entire morning installing the latest Mac OS X update in order to be able to run Docker etc. etc. – for the purpose of understanding the current in-house implementation of Solr, with one eye on a possible migration to ElasticSearch.

It’s been hard going, to be honest. Combined difficulties of requiring to tinker with config files on the file system, whilst struggling the access the file system of running Docker images. Making small progress like.

Anyway, I’m just glad I’m diving back into Docker at last. It’s been a while and I should really have had this sorted by now.




Signed Up To AWS


I’ve just taken the plunge and registered an Amazon Web Services account. It’s time to see what all this cloud nonsense is all about.

I’ve just been playing around with a basic Lambda function for now, just finding my feet really. I’ll be looking for some decent tutorials today, to get some ideas on what would be valuable to learn/implement, and what services are worth tying together.

I definitely like the idea of leaving the infrastructure, high availability, scalability etc. concerns to another entity, and just focusing on the code (and minimising the cost of running said code).

Let’s see where this goes anyway, I might be considering migrating my other services over to AWS soon if I’m suitably impressed with its capabilities.



Docker On Hold


So it seems my efforts to Dockerize/Containerize my applications were a little bit hasty, since it turns out I cannot run Docker on my remote VPS (which is apparently run in a Container itself, so…), but I’ve managed to get round the problem – for now – by just managing the Java memory distributed to each application a bit better.

> export _JAVA_OPTIONS=-Xmx256M

> java -jar {application}.jar -Dserver.port={port} &

This is currently allowing me to run 4 concurrent applications, and I’ll be looking to squeeze in one or two more shortly.

I’ll probably end up upgrading my VPS to cope with this soon – or, more likely, upgrade to a Cloud Server so I can run Docker.

Anyway, that’s it for now, I’ve got some stuff to do with GrappleAppImageServer today/tonight, and at least it’s now able to run alongside GeeOhTileServer.



Docker Installation


I’m installing Docker on my home Ubuntu server in preparation for doing the same on my VPS, so I can put more apps into production on the same server and make the most of any available resources – without having to upgrade my hosting package.

Firstly, I need to check the current kernel version, to make sure my machine is compatible with Docker.

> uname -r



That’s fine. Just had to be greater than 3.10.

Now, let’s update package info, get keys etc.

> sudo apt-get update

> sudo apt-get install apt-transport-https ca-certificates

> sudo apt-key adv –keyserver hkp:// 58118E89F3A912897C070ADBF76221572C52609D

Next, I need to edit the docker.list file, removing any existing entries and adding a correct entry for my version of Ubuntu, 14.04 (LTS).

> nano /etc/apt/sources.list.d/docker.list

deb ubuntu-trusty main

Update the package info again, purge, and verify that APT is pulling from the correct repo.

> sudo apt-get update

> sudo apt-get purge lxc-docker

> apt-cache policy docker-engine

We need to do some further installing before we can actually get Docker.

> sudo apt-get update

> sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual

And now we can finally install Docker…

> sudo apt-get update

> sudo apt-get install docker-engine

There. Done. To start the Docker daemon, it’s just:

> service docker start

And to make sure Docker is working correctly, attempt to run the “Hello World”, erm, container?

> docker run hello-world

Hello from Docker.

This message shows that your installation appears to be working correctly.

… etc.

Great success! That will do for now. I’ll do another blog when I attempt to put one of my apps into a container. Should be fun.



Spring Boot


I’ve been working with Spring Boot extensively over the past few weeks – aside from actually relaxing and enjoying the festive period – and I’m making really fast progress in producing new server applications (both in my job and in my personal projects).

The speed at which you can get applications up and running is amazing. I was impressed by my first interaction with Node.js but Spring Boot seems just as quick/easy to set up and I can back it up with my existing Java/Spring/REST etc. knowledge. Methinks I have found the correct technology for writing Gee-Oh! Server properly.

Elsewhere, I will shortly be looking at Docker as a way to deploy the applications, so I’m gaining good knowledge here. ’tis a growth period for me.



You’re MEAN!


I’ve been reading up on the MEAN stack today, and started to dabble with Node.js, and I’m already warming to it all as a technology worth pursuing.

Following the initial setup guide in “Write Modern Web Apps with the MEAN Stack”, by Jeff Dickey, I installed Node and had a basic server up and running less than 5 mins after the installation had finished. I exaggerate not. Seems like a very good book, check it out here:

My interest in this new web tech has coincided with probably the best idea for a website I’ve ever had, so it seems fitting that I attempt to develop it in Angular/Node etc. May as well turn it into a learning experience too!

[Watch this space – for quite a long time – for announcements regarding the aforementioned website idea…]

But wait, my successful introduction to new technology doesn’t stop there today! I also successfully installed Asterisk (a VoIP application/server, relevant to my current job), and got some phone calls running from my desktop to my phone. Pretty interesting stuff. Hopefully I’ll be able to ride this wave of inspiration/enlightenment for a good while yet.

Wish me luck, bitches!