Tuesday, October 28, 2014

Micro-services: Learning resources.

I am currently working with/researching about micro-services software architecture (or approach to software architecture). There are tons of resources on the web but unfortunately very few of them are academic in nature. I hope that over the next coming months software/academic community will agree to have a standard definition (perhaps following a simple format similar to this one) for this topic as this subject is starting to get hot.

I personally think the name/term "micro-services" can be a bit misleading. Quite a lot of people I have talked to focus more on the word "micro" and not on the principles. I am all for light weight approaches to building software though. For the time being this term is trending and I don't see the term fading away time soon. See the buzz on twitter and youtube your self.

I hope to make this post as a learning resource for people new to micro-services. I will be curating this over a period of time (so don't expect this content to stay static ;). Please send suggestion on twitter @geoaxis or in comments.

Other lists

First of all, there are few other lists on the tubes that I would encourage you to browse

(Reading list at the end)

Academic Resources

Articles (these are in no particular order)

http://martinfowler.com/articles/microservices.html (Lewis/ Fowler: Probably the most quoted article on this subject)


Tool specific articles



Following are some videos that I have watched and think are worth watching
A whole series of videos explaining micro-services (mostly content for Lewis/Fowler)

Wednesday, May 21, 2014

Raspberry PI and TL-WN725N from hell

In the last few days I have spent a considerable amount of time trying to configure a seemingly simple Wifi dongle with Raspberry-pi. Being an ex-Gentoo user I thought how hard could it be to get some modules and load them, or so I thought.

First step was to install raspberry pi (I used this software to flash the image using my mac; bit dangerous with asking password for the system, but I am too lazy to look up on how to do this with console :)). I chose the rasbian distro, although arch looks more interesting.

Then of course you need to do an rpi-update, apt-get update to make sure you have the latest stuff

The module that I have does not get picked up by the kernel and I spent a lot of time downloading all kinds of module (.ko) files from the internet to get this dam wifi thing to work. It was a terribly long list of misses.  Long story short I found this link to help me get the wifi dongle  to work.

Then I used wicd-curses to configure the network. One thing that I had trouble with was using configure wifi option. The -> option is actually the right arrow. Once you select the wifi network you want to connect to, just press the right key. Also it was not possible for me to get the wifi network to route properly when it just started, so I just let it reboot, without any wired network. You can find more help  on this here.

I know why linux never really picked up. It is still not easy to get devices work out of the box.

Thursday, March 20, 2014

As native as possible

This is a half baked idea and kind of a rant. The idea is very simple and has to do with my personal position position about how to choose technologies.

When building a software systems, first do things as natively as possible for your context.

As a software developer I would like to construct systems that are easy to get started with, understand, maintain and still can be delivered on time. As you may know that it is impossibly hard to do so many things well in any domain.

In my brief career I have seen many examples of technology stacks and systems which try to achieve the previously stated goals by abstracting away complexities of underlying layers but also creating some of their own. If you are a Java server side developer you probably have worked with likes of Hibernate etc (which helps you create database queries). This usually results in poor results and has been discussed in community (to quote "the resulting cakes  from cake mixes generally taste worse than proper cakes...and they don't even save you any time"). And the more you use such things the more  you start justifying these frameworks/technologies.

I have found that focusing one's energy on learning the basics and applying them pays off in the long run. But it does boil down to where one needs to apply the boundary of abstraction. So as a general rule I would recommend that if you are writing to a database, it would be a very good idea to know how to use that inside out in its native form. For SQL based software it means learning about SQL, various replication and shading strategies , for NoSQL (for example MongoDB, it would mean learning about mongo internals). When working with client side UI on the web this means learning and using Javascript. There are times when things like JSF and Hibernate will help you achieve your goals. I guess in essence I am repeating the matra of  KISS and YAGNI.

So from now on I will try to use SQL/JDBC instead of Hibernate/JPA; Javascript/HTML instead of some cooked framework which tries to avoid JS/HTML.  iOS/Andoird instead of Cordova (I do think Cordova is useful for some use-cases though) and Embedded C instead of things like BGScript (for Bluetooth Smart prototyping) when ever possible.

Edit: Revised the post on 2016-08-14.

Monday, February 10, 2014

BLE Hello World in Cordova/Phonegap

After learning about bluetooth smart, I have been wanting to write some phonegap/cordova apps for my self. There are few plugins (1,2,3) available on github but in my opinion the most promising one is from EvoThings called cordova-ble. I decided to write my self a sample app for scanning on a weekend and ended up modifying one of the examples from EvoThings and mixing in topcoat and zepto as per phonegap expert recommendations. Code is here.

The code is dead simple, so I won't bother to explain it, but essentially it is just HTML5/CSS3/JS stitched together with the evothings plugin.

Video made with the help of  ReflectorAndroid SCR and Apple iMovie