| Sun Bloggers |
| Ajouter ce flux dans votre site |
| Description: |
Sun Microsystems, Inc. Employee Blogs |
| Format: |
RSS 2.0 |
| Url: |
http://blogs.sun.com/roller/rss |
| |
| Derniers Titres |
Sun Bloggers
|
TOTD #63: jmx4r gem - How to manage/monitor your Rails/Merb applications on JRuby/GlassFish ?
Fri, 9 Jan 2009 05:00:00 -0800
TOTD
#61 and TOTD
#62 shows how to use JMX APIs to locally/remotely
manage/monitor your Rails/Merb applications. This Tip Of The Day
extends TOTD #62 and shows how remote management can be done using jmx4r gem.
This gem provides a clean mapping between JMX APIs and Ruby. It allows
to write pure Ruby code to manage/monitor any Rails application. As a
result it removes all dependency on the Java code used in TOTD
#62.
Lets first install the gem!
~ >gem
install jmx4r
JRuby limited openssl loaded. gem install jruby-openssl for full
support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
Successfully installed jmx4r-0.0.6
1 gem installed
Installing ri documentation for jmx4r-0.0.6...
Installing RDoc documentation for jmx4r-0.0.6...
Here is the equivalent Ruby code to flush the class cache (as in TOTD
#62):
require 'rubygems'
require 'jmx4r'
JMX::MBean.establish_connection
:host => "129.145.133.163", :port => 8686
beans =
JMX::MBean.find_all_by_name "org.jruby:*"
beans.each { |bean|
service = bean.object_name["service"]
case service
when "ClassCache"
@cc_mbean = bean
when "Config"
@c_mbean = bean
end
}
# clear the cache if it's full
if @cc_mbean.full
printf "JIT Max: %d, JIT Threshold: %d, Class load count:
%d\n", @c_mbean.jit_max,
@c_mbean.jit_threshold,
@cc_mbean.class_load_count
@cc_mbean.flush
else
puts "Class Cache is not full"
printf "Loaded: %d, Reused: %d, Live: %d\n",
@cc_mbean.class_load_count,
@cc_mbean.class_reuse_count,
@cc_mbean.live_class_count
end
As with all Ruby code, really clean and simple!
The key parts of the code are highlighted in bold.
"JMX::MBean.establish_connection" establishes a connection with a JMX
agent running on a remote machine identified by the IP address and port
number specified. "JMX::MBean.find_all_by_name" queries the agent for
all the MBeans in "org.jruby" domain. And then the code is self
explanatory.
Just dump this code in a file and run it as:
jruby main.rb
to see the output similar to:
Class Cache is not full
Loaded: 76, Reused: 0, Live: 76
Make sure Rails/Merb application is running after setting JAVA_OPTS as
described in TOTD
#62. For this blog, the JMX agent/Rails application ran on a
Mac and the JMX client on a Solaris box.
The jmxr
examples provides some more ways to use the gem.
There is also jmx
gem that provides similar functionality. It even allows to
create MBeans and provides a simple server where they can be
registered. Tom's
blog provide more details on usage and there is even a sample
included.
Subsequent blogs in this series will discuss:
How to
remotely manage your Rails/Merb applications using
JMX API ?
How to publish your own metrics that can be managed using
JMX API ?
How
to use jmx gem to manage/monitor ?
How to use VisualVM to get more information about the
underlying VM ?
How to use NewRelic/FiveRuns to manage/monitor an
application ?
Please leave suggestions on other TOTD (Tip Of The Day) that
you'd like to see.
A complete archive of all tips is available here.
Technorati: totd
glassfish
jruby
rubyonrails
merb
jmx jmx4r manage
monitor
|
Roland Piquepaille Dies
Fri, 9 Jan 2009 05:00:00 -0800
I'm sad to report that longtime HPC technology pundit Roland Piquepaille died this past Tuesday. Many of you may know of him through his blog, his writings at ZDNet and Slashdot, and his many years of software visualization work at SGI and Cray Research.
I worked with Roland 20 years ago at Cray, where we both wrote tech stories for the company newsletter. With his focus on how new technologies modify our way of life, Roland was really doing Slashdot-type reporting before there was even a world wide web. You can read his brief ZDNet bio here.
Rest in peace, Roland. You will be missed.
|
Rewards and Recognition to top performing CAs in India
Fri, 9 Jan 2009 04:54:01 -0800
Its my great pleasure to announce our top performers for their excellent
contribution to CA program from July to Dec 2008.
July Awards
Kavya Dharmarajan from MSRIT Bangalore - For organizing CA induction program in Bangalore at her campus.
August Awards
Dwarakanath J from SASTRA University - For conducting JSP evening classes for students and faculty members. He also worked to install Netbeans and VirtualBox in the laptops of all the staff members of School of Computing.
Jay Mahadeokar from SRKNEC, Nagpur - Jay coordinated an innovative concept of Open Source Hut for 3 days from 29th August-1st September in his college. He distributed the latest versions of Netbeans CDs and OpenSolaris to the attendees. The open source hut was participated by more than 500 students.
Alok Chakrabarty from Assam University - For helping in Solaris adoption in Assam University Lab and course and also hiring CAs in different colleges
September Awards
Shivkumar Ganesh from SRM university Chennai - For organizing big events on SFD, taking week long classes on “Fast Track Java”
Abhinav Srivastav and Angad Singh from JIIT University, Noida - For conducting week long activities on SFD and workshops
Anisha Aliar from SNDT, Mumbai - For conducting week long activities on SFD and delivered sessions at 14 engineering colleges
Avinash Gautam from IEET, Baddi - For conducting week long activities on SFD
Karthik Kulkarni and team from BVB, Hubli - For conducting week long activities on SFD and worked with lot of NGOs and engineering colleges
Lalith Suresh from MNIT Jaipur - For conducting week long activities on SFD and also visited lots of schools
Neha Goel from Amity University, Noida - For conducting week long activities on SFD and also helped in organizing CA induction program at her campus
S Karthik from NIT Trichy - For conducting Week long SFD Workshop
Sagarika from Andhra University - For conducting SFD workshop and visited lots of schools in talking about ODF competition
Sanaulla and Ashwin Bhat from NITK Surathkal - For conducting Week long SFD Workshop
Sushant Kumar from SMVDU, Jammu - For conducting week long activities on SFD
Kolli Bharath from DA-IICT, Gandhinagar - For conducting week long activities on SFD and visited many schools.
Vasudha Amrit from MIT, Manipal - For Conducting SFD Workshop and Glassfish talk with attendance more than 700 students put together.
October Awards
Abhishek Uppala from ICFAI, Hyderabad - Conducted lots of technical events at his college tech-fest, helped in organising the CFF workshop and also conducted SFD
Shantanu Kar from Assam University - For the CFF workshop and other two demos on OpenSolaris install fest
Its a great effort folks, keep up the great spirit and enthusiasm in building the OSUM community in your respective campuses and also spread the word of OSUM in different colleges/universities.
|
Technical Details Behind the DSC Homepage
Fri, 9 Jan 2009 04:27:05 -0800
When the DSC Engineering Team redesigned the site in early December they took the opportunity to separate the DSC Homepage into a dedicated Content Management System. By doing so this enables more frequent (and thereby more relevant) content updates.
If you want to read more about that project and the technical Web Server 7 config used to perform the passthrough the Sun.com Engineering team have written a blog post about it.
Happy New Year from the DSC Team!
|
Starlight and DSC Relationship
Fri, 9 Jan 2009 04:15:42 -0800
Back in early December the docs.sun.com team released a major design overhaul for the docs.sun.com (DSC) site (technically v4.3.0). This provided a fresh new look and a number of useful enhancements for IA, Search Engine Optimisation, standards alignment and much more.
Quick bit of background.... The docs.sun.com application is compiled as a WAR file... no surprises there... unfortunately the DSC Homepage has historically been embedded into the application. This means that even changing a single link on the Homepage required rebuilding the application and releasing an entire new codebase to the front end servers. Not ideal, the homepage was often out of date and when it was updated it required a lot of effort.
The new homepage solution... With the 4.3.0 redesign the DSC team wanted to take the opportunity to decouple the Homepage from the core DSC application. The question was where to host it? Starlight (the xx.sun.com CMS) seemed like the obvious choice but routing traffic between the two would be complex wouldn't it? NO! It's so very very easy with Web Server 7...
The beauty of WebServer 7... Routing traffic between the DSC servers (there are 3 of them) and the Starlight appservers (there are 6 of them) becomes very simple indeed. A simple edit to obj.conf redirects all traffic to a VIP that sits infront of the Starlight appservers.
The following is in the "default" object:
# Identify all Starlight assets and send to the passthrough
<If $uri eq '/' or $uri eq '/index.html' or $uri eq '/app/docs/index.jsp'
or $uri eq '/index.jsp' or $uri = '/css/*' or $uri = '/images/*'
or $uri = '/im/*' or $uri = '/js/*' or $uri eq '/language-select.jsp'
or $uri eq '/change-language.jsp' or $uri = '/_service/*'
or $uri eq '/language-select.html' or $uri='/share/*'>
NameTrans fn="map" from="/" name="passthrough-starlight" to="http:/"
</If>
And a passthrough object is defined:
<Object name="passthrough-starlight">
ObjectType fn="force-type" type="text/html"
ObjectType fn="forward-ip" hdr="Proxy-ip"
Route fn="set-origin-server" server="starlight-preview-server.sun.com"
</Object>
Simple!
The additional benefits to DSC... Over the past 5 years Starlight has continued to evolve to meet the latest needs of publishing, business and design teams within Sun. By passing the DSC Homepage traffic through to Starlight it is now possible for DSC to leverage all of the Starlight functionality.
Translation
The Starlight system has built in workflow translation: Select files, select languages that you want to translate into, files get sent for translation, vendor returns translations, approval/correction workflow, publish live. Done.
Global Fallback
In mid 2008 a powerful addition came online for Starlight named 'Global Language Fallback' (GLF). This provides publishing teams with a way to say "This file/directory is global, make it available on all sites." [1] For assets such as /css/*, /im/*, /js/* this means that there is only 1 copy of each file on the filesystem, but they are shared across *every* site. By using GLF, DSC automatically stays upto date with all css/im/js assets thereby freeing up DSC resources and allowing automated compliance with the WebDesign team's best practices.
Templated Authoring
The DSC team could have opted for hosting a static HTML Homepage on their own WebServer. It would have worked. But one of the huge publishing wins for Starlight is templated authoring. A publisher with no HTML experience can edit all of the Homepage content via a GUI form, preview the result and then publish the content at a desired point in teim. This is quick, simple to learn and reliable. Classic separation of data from presentation thereby enforcing Sun's Web Standards.
There are of course a whole raft of other benefits that DSC can piggy back upon that you would expect to find in any Enterprise CMS; Versioning, rich metadata, tagging, ssh/scp access, scheduled content, bulk updates, content search, approval workflows, language fallback, access control etc... etc.. the list goes on....
So far only the Homepage, language selector and all /css/*, /im/*, /js/* assets for DSC are served from Starlight (just a few hundred thousand HTTP requests per week) but there are great opportunities (and plans) for further content in the future.
Well done the DSC team!
[1] GLF can be tuned more than this to provide site, language and content-type filtering as well. Look for a future more detailed blog on GLF in the future.
|
Une bonne techno, c'est bien. Un bon marketing, c'est bien... aussi !
Fri, 9 Jan 2009 04:12:52 -0800
Pour une fois, nous n'allons pas traiter un sujet technique. Encore que...
Dans le cadre de la Startup Academy, j'interviens pour des sessions de coaching dans le domaine du marketing. Car, s'il est important pour une startup innovante d'avoir une super techno, il est tout aussi important d'avoir un bon marketing. C'est quoi, un bon marketing ? C'est d'abord une présentation simple et efficace.
De fait, la présentation est un art difficile. Il faut être capable, en un minimum de temps, d'éveiller la curiosité des personnes à qui l'on présente son projet ou son produit et de susciter l'envie d'en savoir plus. Pour ma part, j'estime qu'une seule phrase doit suffire pour délivrer le message. Si celui-ci est suffisamment éloquent et explicite, alors, immanquablement, le présentateur « accrochera » ses auditeurs. Quelles sont les caractéristiques d'un message efficace ?Contrairement à ce que font beaucoup d'entrepreneurs, il ne s'agit pas de parler de ce que l'on fait, mais de ce que l'on apporte. Ce qui compte avant tout, c'est la valeur. La manière de délivrer la valeur est secondaire. Dans l'univers de la high-tech, nous raisonnons de manière naturelle en termes de fonctions ou de fonctionnalités. Le marketing technologique se résume souvent à une litanie de caractéristiques qui sont censées démontrer la supériorité d'un produit sur un autre. D'ailleurs, dans de nombreux dossiers de candidature, les entrepreneurs définissent leurs projets par rapport à leurs concurrents en précisant que leur service fait plus de choses, est plus ceci ou plus cela. C'est symptomatique d'une approche technicienne de son offre. Dans l'univers de la grande consommation, c'est l'inverse. Ce qui est mis en avant, c'est la promesse, c'est le bénéfice que va trouver l'utilisateur dans l'usage ou la consommation du produit. Les caractéristiques sont secondaires. Le marketing de l'Internet a sans doute encore beaucoup de choses à apprendre du marketing « alimentaire ».- la valeur doit être définie au travers du regard de l'utilisateur ou du client. C'est lui qui décide en dernier ressort si ce que la startup propose a une valeur et où se situe cette valeur sur sa propre échelle. C'est pourquoi il est si important de se mettre véritablement dans la peau du client ou de l'utilisateur pour délivrer un message percutant et faire en sorte de se retrouver au sommet de l'échelle des valeurs de ce client ou de cet utilisateur au moment où il va faire ses choix.- la valeur doit être unique, propre à l'entreprise ou au projet, et factuelle. Elle doit pouvoir être étayée simplement par des exemples concrets de réussite.
Comment s'y prendre pour définir la valeur ?Il s'agit d'abord de faire un inventaire complet des atouts de l'entreprise ou du projet. Tout entre en ligne de compte dans la valeur : les aspects technologiques comme les aspects humains, la richesse fonctionnelle du service comme la richesse des parcours et des expériences personnelles. Il faut tout mettre sur la table : fonctionnalités et bénéfices, ainsi que forces et faiblesses. Ensuite, on filtre, par tamis successifs, pour éliminer ce qui n'est pas essentiel, même si on a parfois l'impression de trahir son projet en écartant des éléments qui paraissent importants. Cependant, au bout de la démarche, il faut arriver à ne conserver que ce qui est primordial et incontournable, ce que les clients sont prêts à acheter s'il ne reste que cela.Pourquoi se lancer dans ce travail difficile ?Au-delà de l'objectif qui consiste à trouver un message percutant pour présenter son activité, ce processus a pour effet secondaire d'aider les entrepreneurs à clarifier leurs idées et leur stratégie. Exprimer la valeur, c'est faire un voyage. C'est explorer son projet et s'explorer soi-même au travers du regard des autres afin de mieux se connaître et de mieux comprendre où l'on veut aller.
|
Quality Assurance and OpenDS
Fri, 9 Jan 2009 04:09:30 -0800
An interesting to read article for anyone passionate about developing and testing software, in particular open source software as is the strategy at Sun, this article posted by Gary Williams on quality and it's spirit within the OpenDS project is well worth a read. The main QA page for OpenDS can be found here
Nice write up Gary, come you "Tykes" !
|
1. Treffen der Hamburger (Open)Solaris Users Group
Fri, 9 Jan 2009 04:03:19 -0800
Das erste Treffen der Hamburger (Open)Solaris Users Group findet jetzt am 4.2. um 17:45 in der Hamburger Geschäftsstelle von Sun Microsystems statt. Die Lokation ist im Nagelweg 55, 20097 Hamburg.
Die Agenda ist zunächst:
- Organisatorisches
- Ideen für die HHOSUG
- In welche Richtung soll sich die HHOSUG entwickeln?
- Technischer Vortrag: Opensolaris 2008.11 Internals (Timeslider, pkg, etc)
Zum zahlreiches Erscheinen wird gebeten! Ihr könnt euch auf Xing für dieses Event anmelden oder mir an joerg@c0t0d0s0.org eine kurze Mail dazu schicken. Dann kann ich absehen, welchen der Besprechungsräume ich brauche
Zur Orientierung: Die Einfahrt am Nagelsweg 55 fast ganz hinuntergehen. Der Eingang auf der linken Seite hinter dem Bogen zum Innenhof ist der richtige. Für S-Bahn-Fahrer ist die S3 oder S31 bis Hammerbrook (City Süd) eure Wahl. Von dort die Strasse Sachsenfeld bis zur Post gehen, links abbiegen, die Einfahrt ganz runterlaufen (rechte Seite des Zauns), um die Ecke und der Eingang vor Euch ist der Eure.
Größere Kartenansicht
|
The Computer Language Benchmarks Game
Fri, 9 Jan 2009 03:54:51 -0800
Found a game about programming languages comparison - http://shootout.alioth.debian.org. Great fun if you wanna show that the programming language you like most, is also the best :-) For example to show that python is better then perl:
The FAQ for the game is over here: http://shootout.alioth.debian.org/u32q/faq.php
|
Happiness is a healthy social network
Fri, 9 Jan 2009 03:28:51 -0800
Once again New Scientist justifies my subscription - a fascinating article on how your friends' friends can affect your mood such as happiness. In other words, not just your immediate circle of friends.
The tips provided were:
Five tips for a healthier social network
Choose your friends carefully.
Choose which of your existing friends you spend the most time with. For example, hang out with people who are upbeat, or avoid couch potatoes.
Join a club whose members you would like to emulate (running, healthy cooking), and socialise with them.
If you are with people whose emotional state or behaviours you could do without, try to avoid the natural inclination to mimic their facial expressions and postures.
Be aware at all times of your susceptibility to social influence - and remember that being a social animal is mostly a good thing.
The article questions whether Malcolm Gladwell's Tipping Point argument that social epidemics are dependent on certain key individuals is correct - though my recall of that book is that connectors are one of the key individuals who by definition have wide social networks. The key point of this article is that the effect spans several degrees of separation.
The comments on the article are well worth reading too including the slightly concerning consequence of the above advice which means undesirable people (eg depressives) could end up isolated.
Some of the happiest times I've had are hanging out with dance friends. Find the right music, venue and dance partner and your cares and woes are soon forgotten. However, that joy extends beyond the dance itself - it's infectious.
|
|