Stephen Nimmo

17Aug/100

Tuesday Running Workout

Ordered all my training stuff last night for the half. 2XU Compression Calf sleeves. Headsweats visor. 3 new pair of Balega socks. Got a new nike dry-fit shirt from Academy. I LOVE Nike's dry fit stuff, both their regular dry fit t-shirts or their golf shirts.

Playing 9 at Tour 18 this evening.

Good run today. Next Run: Thursday at 6:30a.

Filed under: Code No Comments
15Aug/100

I have not been running…and I can tell.

So last Sunday's run was canceled due to festivities at my house the night before. Unfortunately, prior to those festivities I was trying to move a trash can and the handle broke. Five stitches in my left hand between my thumb and forefinger. So no golf and no running for at least a couple of days to make sure nothing got infected.

3 days turned into 7.

So what's the problem? Little excuses turn into big, run-canceling excuses. I have a 13.1 mile race in 12 weeks in San Antonio. San Antonio and Houston have many differences but only a single one will be on my mind that day - Hills. These little excuses have to go. This can't be about training anymore, but rather a lifestyle change. If there is something that is going to interfere with my running schedule, it stops today. I know what to look for. I know what I need to do. It's not a matter of whether or not I can physically do it. It's a matter of whether I can focus and sacrifice for the goal.

Today, I sacrificed. After a week off, I got up two hours later on a Sunday and went for a run at 8:30a. I was overheated and couldn't keep my heart rate down. Where I can normally maintain a 160 for at least 3 or 4 miles, I was at 170 before I knew it and it killed my run, both on pace and distance. My de facto running coach said that your HR is a tell-tale sign of how your body is sustaining itself during the run. A high rate rate is the first sign that your body is saying it's tired. When I got to the end my heart rate was 183 and I could barely walk. It's been 45 minutes since with a 20 minute freezing cold shower and I am still sweating. Granted, I did play golf during the heat of the day yesterday and sweated a few gallons of water but that shouldn't affect me this hard. Needless to say, I have a bit of work ahead of me.

Next Run: Tuesday at 6:30. Running Workout, 3 miles and 3 sets.

Filed under: Code No Comments
5Aug/100

Finally back to it

After getting sick this back weekend, I really just felt drained all week and couldn't get myself out of bed. This led to being over-rested on Tuesday night and then I couldn't sleep, so I ended up on Weds morning with 2 hours of sleep and a major lazy streak starting. This morning, although I felt like I still needed to catch some more sleep, I rolled myself out of bed and ran anyway. I really didn't want to - but I needed to.

After speaking with my de-facto running coach and project manager, Ryan, about running more slow miles, I ran tried to run this morning at about a 10/mile clip, rather than the usual 9-9:15. Made a difference in HR throughout the first 3/4, but it showed me that regardless of how fast, my HR still crept up to the 170 mark toward the end, which according to Ryan, is the true signal that your body is tired and cannot keep up.

So on the menu for the next few weeks is - lots of slow, relaxed miles. Next Run: Sunday. 6 miles at 10.

Filed under: Personal, Running No Comments
1Aug/100

Shot a 90, Skipped My Sunday Run

When I woke up Friday morning, my throat was killing me which is usually the first sign I am getting sick. However, I had a tee time on Saturday morning at Hermann Park Golf Course. I took it easy on Friday, and went to sleep early hitting a preventative dose of Nyquil to see if I might head this one off at the pass. Saturday morning, I was sick but not sick enough to skip my tee time. I sure am glad I didn't. Shot the best round of golf in my life, not only breaking 100, but shooting 90. Back nine was nothing but pars and bogeys. I did have a couple of double bogeys on the front nine and a snowman at 2, which will be the next target of my golf - accuracy and a better inside-to-inside swing plane. Right now, I am still having some issues because my plane is very vertical, resulting in over the top shots with a strong fade.

By Saturday afternoon, I felt horribly and slept the rest of the afternoon and all night. Decided to skip my Sunday run to make sure I had a couple more days to recoup prior to hitting a strenuous workout again. Next run: Running workout on Tuesday morning, but this time I am running 4 miles and doing three sets.

Here's a picture of Art, Me and Todd on the 9th hole with downtown Houston in the background.

Filed under: Personal, Running No Comments
29Jul/100

Run for Thursday, July 29th 2010

I am going to start training for the Rock and Roll San Antonio Half Marathon when I return from Vegas (which is in 4 weeks WHOO HOOO). Vegas represents exactly what it should be - the last hurrah before ten weeks of sacrifice and commitment to a larger goal. Many times when training for longer races such as these, it's easy to get ahead of oneself, visualizing and focusing on the entire body of work leading up to the race. Thinking about 10 week of running 4 or 5 times a week can be daunting so instead, I have decided to try and focus myself into smaller, more manageable chunks. I was trying to come up with a way to focus on single runs while simultaneously tracking progress as well as providing some sort of accountability. My facebook friends got sick of my posts about running, so here I am.

Here's the Garmin stats from my run today. Pre-Vegas, I am trying to run 3 times a week - Tuesday, Thursday and once on the weekend on the day I am not playing golf. I need to build up my endurance and mileage to 8 miles and able to run a single 8:30 mile. I'm close but have some work to go over the next 4 weeks.

My next post should be on Sunday morning after I run 2 laps at Memorial Park.

Filed under: Personal, Running No Comments
6May/100

Fast Coherence Updates

Let's say we want to update a list located in a cache somewhere. Typically, this would be done like this.

List<String> names = new ArrayList<String>();
names.add("Bob");
NamedCache cache = CacheFactory.getCache("test");
cache.put("B", names);

List<String> names2 = (List<String>)cache.get("B");
names2.add("Bill");
cache.put("B", names2);

But what this does actually requires a complete serialization of the payload both from the (possibly) remote location and back to the backup node when the put is executed. Network traffic and IO no bueno.

Instead, extend the AbstractProcessor and ship that work out to the node, cutting network IO in half.

public class AddNameProcessor extends AbstractProcessor {

	private String name;

	public AddNameProcessor(String name) {
		this.name = name;
	}

	@SuppressWarnings("unchecked")
	public Object process(Entry entry) {
		List<String> list = null;
		if (entry.getValue() == null){
			list = new ArrayList<String>();
			list.add(name);
			entry.setValue(list);
			return list;
		} else {
			list = (List<String>)entry.getValue();
			list.add(name);
			entry.setValue(list);
			return list;
		}
	}

}

And call it in a similar way.

NamedCache cache = CacheFactory.getCache("test");
List<String> names = (List<String>) cache.invoke("B", new AddNameProcessor ("Bill"));
Tagged as: , No Comments
23Dec/094

Ubuntu 9.10 – Apache2 + Tomcat6

1) sudo apt-get install apache2 tomcat6 libapache2-mod-jk
2) sudo vim /etc/apache2/workers.properties
and type/past in:
# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009

3) sudo vim /etc/apache2/apache2.conf
and type/past in:
# Load mod_jk module
# Update this path to match your modules location
LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
# Declare the module for (remove this line on Apache 2.x)
#AddModule mod_jk.c
# Where to find workers.properties
# Update this path to match your conf directory location (put workers.properties next to httpd.conf)
JkWorkersFile /etc/apache2/workers.properties
# Where to put jk shared memory
# Update this path to match your local state directory or logs directory
JkShmFile /var/log/apache2/mod_jk.shm
# Where to put jk logs
# Update this path to match your logs directory location (put mod_jk.log next to access_log)
JkLogFile /var/log/apache2/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the timestamp log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

6) sudo vim /etc/apache2/sites-enabled/000-default
Delete "DocumentRoot /var/www"
And type in
JkMount / worker1
JkMount /* worker1
note, you can use JkUnMount to define directories you want apache to serve

7) Enable port 8009 on tomcat
sudo vim /etc/tomcat6/server.xml
remove the "" that is a line below

8) restart tomcat
sudo /etc/init.d/tomcat6 restart

9) restart apache
sudo /etc/init.d/apache2 restart

10) wget localhost
You should see the default tomcat page

Courtesy of: http://rcpeters.blogspot.com/2009/05/installing-apache2-and-tomcat6-on.html

3Nov/092

ActiveMQ Clustered and Bulletproof

It's easy to create a clustered instance of ActiveMQ and have your clients connect via multicast. This gives you the ability to create ActiveMQ instances all over the place, have them autodiscover each other and failover seamlessly and automatically. Here's the ActiveMQ configuration.


<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:amq="http://activemq.apache.org/schema/core"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  		http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
  		http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">

	<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />

	<broker xmlns="http://activemq.apache.org/schema/core" brokerName="MyBroker" dataDirectory="${activemq.base}/data">

		<destinations>
			<queue physicalName="MyQueue" />
		</destinations>

		<transportConnectors>
			<transportConnector name="openwire" uri="tcp://localhost:0" discoveryUri="multicast://default"/>
		</transportConnectors>

		<networkConnectors>
      		<networkConnector uri="multicast://default"/>
    	</networkConnectors>

	    <persistenceAdapter>
	      	<memoryPersistenceAdapter/>
	    </persistenceAdapter>

	</broker>

	<jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
        <connectors>
            <nioConnector port="8161"/>
        </connectors>

        <handlers>
            <webAppContext contextPath="/admin" resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
        </handlers>
    </jetty>

</beans>

And here is the Spring code for the client.


<bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
 		<property name="brokerURL">
 			<value>discovery:(multicast://default)</value>
 		</property>
 	</bean>

 	<bean id="destination" class="org.apache.activemq.command.ActiveMQQueue">
 		<constructor-arg index="0">
 			<value>MyQueue</value>
 		</constructor-arg>
 	</bean>

 	<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
 		<property name="connectionFactory">
 			<bean class="org.springframework.jms.connection.SingleConnectionFactory">
 				<property name="targetConnectionFactory" ref="jmsConnectionFactory" />
 			</bean>
 		</property>
 	</bean>

If you will notice, the ActiveMQ client uses the discovery mechanisms for finding the queue, which allows it to connect to any piece of hardware without actually having to know physical locations. You can replace your multicast://default (which happens to be multicast://239.255.2.3:6155) with whatever multicast address you would like. You could even DNS-it-up and have a url look like multicast://MyBroker.mydomain.com:6166.

Enjoy.

http://activemq.apache.org/multicast-transport-reference.html

Tagged as: 2 Comments
8Apr/090

Maven and the Enterprise

Sounds like a band from the 70's, huh? Here's a quick picture for part of a presentation I am putting together for my colleagues.

maven-enterprise

Here's a basic drawing describing a minimum development environment for any company. The "servers" can be consolidated to a certain point, especially if you are using virtualization software.

Also, the source control, continuous integration and maven repository manager can realistically all run on a single server. You MIGHT be able to get away with running the actual builds on the box but might run into some performance issues, particularly if you are running a big build and simultaneously checking in a bunch of source code.

26Mar/090

Requirements Documents are the suck.

http://www.scottberkun.com/blog/2009/why-requirements-stink/

Filed under: Code No Comments