“This or this or this option, but not more than one from this group”
What Or-Grouping is NOT:
SMOSLT, as it relates to software options, offers a way to evaluate where to commit your limited resources. Should I organize the build around a Continuous Integration server? Or commit those same resources, instead, to deploying my services to smaller linux container modules?
- Continuous Integration
- Docker Container Service Deployments
These concerns each require a commitment of resources, and I only have enough resources to do one, but neither do they overlap. I could do both, if I had enough resources.
What Or-Grouping IS:
If I decide to commit resources to Continuous Integration, I’m still not done with the comparison of options. That’s where or-grouping comes in. Consider these options for Continuous Integration servers:
- Thoughtworks Go server
I need to pick whichever one of these options makes the most sense for my organization.
I would never choose more than one of these, it’s an either/or choice. Pick one.
How Or-Grouping Fails in SMOSLT.options module:
The magic of SMOSLT.options is that, unlike it’s human operator, it can compare every combination of options given to it.
Yet this same feature, without or-grouping, has an unintended side effect. For example, it might cause Jenkins and Bamboo to be selected for comparison at the same time! Wrong! The human would know that you either use Jenkins or Bamboo to achieve Continuous Integration, but you would never use both in combination! SMOSLT.options has no way of knowing that, without or-grouping.
How To Use Or-Grouping:
Or-grouping is implemented via naming conventions. Consider again, the same list of candidates for SMOSLT.options to compare:
To implement an Or-Group, we rename this same list as follows:
SMOSLT.options module now knows to never evaluate any combination of two or more of these options at the same time. For example, using red bold to indicate selected options, SMOSLT.options would not evaluate the following combination:
- Ci3-Thoughtworks Go server
Scoring and Inheritance with Or-Groups
Each of these CI server options is more alike, than they are different. Differences between Continuous Integration servers exist, but the big difference is not between them, but between using a CI server and not using a CI server. Again, the list, only this time the name of the java file that does the scoring.
Scoring each of these means writing each of the above java class, and then copying and pasting the common scoring code into each, and changing whatever is unique after copying and pasting.
We all know the problems of maintaining copy-pasted code. Not good.
So instead, we refactor the above group to add a common super-class. Now the or-group class structure looks like this.
- Ci1-Jenkins.java – extends Ci0-ContinuousIntegration
- Ci2-Hudson.java – extends Ci0-ContinuousIntegration
- Ci3-ThoughtworksGo.java – extends Ci0-ContinuousIntegration
- Ci4-Bamboo.java – extends Ci0-ContinuousIntegration
Now we can put the common scoring code in Ci0-ContinuousIntegration.java
and the other classes will only contain the scoring code that pertains to that unique server.
The existence of an or-grouping in a SMOSLT.options run alerts the SMOSLT.analytics module that you care about comparing various Continuous Integration options.
So the SMOSLT.analytics module prepares a separate tab in the spreadsheet document, just to compare those options. It names this tab, appropriately, “Continous Integration”
Or-Group Score Summarization?
As mentioned above, you have two primary issues when looking at Continuous Integration for your project.
- Should I even do Continuous Integration at all, or devote resources to something else?
- If I do, which of the many attractive servers should I choose to implement?
SMOSLT.analytics will prepare a spreadsheet with potentially many sheets to help you with this and other options. As stated above, it will even prepare a tab within that spreadsheet to help you with number 2 – choosing between or-group options
The analytics piece does NOT, however, help you aggregate or summarize Continuous Integration servers for number 1. If you give it 4 or-group options, it will show each individually, making your spreadsheet potentially harder to re read when deciding whether to commit resources to Continuous Integration or some other option. For that reason, you may wish to make a series of separate runs. Try this sequence, for example.
- Pick Ci1-Jenkins alone, in your first runs, to compare what happens when you commit resources to Continuous Integration versus committing resources to other options such as Docker Deployments.
- Once you’ve decided that Continuous Integration is probably going to be included in your project plan, then make some more runs with each of the rest of the CI 0r-group included. That will let you compare various CI servers and make a final decision