Coding Throughout Time....

This is my little spot in the WWW to spew my brains out.

Micro-services Boot Camp (Pt 1) – Overview

In the industry today there are a few different ‘buzz-words’ that are being thrown around, one of these is micro-services.  At Microsoft Connect() event a couple of weeks ago, we heard a lot about these. Not to mention that by following the .Net GitHub check-ins we are seeing some really amazing support coming for Docker and Service Discovery.

These started out as an architectural change in thinking. In the past, companies developed large, intertwined systems. The idea for most of those developers, was deployment.  It was much easier to build and deploy a single package.  It had all of its business and data classes built inside it.  There is always a cozy feeling when your package contains everything it needs to serve your clients!

One of the main issues with this way of development is that making changes and deploying them become more complex. In the logical thinker this may make sense, one deployment and it’s wholly self-contained. The issue however, is that these systems are large, and they take a lot of time to compile and deploy.  Hence you have a noticeable outage on the servers that you are deploying to!

With a micro-service you have many issues while architecting for success, however you can deploy many versions and control the deployments and updates much easier.  Not to mention testing and deployment are quick and precise.

The philosophy is that you will break down your system to its smallest component. Create that component, and replace the calls to that within your monolithic system.  The change within your architecture is massive!  There are many issues that are not thought about that will jump out as you continue your journey to creating a great Service Oriented Architecture or SOA.

I’ll start out with saying that ‘micro-services’ are not a new invention. This is what the basis of SOA is! Breaking down your components to their lowest level, and then creating something that specialized in that task.  For example, if you are creating the standard e-commerce site, you should create a user service. Of course you will have to also login to the site, so you would need an authorization service as well.  This service would call the User service to garner the user data. (See below).

 

 

As you all see this is an easy way to create and build your architecture.  The issue is that in the REAL world, this demo style code won’t scale! The authorization service would have to know exactly how to communicate with the user service. Not to mention the API gateway would also have to know how to communicate with both services are as well!

To scale micro-services you must have some middleware to allow the services to report when they come online, and when they are offline. Not to mention the ability to scale up and handle many requests. When you implement this type of architecture there are a couple of ways at this point.  Utilizing third-party products like NginX and Consul, or within Azure; Traffic Manager. I’ll touch on this in a future blog post, but what is needed in the long run is to allow multiple services to run upon a machine; or preferably a group of machines.  How many?  This is a more difficult question to answer, but as many as possible without taxing the machine they are executing upon! This could be as few as 1.

To allow many services to execute upon a single machine, you have to utilize multiple ports, and by doing that, somehow you have to allow a client service to find and communicate with your service. To allow this to happen you will need 3 points of information.   Searchable service name

 

  • Searchable Service Name
  • Service Endpoint
  • Service Port

 

By having these items any client service can find, and communicate with your service.

 

 

Let’s get started with these posts and build a working micro-service and a client that utilizes it!

Blog Update

Hey everyone.  

  I was allowed by my current client to write a blog post for their site.  We are currently working to establish a Micro Service architecture utilizing Docker/Consul/Consul-Template for service discovery.   Please feel free to read that post here.


 I will be posting more frequently now.  I'm trying to blog at least once a week.  Hope to see you all soon!

 -Gus

#CodeCast Episode #1 - w/ Miguel Castro

We recorded our inaugural edition of the #CodeCast JJ and I were joined by Miguel Castro

Miguel covered some really cool topics, one being utilizing Lambda functions; the other was showing what he believes all DI containers should have to allow more flexibility of configuration.  Both of the functions are available online, and the links are in the show notes.  Also both are part of his courses that are available on Pluralsight.

We are SO thankful to Miguel for appearing on the show and hope to someday have him back on the show to show some more exciting things.

  -G

#CodeCast

I just wanted to let you all know that officially today JJ Hammond and I have announced my new Video/Podcast with my friends over at StLTechTalk

We will be covering all types of development content.  We are focusing the content so that you, the listener, are able to learn new concepts, methods and patterns for use in your day to day lives.  Not to mention also attempting to have some fun banter and learn how many other developers worked their way up.

Please listen to us bi-weekly starting February 12th with Special guest Miguel Castro.

  -G

Welcome back!

Well everyone, I've not blogged in QUITE a while!!  Life has gotten in the way, and I'm hoping to start to blog more and more now.. As well as bringing back all of my posts from my old blog as time allows.

Technology in the past couple of years within the Microsoft universe has just exploded! With in introduction of Windows 8, SkyDrive OneDrive, Metro Styling Win 8 Apps, WebAPI, NuGet, etc., etc., etc. My ability to keep on top of all of the technology has gotten significantly harder. Thus making blogging something that I really have to force myself to do from here on out.

I must mention that I am typing this on my Surface Pro. I really like this machine. It's powerful, small and has 1080p resolution! Just the type of machine that I need in my life. Not to mention that it is Windows 8.1 and connects to everything that I need on a daily basis, both at work and at home.  Great job Microsoft!!  I did have an original Surface RT, however the screen hurt my eyes after looking at it for about 20 minutes.  I have worked with the new Surface 2 RT, and that screen; being 1080p; doesn't seen to bother me.  I may have to look into getting one, and working via Remote Desktop, since it's rumored to have an 8hr battery life.

Anyway, I'll try to keep posting and updating everyone with new things that I am working on, and showing some really cool stuff!