Home Server

I’m not quite sure why, but the Raspberry Pi has always seemed neat to me. If you’ve ever even looked at trying to build up a small piece of hardware out of components, the price quickly scales to something higher than anticipated and almost high enough to warrant just purchasing a pre-made item. To have the Pi (almost) ready to go for around 40$ is pretty awesome – I think the Model A started at 25$? Of course everything adds up if you don’t have a keyboard/mouse/wifi adapter/monitor/power adapter etc, but luckily I have everything lying around. It’s an extremely cool platform to play with. I think a contributing factor for me is the seemingly transient nature of the PI’s software. It doesn’t have to be that way, but it’s trivial to change the SD card and have a completely different environment running on the same software. Want a LAMP server? Pop in an SD card. Dedicated RaspBMC? Swap it out. Nothing has to collide, it’s easy to image the SD cards so you can save the state of anything you’ve done. It just seems a lot more forgiving than a traditional computer. I imagine it’s just because I don’t have an intimate knowledge of most of the stuff I’m trying to do, I screw up often and catastrophically, so being able to segregate “experiments” so the successful ones can live on is a big deal.

To that end, in my spare time – there’s not a lot, so it’s going slowly – I’ve been working towards getting some kind of situation set up where I can have a server running off the Pi at my house, and then I can… do stuff with it. That’s about as fleshed out as it is right now. I’d like to use it as a resource for developing some apps I’ve been thinking about, and almost immediately when considering a dynamic app there needs to be some kind of server backing it. Earlier I had a LAMP server running on the Pi, but I kind of hate PHP. I had only a very limited exposure to it, but it really didn’t strike a chord with me. My first programming language was in high school – Turing, and that was a decent introduction. Actually, that’s not true. My FIRST first language was Forth, I had an introduction book from my father when I was young, but I never really did anything impressive with Forth, so I don’t really count it. My next language was C, which I found fascinating because of the raw (very raw) power you could wield. After that came C++, then briefly all of the languages in school – Python, Ruby, Scheme, SQL, etc, and then finally Java. With each and every one of them I had a moment of “well, this language has contributed to my greater understanding of software design and programming possibilities”. I feel like each one helped me grow technically but also creatively, as it broadened my problem solving palate. I didn’t get that with PHP. Maybe I need to give it another chance. I won’t.

Through work I had some exposure to Spring IO framework, and have found it extremely interesting. I’m a little intimidated by it though, there seems to be a massive amount to learn. Starting off with one of the sample projects goes a long way; they make it very easy to get something working so you can change bit by bit until it suits your purposes. The one big thing that kind of throws me is the extensive use of annotations. That’s something I’ve only used in passing before, and while it seems very powerful it also seems to hide a lot of functionality. As someone who doesn’t know what they’re doing, a single annotated line wiring together a massive amount of functionality is a bit frightening.

All that to say: following the Spring tutorial for creating a REST service I was able to get it running on my computer. Not only that, but using their Gradle tutorial I was able to get a very basic introduction to Gradle, which also seems extremely impressive. It doesn’t hurt that Android Studio uses Gradle (leaving behind the ADT bundle of Eclipse and Ant), so the knowledge would certainly help. Referencing the Consuming a REST Service with Android tutorial, in a couple hours I was able to build a Java server using a text editor (Sublime), do the same thing but using the Spring Tool Suite, and build an Android application that could interact with the server. The Spring documentation is pretty outstanding. Kudos to them. The next step will be to get the running on a Pi, then I suppose after that I can figure out what I can actually do with it…

1 thought on “Home Server

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s