Tuesday, December 22, 2015

Execution is difficult

A few years ago I was given an opportunity to attend The Open Group Architecture Framework (TOGAF) 9.1 training.  The training was an experience that was very much appreciated.  In learning about TOGAF I researched other Enterprise Architecture (EA) frameworks, such as the Zachman Framework for Enterprise Architectures, the Federal Enterprise Architecture (FEA), and Gartner (formerly, the Meta Framework).  In the end of the day the question was around how does one execute on this within a company.  The straightforward answer is that it not that simple.  It requires support, adoption, and a value proposition.

Support from the leadership to see the value in executing an EA practice.  One needs to show the value to drive the support.  Without the value proposition the EA practice is going to have an uphill battle.  In some establishments this value proposition has already been established, otherwise EA wouldn't be around.  In some cases one is starting from the ground up.  In the case where the EA practice is new, the value proposition needs to start with small wins.  Start small then expand.

Adoption needs to come from teammates within the establishment.  This is where communication is critical to help teammates see the value proposition as well.  Without the buy-in to move in the direction and build momentum the EA practice will struggle.

Value Proposition as previously indicated is critical to help secure the support and adoption.  The problem that is being addressed needs to be clear.  For an EA practice the problem is managing the increasing complexity of IT systems. The second problem is delivering real business value with those systems.  The desire is to foster/champion strategy to execution.

The end result is that any undertaking regardless if it is an EA practice, new process, cultural change, new product launch, or anything new to an establishment is the need for support from leadership, the adoption from teammates, and a sound value proposition is needed ensure successful execution.  So start with a problem then work your way from there.  Once the problem is identified, then the establishment will see the value in what is trying to be addressed and drive towards the execution together.  The establishment needs to see and understand the problem that is trying to be solved, then execution can happen.

Thursday, February 12, 2015

Research on advice and when to give it.

Advice and when to give it. I felt compelled to research advice and when to give it. I remember my reading and truly believe in this in my heart from the book, The 7 Habits of Highly Effective People: “Seek first to understand, then to be understood.”, by Stephen Covey. This was a life changing book for me. It was interesting the articles I found, some very zen and some quite rude. I thought I'd share my findings: - http://tinybuddha.com/blog/10-tips-advise-wisely-how-to-give-advice-that-actually-helps/ - http://www.huffingtonpost.com/lauren-cahn/surprisingly-valuable-adv_b_6061798.html - http://www.wikihow.com/Give-People-Advice - http://www.inc.com/harvey-mackay/how-and-when-to-give-advice.html One of the common theme "Advise with permission", Advise not advice. Advise is something that is given. Where advice is a noun. In my opinion, someone needs to walk in someone shoes, spend the time to listen, truly listen before sharing such wisdom. If one values the individual it is their charge and responsiblity, seek understanding before being understood. It was rather interesting to read about peoples views on advise. I think I've learned something in this process.

Wednesday, December 14, 2011

Tuesday, May 3, 2011

Monday, December 27, 2010

Healthy Software Development Questions

Found the two links in this Slashdot RSS feed rather interesting.

Article found HERE.

Wednesday, August 25, 2010

Enterprise Architect

Nice article about the role of an Enterprise Technical Architect.

Link

Wednesday, March 31, 2010

{"Could not load file or assembly 'System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its depende

Problem:

{"Could not load file or assembly 'System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.":"System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"}

Discovery:

Noticed that it wasn't installed in the GAC (AKA - C:\WINDOWS\assembly)

Only had System.EnterpriseServices 1.0.5.00 installed. GASP!


FIX: (Wahoo!)

First Attempt: I just tried to copy it over into the assembly with explorer, it failed.

From the Console run this: (Path may vary depending on your system.)

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil" /i C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll


Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.21022.8
Copyright (c) Microsoft Corporation. All rights reserved.

Assembly successfully added to the cache

No Thanks Required

Just send Money! HAHAHA, Just kidding let me know if it helped you by commenting.

Monday, March 29, 2010

WCF Throttling

http://www.danrigsby.com/blog/index.php/2008/02/20/how-to-throttle-a-wcf-service-help-prevent-dos-attacks-and-maintain-wcf-scalability/

http://kennyw.com/indigo/178

Monday, May 18, 2009

Great Movie - Crash (2004)

LINK http://www.imdb.com/title/tt0375679/

Wednesday, March 25, 2009

Random Notes on JBOSS Cache

JBOSS Cache Notes:

http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/4.3.0.cp04/html/Tree_Cache_Guide/index.html

http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/4.3.0.cp04/pdf/Cache_Frequently_Asked_Questions/JBoss_Cache_Frequently_Asked_Questions_CP04.pdf

TreeCache Example:
TreeCache tree = new TreeCache();
tree.setClusterName("demo-cluster");
tree.setClusterProperties("default.xml"); // uses defaults if not provided
tree.setCacheMode(TreeCache.REPL_SYNC);
tree.createService(); // not necessary, but is same as MBean lifecycle
tree.startService(); // kick start tree cache
tree.put("/a/b/c", "name", "Ben");
tree.put("/a/b/c/d", "uid", new Integer(322649));
Integer tmp = (Integer) tree.get("/a/b/c/d", "uid");
tree.remove("/a/b");
tree.stopService();
tree.destroyService(); // not necessary, but is same as MBean lifecycle


TreeCache requires that all keys and node be Serializable. Where this is not a requirement with a PojoCache.

PojoCache extends the functionality of the TreeCache.

JBOSS Cache Websites:
- http://www.jboss.org/jbosscache/
- http://www.jboss.org/wiki/Wiki.jsp?page=CVSRepository

JBoss Cache Version Check:
- java -jar jboss-cache.jar org.jboss.cache.Version

JBoos cache uses JGroups under the covers.

JBossCache has five different cache modes,
- LOCAL - single instance, it will not attempt to replicate anything.
- REPL_SYNC - replicate synchronous between the different cache instances.
- REPL_AYSNC - asynchronous replication betweencache instances.

In the event of a network crash REPL_SYNC will return an error, where REPL_ASYNC will continue to work (However the cache will be out of sync.)
Asynchronous replication is faster (no caller blocking)

ClusterConfig is the attribute where the cluster name is defined. Once a server joins the cluster every change is replicated.

Buddy Replication allows each node to pick one or more 'buddies' in the cluster and only replicate to its buddies. (As of, JBoss Cache 1.4.0)

JBoss Cache is Thread safe.

JBoss Cache allows for presistance and passivation/overflow to a data store.
- Cache Passivation is the process of removing an object from in-memory cache and writing it to a secondary data store (e.g., file system, database) on eviction.


IsolationLevel controls the cache locking.
- NONE
- READ_UNCOMMITTED
- READ_COMMITTED
- REPEATABLE_READ
- SERIALIZABLE

JBoss TreeCache allows for event notification pre and post.

POJOCache uses twice as much memory. Not a good option if running a local cache or not persisting.


Concurrent Access:
JBoss Cache uses a pessimistic locking scheme by default to prevent concurrent access to the same data. Optimistic locking may alternatively be used.


example of how to use JBoss Cache in a standalone (i.e. outside an application server) fashion with dummy transactions:
Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.cache.transaction.DummyContextFactory");
User Transaction tx=(UserTransaction)new InitialContext(prop).lookup("UserTransaction");
TreeCache tree = new TreeCache();
PropertyConfigurator config = new PropertyConfigurator();
config.configure(tree, "META-INF/replSync-service.xml");
tree.createService(); // not necessary
tree.startService(); // kick start tree cache

try {
tx.begin();
tree.put("/classes/cs-101", "description", "the basics");
tree.put("/classes/cs-101", "teacher", "Ben");
tx.commit();
}
catch(Throwable ex) {
try { tx.rollback(); } catch(Throwable t) {}
}



Eviction Policies:
- TreeCache
- org.jboss.cache.eviction.LFUPolicy - Least Frequently Used removed
- org.jboss.cache.eviction.FIFOPolicy - First in First out removed
- org.jboss.cache.eviction.MRUPolicy - Most recently used removed (Why would anyone use this?)
- POJOCache
- org.jboss.cache.aop.eviction.AopLRUPolicy
- ...

Eviction policies can be global or per region.

OOM (OutOfMemoryException) this can be adjusted by modifying the EvictionPolicyConfig attributes.
- wakeUpIntervalInSeconds
- timeToLiveInSeconds
- maxNodes
- region



CacheLoaders are available to store and retrieve data.
- Used to preload a cache.
- Custom CacheLoaders are created by implementing the org.jboss.cache.loader.CacheLoader class.
- There are a few predefined classloaders




JBoss Cache is managed and monitored through the jconsole.

Thursday, March 27, 2008

Callable Future - Some code! It's what I do for a living.

package mytest;
import java.util.Random;
import java.util.Vector;
import java.util.concurrent.Callable;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledThreadPoolExecutor;

public class CallableTest implements Callable {
private String myName = "Unknown";
private Random rand = new Random();
public CallableTest(String name) {
// Wahoo I was given a birth name.
myName = name;
}
public String call() throws Exception {
for(int i = 0; i < 100; i++) {
System.out.println("CallableTest - Name [" + myName + "] Count [" + i + "]");
// Lets snooze the thread for a bit so they get out of sequence.
int value = rand.nextInt(101);
/* Execute Brittany Spears Exception when the value is 42 (The answer to all questions)
if(value == 42) {
String oops = "Ooops I did it again!";
System.out.println(oops);
throw new Exception(oops);
}
*/
Thread.sleep(value * 10);
}
return myName;
}
public String getName() {
return myName;
}
public static void main(String[] args) {
int total = 5;
ExecutorService executor = new ScheduledThreadPoolExecutor(total);
Future[] futures = new Future[total];
for(int i = 0; i < total; i++) {
futures[i] = executor.submit(new CallableTest("Test [" + i + "]"));
}
/*
// Bah, we really didn't want to execute these threads. So lets see what
// happens below.
try {
for(int i = 0; i < total; i++) {
boolean flag = futures[i].cancel(true);
if(flag) {
System.out.println("Cancelled");
}
}
} catch (Exception e) {
System.out.println("Exception caught [" + e + "]");
}
*/
/*
// Even though we have multiple threads this logic lines the threads
// back up in the order of execution (submitting).
try {
for(int i = 0; i < total; i++) {
String name = futures[i].get();
System.out.println("Thread Complete [" + name + "]");
}
} catch (ExecutionException e) {
System.out.println("ExecutionException caught [" + e + "]");
} catch (CancellationException e) {
System.out.println("CancellationException caught [" + e + "]");
} catch (Exception e) {
System.out.println("Exception caught [" + e + "]");
}
*/
// Lets try to find the first completed thread.
try{
// Need to create a bucket mechanism so we know which thread completed.
// As a thread completes we empty the bucket. When the bucket is empty
// everything is done.
Vector bucketOhThreads = new Vector();
for(int i = 0; i < total; i++) {
bucketOhThreads.add(futures[i]);
}
while(bucketOhThreads.size() > 0) {
for(int i = 0; i < bucketOhThreads.size(); i++) {
try {
if (((Future)bucketOhThreads.elementAt(i)).isCancelled() ) {
System.out.println("Thread Cancelled - ThreadCount[" + (bucketOhThreads.size() - 1) + "]");
bucketOhThreads.removeElementAt(i);
}
else if (((Future)bucketOhThreads.elementAt(i)).isDone() ) {
Future future = (Future)bucketOhThreads.elementAt(i);
// Doing the above it loses track that the Future objects were
// returning a String. So we have to type cast.
String name = (String)future.get();
System.out.println("Thread Complete - Name[" + name + "] ThreadCount[" + (bucketOhThreads.size() - 1) + "]");
bucketOhThreads.removeElementAt(i);
}
} catch (ExecutionException e) {
System.out.println("ExecutionException caught - [" + e + "] ThreadCount[" + (bucketOhThreads.size() - 1) + "]");
bucketOhThreads.removeElementAt(i);
} catch (CancellationException e) {
System.out.println("CancellationException caught - [" + e + "]. We are checking the isCancelled property. We should NEVER receive this exception here.");
bucketOhThreads.removeElementAt(i);
}
}
// This is were other work should happen. We really shouldn't have
// this thread waiting around for the other threads to execute.
// We really don't want to spin in a tight loop do we, so let's sleep
// for a bit. ;)
Thread.sleep(100);
}
} catch (Exception e) {
System.out.println("Exception caught [" + e + "]");
}
}
}

/*
* ITEMS Not really messed with:
* - ScheduledThreadPoolExecutor
* - Future.get(timeout)
* - I want to know how we get the name (or any data for that matter) from
* the Thread object as well. Right now we have to wait for the thread
* to complete or generate and exception. (lol, I guess that's enough
* info.)
*/

Friday, September 7, 2007

Ok Nerd Moment, Close your eyes if your scared.

Here is a good link describing WebServices within JBOSS. Even shows a VB.NET example.

http://203.2.177.22/tutorial/html/chap9.html