Last week we had a bottle neck on our application and it took us several days to find it. So, here is what you should not do. The architecture is as followed : 2 Alteons to spread the load 2 reverse proxy a layer of Firewalls 2 HTTP compressors 4 web server iPlanet (Sun Java Web Server 6.0) a cluster of 40 Weblogic server running on 4 different boxes a database server. Everything running on HP-Ux11. iPlanet only dispatch static pages and images and Weblogic has the presentation (JSP/Servlet) and EJB layers (it does 99% of the work). The problem was that a lot of connections were falling on time out. We kept on focusing on weblogic and controlling the thread and memory activity to see if we had any dead lock of memory leek (there are some JNI calls somewhere). Weblogic wasn‘t doing anything, not under stressed at all. The application was configured to run 2000 concurent users that‘s why each instance of weblogic was running 60 threads (60 threads * 40 instance = 2400). After some days of analysing and twisting weblogic, we remembered that we had a layer of iPlanets on the front. The admin guys were sure that there was no problem with iPlanet because each server was supposed to run 512 threads. It wasn‘t the case. Each instance was configured with 128 thread (128*4 instance = 512). That was why weblogic was doing nothing and […]
Part of my company‘s job is to create tailored software for clients. They manage to deliver 5–6 a year and producing each one takes between 200–500 days. For the last 2 years they have developed around 80% using the .Net platform and the remaining 20% using Java. Last year I worked for 1 month with a .Net team trying to re-architect their software, but I gave up. Those guys didn‘t know what a Singleton was, nor a framework, nor even a package ! And because I didn‘t know anything about .Net (and still don‘t) I moved to do other things. The other day I was talking to one of the commercial guys and I asked him why my company wasn‘t putting any effort in trying to do more Java. The answer was quick and precise: “We realized that .Net software is 40% cheaper than Java“ (understand faster to develop for the same price). I was about to argue, bring the technical side, the big mistakes that I spotted during my little experience with .Net, talk about the Java community, the open source framework, the well designed architecture I‘ve worked with and so on. When I realized that he was a commercial guy, wearing a suit and a tie, I had the divine inspiration that made me reply: “God created the universe, the planet and Man in just 7 days. And you can see the mess. Imagine if he had 40% […]
Sometimes, your job is really boring. And I’m not talking about a couple of hours or a day, I’m taking about weeks and even months of boredom. This can be due to several reasons: the project is delayed, the client has not really made up his mind, the budget has not been approved yet, the compliance team is still checking that the JDK 1.3 can be installed, let’s prototype all the MVC frameworks first… But the most common reason is political issues: everybody is waiting for a decision maker to do his job, take a decision. In the meantime, what can you do: Change the situation: the first thing to do is to try to change the situation. Make things go faster, talk to the right people, send emails explaining how this situation could be improved… In one word, be constructive. Most of the time, this is completely utopist because you don’t have the power to make things move on. Shorten your days: if you can, shorten your painful days. Arrive at 10:30am at the office, have a nice long lunch with your bored colleagues and leave at 4:30pm. Cut the morning and the afternoon with coffee breaks. Work on something interesting: there is nothing better than feeling useful, so, work on something you like: your own project or be part of an open source one (plenty to do on sourceforge). To make things easier, buy a portable hard drive […]
J2EE has nothing new happening ! J2EE is a back-end language ! JCP is too heavy ! Java language is not open sourced ! Ruby on Rails is the next thing ! JRuby looks interesting ! Java is dead ! .Net is easier to develop than Java ! Ruby is more flexible than Java ! J2EE is too complicated when you want to do web development ! And what about PHP ? This is what we can read here and there in blogs, articles, web sites. I have to admit, I’m starting to get confused too. I arrived at the early stages of Java, coming from C and C++, and I thought that was great. When J2EE arrived I was the first one to say “this is cool, developers will have to focus on business requirements rather that wasting time with technical issues that will be held by the server”… and so on and so forth. Unfortunately, J2EE has become so complex that developpers have to read tones of specs and design patterns before developping a simple web app. And what about Ruby, and what about Rails, and what about COBOL ! Maybe like me you have coffee breaks, and maybe like me you work in big companies who have developped their system 30 years ago in Cobol. These companies have started to move to, so called, new technologies. But of course, there are still millions of lines of code […]
In this blog I explain how I’ve migrated from Struts Tiles to SiteMesh in a AppFuse 1.5 project. I wanted to do that because I was fedup of dealing with Tiles aliases and also because I’ve used SiteMesh in other projects and it’s really easy to use. Metadata filter-mappings.xml In %ROOT%metadatawebfilter-mappings.xml add the folowing <filter-mapping> <filter-name>sitemesh</filter-name> <url-pattern>/*</url-pattern> <!-- These are needed by Tomcat 5 for forwards --> <!--dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher--> </filter-mapping> filters.xml And in the filters.xml file add. <filter> <filter-name>sitemesh</filter-name> <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class> </filter> struts-actions.xml Change all the actions parameter from Tiles to path to JSP pages. For example, change from <action path="/login" type="org.apache.struts.actions.ForwardAction" parameter=".login"/> to <action path="/login" type="org.apache.struts.actions.ForwardAction" parameter="/WEB-INF/pages/login.jsp"/> struts-plugins.xml In the %ROOT%metadatawebstruts-plugins.xml delete the reference to Tiles plugin <plug-in className="org.apache.struts.tiles.TilesPlugin" > <set-property property="definitions-config" value="/WEB-INF/tiles-config.xml" /> <set-property property="moduleAware" value="true" /> <set-property property="definitions-parser-validate" value="true" /> </plug-in> Action source code The most painful job is to change all your xDoclet tags so that actions forward to a page and not a tile. So you have to change all action classes that are in %ROOT%srcwebmyappwebappaction for example, refering to your tiles-config.xml, change @struts.action-forward name="architectures" path=".architectures" to @struts.action-forward name="architectures" path="/WEB-INF/pages/architectures.jsp" The other problem that you may find is if you have used tiles.Controller. If yes, just change them to struts actions. JSPs First, change your %ROOT%webcommontaglibs.jsp file. Delete <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %> and add <%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator"%> <%@ taglib uri="http://www.opensymphony.com/sitemesh/page" prefix="page"%> Layout to decorator You have to copy and rename the Tiles layout from […]
I’ve just downloaded Skype 2.0 beta with video. It’s fantastic. I’ve got half of my family in Portugal and half in Australia, so I am a big Skype and Skype Out user. The problem was the video. I had to use Yahoo Msg as well as Skype. But now, with the version 2.0, the video works pretty well I have to say. I was quite impressed. You can even have a full screen image of your friend, while speaking normaly. And it’s just a beta version… I can’t wait to have the final version.