Friday, June 28, 2013

JEE 7 JSR375 batch support

Ran across a few articles on JSR375 (JEE 7 Batch).  Interesting but is there enough benefit in this to convert from any existing solutions.

What I really wish for is a wider variety of low cost scheduling solutions.  Something more than a cron or Quartz like solution.   My core requirements would be something like:
  •  100% Java
  • Clustering/Load balancing support 
  • fail-over 
  • Job chains
  • agentless support
  • remote job execution
  • DB backed job status, job defs, job history, etc
  • Nice UI for monitoring and job definition maint.
  • Execution of SQL jobs
  • Some "easy" way to support disaster recovery needs

I was intrigued by the SOS Berlin JobScheduler (http://www.sos-berlin.com/modules/cjaycontent/).  The UI had a few usability issues and it isn't 100% Java; seems like it was only supported in a 32bit environment which would be a headache.  For a free/open source product though - it has some very nice enterprise level/type features.

In the meantime, just sticking with Jenkins CI as poor mans scheduler and still thinking about writing some plugins to fill some gaps. 

Friday, June 7, 2013

DIY Wood flooring tips, tools and other stuff

We decided to replace our carpeting with 3/4" prefinished tongue/groove wood flooring.  With the cost of the wood alone being so expensive I decided to go ahead and lay it myself.  Ended up laying 57 of 61 boxes.  I will note that I am only moderately handy and have never done this before.  My job and skills are much more on the computer/technical side than carpentry side.

Summary:
  1. Prefinished versus unfinished flooring
    1. Prefinished flooring takes less time since you don't have the finishing steps
    2. Prefinished can look very nice
    3. Prefinished with beveled edges helps with hiding minor imperfections in the floor.
    4. Prefinished is more susceptible to nicks on the edges due to unskilled nailer [i.e. me] and tiredness causing the nailer to twist slightly.  Maybe a better quality nail gun would help or more skill than I had.
    5.  Prefinished was less messy and allowed simply moving furniture rather than removal or very careful covering.
    6. Unfinished would allow for fixing minor nicks, etc during the sanding stage.
  2. Finishing around brick fireplace
    1. Seems like most people recommend either framing around a fireplace or laying the wood against it and filling gaps with an appropriate caulk.  Personally, I don't like the look of the examples I saw on the internet.  These are the easiest/cleanest/fastest method of handling a fireplace.
    2. Undercut the brick so the wood slides slightly under the brick.  This turned out to be terribly messy but the end result was fairly nice. I recommend taping plastic sheeting from ceiling to floor all around the fireplace and wear a respirator.  If possible, you may want to hook up a heavy duty ventilation fan (type that comes with a large diameter hose) and vent it out a nearby window.  Don't bother trying a regular fan and flexible ducting - waste of time (er, not that I tried it but my wife may still be laughing a bit).  The jamb saw and masonry blades worked incredibly well for working with the brick.  I think I went through 3-4 blades for our fireplace.  Be VERY careful on the corners, make sure you cut plenty deep because when you go to chip out the brick below your cut; the corners tend to break and take material you didn't intend. Epoxy, brick chips and maybe a bit of brick dust help fix the problem..
  3. Things to be aware of
    1. Make sure you pound down any raised nail heads in the underlayment. They will cause much grief otherwise (noticeable rise compared to surrounding wood, snag during nailing causing gaps or a need to rework).
    2. Try to mix multiple boxes together to prevent a potential patchy look if a box happens to not be overly varied.  Our wood seemed fairly varied in each box but it could be different by flooring source or flooring grade.
    3. I took down all the preexisting floor molding with the intent of installing the flooring closer to the wall and then simply putting the floor molding back in place to cover the required gap instead of using shoe molding.  This would have worked EXCEPT I had not considered how much the house had settled over the years which resulted in places where there was nearly a 1/2"+ gap between the bottom of the molding and the wood floor.  I ended up getting unfinished oak shoe molding and staining it myself (with help from daughter - nice bonding time).
    4. Be careful not to OVER compress the wood during installation.  I have one piece which split and now I am learning how to cut out and replace a piece.  Not easy and not sure the result will be as nice.  It is somewhat hard to predict which pieces may have week spots.  I will note that the more interesting/swirled grain patterns in some of the oak pieces seem to have shrunk a bit more during factory drying.  Those end up with a somewhat lower height compared to neighboring pieces and sometimes are 1/32-1/16" thinner as well which you may not realize until you go to put the next row in.
    5. Particle board is not recommended as the underlayment for the flooring.  The nails don't hold in place as well.  We had mostly carpeting before this and particle board is popular and probably reasonable for that but I wonder a bit about long term durability.  I ended up using extra nails to help.  
    6. You may very well find really uneven underlayment once you rip out carpeting - especially near something like a bay window.  Fix it or it will show.. This is another place where maybe putting down a thin plywood may have helped (along with fillers or whatever) me fix some of the uneven spots.  Hind sight is 20/20..
    7. Cut the door jambs earlier than later.  You don't want to be cutting near wood that is already laid - it is really easy to slip and nick it.
    8. I normally did not face nail pieces near the wall.  I would move from the floor nailer to a finish nailer and then a brad nailer as space got tight.  This did result in a few problems (like breaking the spline) where I tried too hard to use a nailer instead of just glue.  I used titebond 3 wood glue to glue the last 3 rows or so together or other places where there wasn't a good way to nail it.  Using these methods meant that I had to wedge spacers between the wall and last piece of wood to make sure no gap occurred. 
    9. I did put down the flooring paper provided by the provider of my flooring.  Not sure of the quality or whether it provides our specific installation any specific benefit.
    10. You can try manually putting in finish nails in the last row or 2 (into spline just like floor nailer) but I recommend pre-drilling the holes and be prepared for a difficult time.  I messed up numerous splines and spent lots of time trying to get the nails set far enough to prevent snagging things.
    11. Check your furniture for feet that will dent the flooring.  If you have step stools; put felt on any part that has ridges that rest on the floor! Took a day to figure out where all the dents in the kitchen suddenly came from - a bit depressing.
    12. Ah, should be obvious but just to have it in writing; only nail into the spline of the wood, not the grove.
  4. Floor Layout
    1. There is a main main beam which runs the length of our house down the center.  The floor joists run from each each of the house to that beam.  I laid out the flooring so it would cross the floor joists.  I felt this had the best chance of reducing flex. 
    2. I started the flooring in the hallway which runs most of the length of the center beam of the house.  I started near one wall in the hallway and tried to work most of the length of the hall and ending at the dinning/living room.  I used a laser level to try and keep the row as straight as possible.  This was VERY important, any waviness in the row results in hard to nail rows later (gaps and lots of floor jacking required).  I did try to add some back support to the initial row and tried to keep the next couple rows dry fitted to help keep things straight.  I could have done a better job on that first row - it would have made the rest of the house easier.
    3. I did the flooring in a continuous pattern.  i.e. it is laid out lengthwise in the entire house and there are no breaks or direction changes throughout.  This is where the wood spline came in handy - as in moving into a room from the hallway and then having to reverse direction (move back toward the hallway) to do a closet.  I usually added some titebond 3 to the spline prior to nailing.
  5. Shoe Molding
    1. Compound miter saw was great for this.  I am thinking that a manual saw of good quality with a good quality miter box would have been more efficient (I would have been more likely to have it in the house instead of running back/forth to garage).
    2. I stained the cut ends as I was installing this.  Try to make sure the dry fit is fine before staining because you can get some goo build up on the miter saw blade otherwise.
    3. For inner corners I used the miter saw to start and then the dremel drum sander to cope one side.  Google for "coping molding" or "coping joints" to find some good examples.  Take your time, it will show.

Items I used:


Harbor Freight 3-1 pneumatic nailer/stapler with 2" cleats

Jamb saw and some blades for masonry (for undercutting fireplace), included wood blade fine for door jambs

hard wood spline; note that some flooring places have no idea what this is.

Flooring jack from Harbor freight was indispensable.


Hearing protection for everyone around while you are working is VERY important.

A variety of pry bars, heavy duty putty knives, flat screw drivers,etc.

Oscillating tool with a variety of blades (wood/bi-metal) and size
Flooring spacers/kits; wedge between wall and final glued row to remove gaps between last row and previous row while glue sets.  Also can use at ends of rows to keep a consistent end gap.

Stuff not pictured include:
  •  Air compressor  
    • There is a trade off between size, portability, convenience and usability.  In my case, running a couple of air hoses from garage into the house through the fireplace ash hatch worked but was an eye sore for a very long time.  With only a single nailer going, a small 125psi compressor would likely be fine.  Don't forget some pneumatic oil for the tools unless you like clearing nail jambs or fixing the result of nail feeding issue.
  • Pneumatic finish nailer and ~ 2" nails
  • Pneumatic brad nailer with a variety of brad sizes ~1-2"
  • 10" Sliding compound miter saw
    • This was the main saw I used since I laid out the wood in a way which mainly required cutting off length.
    • Use a good quality blade to reduce chipping/splintering
  • 10" table saw 
    • mainly for reducing width for final row near walls. Sometimes bottom beveled some pieces to ease getting them into place against the wall.
    • Use a good quality blade to reduce chipping/splintering
  • Jig saw with a good quality wood blade.  I tended to use this for odd intersections like at vents or at the corner of the fireplace.  Make sure you are able to clamp the wood down well.
  • Hand saw, hack saw and some spare blades (hack saw blades were useful in trying to remove a botched nail job by cutting off nails below boards after slightly prying them up).
  • Wood chisels for a few odd situations
  • Dremel with sanding attachment, small carbide wood cutting disk, etc. I tended to use this when I made hard to fix mistakes like nailing down a board which I had removed the end mortise from but needed one still.  Just use dremel to cut a new mortise.  It pays to keep cut pieces in nice separate piles (i.e. cut on left or cut on right).
  • TiteBond 3 wood glue
  • Brick chisel
  • hammers
  • some 1 1/4" finish nails (non-pneumatic nailer)
  • pin punches/nail sets of various sizes (manually finish setting nails which didn't sink deep enough or put in some manual finish nails)
  • nippers (for cutting off nails in trim or flooring boards instead of trying to remove them)
  • variety of pliers
  • tape measures
  • straight edge
  • drill and various small bits
  • work gloves and eye protection as needed
  • Band aids and tweezers - there will be splinters
Final result around fireplace.  Undercut brick with jamb saw w/masonry blade. (Very carefully) chip out brick with brick chisel until wood can slide partway under brick.

Apache Archiva 1.4 m4 versus Artifactory 3.0.1 - access from Eclipse 4.2.1 w/maven integraton

The pain of managing libraries/dependencies differently between the build server and individual workstations combined with differences by application has been a large burden.  I finally got around to starting to do something about it.

I started with the Apache Archiva 1.4m3 & m4 versions.  I picked these versions since they are architecturally closer to what I am aiming to support in our environment versus the 1.3.x versions.  The main issue I ran into was with getting the software working with our active directory.  It may be an issue with my configuration but there was a lack of documentation to help me past the problem (NPE while getting information regarding the user).  The default logging and error message was not helpful.  I threw in the towel after about 4 hours on the AD issue.  My general impression of Archiva is that it has plenty of potential but is not quite polished enough for our environment.

My next attempt was with Artifactory 3.0.1.  I was able to get this up and running in about 30-45 minutes.  It worked with our AD after comparing configuration with a few samples on the internet and the documentation.  I was able to very quickly import an existing Maven repo and get a virtual repo setup to front our internal resources and all external repos.

Currently we  use Ant with some Maven tasks to manage dependencies in our Jenkins builds while the source tree includes unmanaged baseline libs used during workstation builds.  My overall goal is to use Maven to manage dependencies for both Jenkins and workstation builds.  I may not commit to Maven driving the builds but managing dependencies is a big help.

Next I waned to test whether I could successfully get Eclipse/Maven/Artifactory to work nicely together.  I had tried to get Eclipse/Maven working together in the past but had poor success (involved Subversion as well).  In this instance I started simpler by creating an Eclipse dynamic web project which was not under source control.  I converted it to a Maven project.  I also installed Maven 3.0.5 on my laptop and configured the Eclipse/Maven integration to use it.  I modified the settings.xml file to only use our remote Artifactory instance.  After a number of attempts with mixed results I was finally able to determine that dependencies I added were resolved from Artifactory.  My only complaint with the Maven integration is that I could never get the Artifactory repo instance to expand and list the contents like it would for the Maven Central repo.  This caused me to believe it was not working for several hours but when I cleared my local repo and configured Eclipse/Maven to cache/index stuff at startup it did pull in the dependencies I had added.  I lost a few hours of life I won't reclaim because of that issue.  If we were not using a secured Artifactory instance, I have a feeling it would have been much more straight forward.  There was not a lot of nice clear documentation or user blogs with pertinent information with regard to using a password project installation combined with Eclipse/Maven.  In the end, it appears to work for shell of a project.


So far, I really like Artifactory.  It is very easy to setup and pretty easy to use and has reasonable features in the open source release.  It may bug me later that a number of features are sort of visible but unusable unless you pay.  I'm not much for having carrots dangled all over the place.


Next I will be trying to get it working with an existing project in Subversion. Will update this with those results once  get around to trying it.