domingo, 13 de marzo de 2011

Add t1.micro support to ElasticFox


A lot of people, including me depend on the ElasticFox firefox plugin to interact with Amazon Web Services and its easy to see why. It has GUI support for almost everything that you'd need to interact with AWS.
However, it seems that, as of today, ElasticFox has yet to add support for the t1.micro instances that Amazon introduced recently.

Well, I just couldn't stand waiting for the latest release, and if you're just as impatient, you might want to try the following:

  1. Check out the elasticfox code from svn:
    svn co https://elasticfox.svn.sourceforge.net/svnroot/elasticfox/trunk elasticfox
  2. Open up
    trunk\src\chrome\content\ec2ui\newinstancesdialog.js
    in your favorite editor. Go to line 247 and add the following:
    if (this.image.rootDeviceType == "ebs") {
    typeMenu.appendItem("t1.micro", "t1.micro");
    }
Now, its time to build the code into a plugin.
Download and install the firefox extension developer plugin
Open Firefox. Go to Tools->Extension Developer->Extension Builder, browse for your working directory and hit 'Build extension'.
You can then drag this resulting .xpi file into the browser window to install the plugin

You should now be able to select a t1.micro instance for a corresponding valid AMI

lunes, 14 de diciembre de 2009

Memorizing Design Patterns - the fun way

Just stumbled upon a wonderful way to memorize stuff at memorize.com

Say you want to test yourself or just plain want to memorize Design Patterns for example, just head over here and discover how fun it can be.

Design Patterns
Core JEE Design Patterns

I must admit, this is a really unique way of using a wiki!


*I am in no way affiliated with memorize.com. I just happen to like their stuff

martes, 21 de abril de 2009

Damn Small Linux: Install files with .dsl extension

The DamnSmallLinux live CD/USB allows you run DSL in memory. It also allows you to run apps that you download from the MyDSL repository. If you install DSL to HDD/USB then you'll want to have these apps permanently on your system. You can do this easily.
If you look carefully, the MyDSL repository, contains a lot of files (apps) with the .dsl extension.


A .dsl extension file is nothing but a compressed archive in the tar-gzip format.


All you need to do is:
  1. download the .dsl file to any location (lets say /home/dsl)
  2. cd /
  3. tar -zxvf /home/dsl/.dsl
and you're through!

martes, 17 de febrero de 2009

BPEL: Get clobbered with the Golden Hammer

Somewhere in the lobby after an IBM/Oracle seminar showing off their shinny and latest BPEL products 

Brainwashed customer: I just met with IBM and Oracle and I'm convinced that I need their BPEL engines since we are going down the SOA road. After all, what am I going to do with my business services?  
BPEL Zen Master (to herself): Ah. I see I have to do more penance on this earth by suffering these zombies. Looks like they dont know that SOA is dead
BPEL Zen Master : I agree you need to model and monitor your business processes and also automate some 'processes' that you have. How did they convince you that you need BPEL to do this? 

Brainwashed customer: They told me that with BPEL my business activities can be modelled and hence I will have control and I can monitor them and I can tweak them and .... 
BPEL Zen Master: Ahem! Have you tried modelling your process in a tool that supports BPMN? Have you tried the same with a tool that does it in BPEL. 
Pssst... You will find that the big vendors are using the 'golden hammer'. 
You must know that you cannot model your Business Process completely in BPEL as you can do in BPMN.
Contrary to what a vendor might tell you, a business analyst just CANT manage (draw, manage, round-trip) a business process as a BPEL today. Anyway, once you model your processes in the vendors modeller, round-tripping that back is virtually impossible. Besides, BPEL is all very technical...Would your like your Business Analyst to know what a SOAP fault is? 

Brainwashed customer: SOAP what?!... Nevermind..But...I can orchestrate my stateless "processes" easily! 
BPEL Zen Master: Vendors have been fooling customers into using microflows (an IBM innovation... verbiage-wise) which are nothing but stateless 'programs' that invoke (orchestrate) webservices. You're better off using a mediation module (Take that, IBM.. you can stick your  microflows where the sun dont shine). Speaking about Oracle, there's really not much to speak of. After acquiring BEA, they seemed to have dumped their BPEL engine in favor of BEA's. Actually, from a quick look at their conFUSION Middleware stack, they dont know their butt from their heads. Buttheads! For the rest of us, a simple composite business service will do. Not only will you yourself save mucho $$$ by not buying the BPEL engine, but also CPU, storage space, administrator time and most importantly user frustration.

Brainwashed customer: But I will be backed by standards if I go with BPEL, wont I? What about long running processes with human interaction? Is'nt BPEL the best for this? I'm solid with the support on standards aren't I?
BPEL Zen Master: Oh yes! A million of them, non which make sense to any business analyst anyway. And here something to thing about: Any decent business process will probably require some human interation. 
Well Long running with Human Interaction... Hmm dont let the BPEL vendors fool you on this one. The moment you get human interaction as part of your BPEL, you'd have to use their extensions to BPEL (which are completely proprietary). 
That flushing sound you are now hearing is the standards going down the toilet.

In case your still wondering about which way to go, this should enlighten you

I will reproduce it here for your convenience.

Hermann Schmidt:
BPEL is advertized as a high-level process design language. That's a lie. BPEL exposes the designer to lowest-level issues like communication failures, SOAP faults, and XML unmarshalling problems. Drawing a BPEL process naively will not produce any usable artifact. It is a programmers job. Picking up the recent discussion about "BPMN is not software engineering", I think it is fair to say that BPEL is one reason why BPMN still is software engineering.

I have seen tutorials from SUN that show how to access rows in a database table with BPEL. What a brilliant idea. Let business people drag their data from databases directly! That about says it all how some vendors treat BPEL. It's just yet another programming language with a fancy graphical interface. "Hey, look what I can do with BPEL! Isn't that neat?". Hello? Service orientation?

BPEL has no modularity. BPEL has no concept of reusable patterns or code fragments (besides functional decomposition into yet more processes - did someone say high-level?). Reusing patterns in BPEL means cut&paste of sourcecode. No signs of object orientation anywhere. It is a low-level web-service caller with a functional decomposition design model and a little event dispatching with parallel execution. Oh, and you can shuffle data around in XML-based structures.

The ubiquitous GUIs give the illusion of a high abstraction. Ironically, they are necessary because BPEL code is a pain to write as text. The graphics are merely the syntactical representation of a very basic programming language.

Vendors pimp up BPEL engines with additional features to alleviate weaknesses of the language. This may even result in practically usable products, if done well. However, that makes BPEL non-portable in all but trivial cases and renders the whole standard useless.

I am deeply frustrated by the level of intelligence in this standard. I believe that it will not take the software industry any closer to more efficiency or excellence. 

I don't need it. It doesn't get the job done.

Brainwashed customer: Master, that was enlightening. During my meditation my mind drifted to a scene from the movie 'The Matrix' and then... then it hit me 

miércoles, 20 de agosto de 2008

Improve windows networking (especially if hosting webservers)


First of all, I forgive you for having to use windows to host your web server :)

Now that thats out of the way, here's how you speed up networking performance on windows (especially if you happen to host Apache, IBM HTTP Server, or any other web server on a windows machine)

Create a .reg file (eg: perf.reg) with the contents that follow:


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"MaxUserPort"=dword:00008000
"TcpTimedWaitDelay"=dword:0000001e
"TcpMaxDataRetransmissions"=dword:00000005

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces]
"TcpAckFrequency"=dword:00000001
"TcpDelAckTicks"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFD\Parameters]
"EnableDynamicBacklog"=dword:00000001
"MinimumDynamicBacklog"=dword:00000020
"MaximumDynamicBacklog"=dword:00001000
"DynamicBacklogGrowthDelta"=dword:00000010
"KeepAliveInterval"=dword:00000001

Double click on the file to merge its contents into the registry. Restart the machine.
You're done.


viernes, 13 de junio de 2008

WebSphere Portal Server migration Issues - Part I

You've got WebSphere Portal Server 6.x comfortably hooked up to Oracle / Oracle RAC and then someone wants you to move to another Oracle installation (on a different machine possibly).

IBM has told you that all you need to do is export your database and import it into the other installation.


You're confident. You try it. You do a full=y export and do a full=y import into the new database, change your datasources to point to the new oracle instances, check all the connections and everything is fine.... start your server .... and BOOM!



Part I - tells you about this stack trace that you receive:

Unable to locate default library category Error while calling a function retrieveItemsByCMId of PLS data manager.
Unable to locate webContent library category Error while calling a function retrieveItemsByCMId of PLS data manager.
javax.jcr.RepositoryException: Error while calling a function retrieveItemsByCMId of PLS data manager.

What do you do Jack? Don't raise a PMR for one. The answer is simple for this one.
You're DBA has forgotten to check the tablespaces that were involved with the Oracle Instance for the Portal.

You'd need to tell the DBA (should you be so unlucky to have one who couldn't figure this out) to create the following tablespaces BEFORE the import.:


# These are for Oracle RAC. For plain, standalone Oracle, you'd specify the datafile location after the 'datafile' keyword

create tablespace ICMLFQ32 datafile size 300M autoextend on
next 10M maxsize UNLIMITED extent management local autoallocate;


create tablespace ICMLNF32 datafile size 25M autoextend on
next 10M maxsize UNLIMITED extent management local autoallocate;


create tablespace ICMVFQ04 datafile size 25M autoextend on
next 10M maxsize UNLIMITED extent management local autoallocate;


create tablespace ICMSFQ04 datafile size 150M autoextend on
next 10M maxsize UNLIMITED extent management local autoallocate;


create tablespace ICMLSNDX datafile size 10M autoextend on
next 10M maxsize UNLIMITED extent management local autoallocate;


Run the database import again and you'll be fine.


miércoles, 28 de mayo de 2008

WebSphere Process Server / Portal Server with Oracle RAC

If you're thinking that you'll get out-of-the-box Oracle RAC support for an IBM WebSphere Process Server or Portal Server installlation, you're sadly mistaken.

All the scripts that are generated by the installation process (for the oracle database) are for a standalone installation and will fail or make your DBA very angry if they are run on one of the RAC nodes!

Well, there's a way out, but you'd have to edit the scripts that these monstrous products generate.

For example:
You'll find a line like this in Portal server scripts:

create tablespace ICMLFQ32 datafile '/oracle/tb/ICMLFQ32_01.dbf' size 300M reuse autoextend on next 10M maxsize UNLIMITED extent management local autoallocate;

you'll have to change it to :

create tablespace ICMLFQ32 datafile size 300M autoextend on next 10M maxsize UNLIMITED extent management local autoallocate;

i.e. remove the location of the datafile specified.

There's another thing that you'd need to do if your using Oracle RAC as the datastore for WebSphere Process and WebSphere Portal Servers... change your JDBC string.

I got this tip from the an IBM developerworks article on Oracle RAC with Process Server

Change your datasource from:

jdbc:oracle:thin:@{hostname}:{port number}:{DBName}


to:
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST= myoraclehost1.ibm.com)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST= myoraclehost2.ibm.com)(PORT=1521))
(FAILOVER=on)(LOAD_BALANCE=on)
(CONNECT_DATA=(SERVER=DEDICATED)
(SERVICE_NAME=dbservice)))

I should be posting more gotchas with the IBM stack .... check the 'IBM' tags