vendredi juillet 10, 2009
|
Top reasons why GlassFish v3 is a lightweight server I have been involved in helping a couple of consultants put together a presentation on the future of app servers and one thing that struck me was that in the resulting slides, they equated lightweight appserver with the use of the Spring framework. Using Spring in WebSphere doesn't make any lighter. I don't think that deploying an archive with 90% being runtime qualifies as lightweight (hence the SpringSource tc and dm server offerings), but I also think that painting every application server as being monolithic and heavyweight is a gross caricature, so here are my top reasons why GlassFish *is* a lightweight application server.
#1 • Download size
#2 • Pay for what you use
#3 • Fast (re)deployment
#4 • Startup time
#5 • Memory consumption
#6 • Spring *and* OSGi
#7 • Open Source
But the real question is - is GlassFish v3 lightweight for you(r application)?
Random Java performance podcast comments I was recently listening to this JavaWorld podcast on Java scalability and was surprised to hear a few things (hopefully well paraphrased here) : • "Java is not the best choice given its threading model and synchronizing". I just don't understand that statement. Still Java 5's concurrency API is still under-used by many IMO. • "30 seconds GC pauses are common". Really? This sounds like 2000. Are you still seeing GC pauses above 10 seconds? There's now multiple GC algorithms to chose from and default options now provide really good performance in a large majority of setups. • "Real-time Java is around the corner and will fix many latency issues". Real-time java is really not the issue to most web site scalability or latency issues. Maybe the garbage-first GC scheduled for Java 7 will be an easier answer than the current required JVM tuning. • "ORM's are not needed, straight JDBC is better for scalability". I can't help but think that this can apply to only a handful of popular web sites. For everyone else, frameworks like JPA are just no-brainers. • "More generally speaking, frameworks are bad for performance and scalability". I think some stack-traces can be indeed intimidating. Frameworks should strike a good balance between productivity and out-of-the-box performance. Tuning expertise for a given framework is usually a function of the popularity of that framework while some popular frameworks are known to have scalability issues. • "Application servers are not a good idea because they mix business logic and web requests... a JVM should suffice". I am a strong believer in multi-tiered architectures and stateful applications so this sounds very wrong to me. The notion of a container is one of the most important break-through in recent years for productivity, transactions, persistence, and scalability. Clearly I don't buy or even really understand this assertion. Performance and scalability objectives can justify to de-normalize the architecture (much like you would for database schemas) but while this podcast has value, I don't believe most developers should follow every recommandation in this podcast right off the bat. ( janv. 19 2009, 06:08:23 PM CET ) Permalink Comments [4]La nature, le vide et les multi-coeurs En lisant le billet d'Olivier Rafal sur les Microsoft Tech Days (ou Sun est sponsor au passage), je me fais deux réflexions: Rencontré dans la salle des speakers (avec mon beau polo Java j'ai eu du succès ;), Didier Girard m'a indiqué que NHibernate et NSpring (sujet de sa conf. DNG la veille) ont des téléchargements à peine moins de 10 fois inférieurs à leur grands frères Hibernate et Spring. Première réflexion donc: y-a-t-il un tel manque dans la technologie existante (la nature a horreur du vide) pour justifier de tels volumes de téléchargement? En lisant que "A terme (...), .Net pourra générer du code (...) optimisé pour fonctionner sur du multi-CPU multi-coeurs", je me dis que l'arrivée de l'API de concurrence de Java 5 (2004!) n'était clairement pas trop anticipée et qu'il paraîtrait bien difficile aujourd'hui d'expliquer à un client qu'une application n'est pas capable de tirer partie de multi-coeurs parce qu'elle est écrite en Java (le fork/join de Doug Lea ou encore Scala promettant d'aller bien plus loin encore). Peut-être est-ce là l'avantage d'être à la fois constructeur et éditeur (nous on aime bien "fournisseur de système" ;-) ... Java est décidément un cancrelat innovant! ( févr. 12 2008, 10:57:33 PM CET ) Permalink Comments [3]Il y a quelques mois et peu de temps avant la sortie de GlassFish v2, je parlais de son record de performance devant les leaders Weblogic et WebSphere. C'est maintenant un nouveau résultat [1] à plus de 8400 JOPS soit près de 10 fois le résultat du précédent! En réalité c'est un benchmark en mode cluster qui permet de démontrer la scalabilité horizontale de GlassFish (6 noeuds, 18 instances) autant que sa scalabilité verticale était démontrée dans le résultat précédent (une seule instance sur 8 coeurs à 4 threads).
Ce qui est intéressant en particulier dans cette configuration en cluster, c'est:
Notre Monsieur Benchmark GlassFish (entre autres choses), Scott a une analyse détaillée des résultats. Bien évidement, dans tous les cas, seule la performance et la scalabilité avec votre application compte. Disons que c'est un peu comme la Formule 1, nous ne roulons pas dans ces voitures, mais nous bénéficions régulièrement des mêmes avancées technologiques.
SPEC and the benchmark name SPECjAppServer 2004 are registered trademarks of the Standard Performance Evaluation Corporation. Competitive benchmark results stated above reflect results published on www.spec.org as of 11/26/07. For the latest SPECjAppServer 2004 benchmark results, visit http://www.spec.org/.
Referenced scores:
If you're following at all GlassFish, you probably know that it has performance results above commercial vendors. Just one year ago, we had high hopes we would dramatically improve the performance of v2 over the v1 results. And we did. Performance is up by 60%! ( oct. 05 2007, 06:03:00 AM CEST ) PermalinkIs the GlassFish competition feeling pressure? It sounds like BEA has noticed that GlassFish v2 was released with excellent performance. Bill Roth's argument about Sun using JDK 6 is just funny. Apparently, we should be penalized by proactively supporting new releases of the JDK. It's hardly a deficiency on the GlassFish side if you ask me. The GlassFish vs. SJS Application Server argument is just as weak. First of all, as Scott Oaks explains it, SPEC submissions can only be done on commercial products. Second, GlassFish V2 and SJS Application Server 9.1 are technically one and the same thing. No performance difference to expect whatsoever.
So Bill, when will Weblogic support Java 6 (released almost a year ago)?
Oh, and marcf is also trying to dismiss GlassFish. Interesting how a fish can make people nervous. ( sept. 27 2007, 04:51:08 PM CEST ) Permalink Comments [6]Geronimo and GlassFish startup time compared Julien has a comparison of open source application servers in which has an interesting quote about Geronimo's startup time : "The startup is a bit slow: I suspect that the GBeans framework (IoC) flexibility price is some CPU time." The interesting part to me was Julien making a connection between startup performance and IoC. Trying for myself the Tomcat incarnation of Geronimo 2.0.1 (at 55MB, the download is the same as GlassFish v2 which comes with clustering, WSIT, and OpenESB), I obtained the following start-up time - On my machine, using Java 6, a Geronimo warm start is 43 seconds (cold start with Java 5 is 60sec). A good chunk of that time is taken by starting the EJB container. GlassFish v2 on the same machine starts in 10 seconds (stopping actually takes almost longer than starting!). To be fair, startup time was an important effort for GlassFish v2 resulting in not all services being started as part of those 10 seconds. So I also tried Little-G which also starts up in 10 seconds. Such identical figures don't make startup-time an argument in favor of having the stripped-down version. As a reminder, the demo of the preview of GlassFish v3 this year at JavaOne showed the HK2 kernel and the web container start in about a second. Now GlassFish v3 work is only starting, but I understand the goal is to improve startup time and to contradict Julien's thinking about flexible architectures ;). Modularity shouldn't come at price. ( sept. 07 2007, 07:00:00 PM CEST ) Permalink Comments [1]Il y a à peu près deux ans (déjà!), je présentais l'objectif de GlassFish. Nous voici maintenant à l'aube d'une version 2 intégrant un clustering complet et un pile web services performante, interopérable avec Microsoft .Net 3.0 (WCF) et conforme au WS-I BSP (Basic Secure Profile) 1.0. Bien sûr l'actualité c'est aussi le record de performance SPEC annoncé hier qui place GlassFish tout simplement devant BEA, Oracle et les autres, mais aussi cet autre résultat basé exclusivement sur une pile Open Source. En matière de serveur d'application Java, il n'y a désormais plus à choisir entre Open Source et fonctions d'entreprise. Coté contributions, au delà d'Oracle qui fournit l'implémentation de référence de JPA, Ericsson est le second acteur important contribuant à GlassFish dans le cadre du projet SailFin, serveur de communication SIP Open Source. Le nombre de contributeurs individuels est également en progression. Les plus méritants ont été récompensés en mai dernier. Le nombre de contributeurs "par emprunts" se porte bien lui aussi: JAX-WS dans Weblogic 10, Metro & JSF dans JBoss 5 pour ce citer que les plus significatifs. Enfin, coté déploiements, http://blogs.sun.com/stories recense une partie des mises en production de GlassFish. Inutile de parler du nombre de refus (polis) essuyés pour une référence en ligne. Enfin, plusieurs clients français participent au programme beta pour GlassFish 2 qui débute ces jours-ci et d'autres n'attendent qu'une version finale pour passer en production. ( juil. 11 2007, 07:18:00 AM CEST ) Permalink Comments [1]Maj. GlassFish - SPECjAppServer et Beta 3 dispo
GlassFish tips for demoers and others (avoid those restarts) One of the good things about having your environment change is that it makes you ask yourself the question of why you ended up with some habits. NetBeans 6.0 Milestone 9 not bundling Tomcat by default (but still supporting it) is one such example I think. On that note I'd invite you to read Geertjan's post on Oddly Shaped Bicycles. So the above thread got the discussion going about NetBeans experiences with people using GlassFish as part of their demos whether it is to demo Java EE 5 features, deploy and run OpenESB artifacts, run OpenPortal, an interoperable JAX-WS Web Service, or a JRuby on Rails application, a whole lot of people use GlassFish nowadays. Whether using Tomcat or GlassFish a seamless experience can be achieved with fast startups or incremental deployments. Startup time for GlassFish is not perfect (we're working on it) but very good for a full-blown application server. Luckily, incremental deployment is most often extremely fast and, if no restart is required which makes the life of demoers but also pretty much everyone else's so much more enjoyable (having an unplanned application server restart during a demo is never good). So here's a little list of do's and dont's when using GlassFish in demos (not your typical use-case but still...). If this looks too long, skip to the last bullet. &bull Use GlassFish v2. First of all if you're using GlassFish v1, this version was pretty much frozen more than a year ago. GlassFish v2 has much better startup time, better error handling, and less restarts (almost everything in the web container is now dynamic). GlassFish v2 is now in beta 2, so if you're using a NetBeans milestone, you really shouldn't be afraid to use a GlassFish beta! :) &bull Delete does not undeploy. One of the most annoying problem reported is application server restarts. With GlassFish v1, this clearly happens when there is a mismatch between you &bull Undeploy only works on existing projets. When using the web UI to undeploy non-existing applications, you get a (what could be a bit friendlier) error/exception. All it says it that it couldn't find the application (most likely a DPL5040). When using the GlassFish web UI, make sure you pay attention to the upper right corner which will tell you ("Restart Required") a restart is needed (and subsequent deployments from NetBeans will trigger a restart if you don't do it yourself before). &bull Hand cleaning. If you don't want to start the AS to clean older applications to then restart it, you can always be careful and remove the appropriate entries in &bull Clean, then restart. Always (re)start your application server before the demo only after any conflicts between &bull Clean or remove the log file. When Starting GlassFish from NetBeans, the log file of the application server is shown in the IDE. If it's big it'll take (what can seem) forever to 'cat' thru before actually showing the start-up sequence. You should probably delete the glassfish logfile ( &bull Restart from scratch? I've you want to be really extra safe, you can re-create the domain using:
&bull Backup/Restore! Probably a better alternative (one that could make most of the above obsolete) is to do domain backup/restore:
If you have reproducible use-cases of an annoying/unneeded application server restart with GlassFish v2, please report it (bug, or comment here).
GlassFish v3, dispo en "preview" Même si GlassFish v2 n'est pas encore terminé (prévu pour septembre), on parle déjà de GlassFish v3. Le principe même de l'open source permet de le faire sans compromettre des revenus de licence qui n'existent pas. Ceci permet d'avoir une retour de la part d'utilisateurs et de contributeurs potentiels le plus en amont possible du projet. GlassFish v3 est disponible en preview ici. Un seul binaire (.jar) pour toutes les plate-formes, seulement 14 Mo, et surtout une architecture modulaire pour exécuter des applications web (classique), du PHP (via Quercus), du JavaScript coté server (Phobos) ou encore des applications JRuby et le tout avec avec un démarrage en moins d'une seconde....
Plus d'info:
GlassFish v3 screencast follow-up and more
Jerome Dochez, GlassFish architect has a follow-up to the GlassFish v3 screencast.
In other GlassFish news as we're approaching the GlassFish Day and JavaOne :
Oh and GFv2 Beta 2 anytime now.... ( mai 03 2007, 02:58:35 AM CEST ) PermalinkI've just added Snap to my blog. I'm not sure why I didn't do this before, I find it quite pleasant when reading people using links. I've been adding way to many things to this blog lately (Google Analytics, StatCounter, MyBlogLog, ...) and this page is becoming a bit bloated IMO and obviously it can't load as fast as a regular non-instrumented web page/blog. FireBug 1.0 is a really neat Web debugger I've been using to debug some of my jMaki wanderings (more on that later) and I've found it to be very intuitive. It doesn't get in your way when you don't need it and when you do, you can easily drill down to the exact information you're looking for in no time. I imagine most people use it to explore the DOM, debug JavaScript and CSS code (I try not write any), etc, but I found the "Net" profiling feature to be extremely helpful for debugging AJAX apps as it lets you see XMLHttpRequest calls and responses (including headers). Try it out on GMail, you'll be amazed (or shocked) to see all those requests flying by. This feature can also serve as a network profiler. Here's what it shows on a simple page load of this blog: Purple colored time-lines above are noise more than anything else. Time for some cleaning up... OK, by way of popular demand, Snap is gone! I hope you'll like FireBug more than Snap :)( févr. 10 2007, 02:40:27 PM CET ) Permalink Comments [8]
JAX-WS 2.1, la pile Web Service qui déchire (ceci est un blog pas un communiqué de presse)
Why JAX-WS 2.1 isn't a dot release (ok, technically it is :) |