Spaces, shards, scalability through horizontal partitioning

21 November 2007

I just read some GigaSpaces White Paper and application examples.

They sort of applied the database horizontal partitioning (or “Shards”) paradigm  to the application server.

But they tend to alleviate the inherent problem of designing “completely self-sufficient” units. Their example is completely obvious, but in real life partitioning isn’t straightforward !


Web frameworks peaking toward obsolescence ?

20 November 2007

More than a shocking title, there is an interesting debate : See Raible Design.

InfoQ asks Does the rise of Service Oriented UI (SOUI) means the death of server-assisted MVC? A similar thread was started on JavaLobby last week: Web frameworks peaking toward obsolescence. A month ago, TSS posted a whitepaper titled Life above the Service Tier.

I will take the time to read all this !


Fedora 8 upgrade and Java

16 November 2007

I upgraded from fedora 7 to 8. (Via yum : wasn’t exactly smoove, but not too bad).

Now I installed Java 1.7 IcedTea as per Mauriat Miranda tips and added the JDK as well (-devel) : sudo yum install java-1.7.0-icedtea java-1.7.0-icedtea-devel java-1.7.0-icedtea-plugin

I tested as per Gregory Gulick’s tips and it was not OK.

So I launched galternatives and selected Java-1.7.0 for Java. Then it was OK.

Next I installed Eclipse (yum install eclipse), launched it, checked that it was using Java 1.7 : OK, then did a quick “Hello World” example and it went well. After some thinking I don’t see a real plus in having a RPM managed Eclipse. I can download it via the standard Eclipse way and I will be able to update it more conveniently.

Then Netbeans 6 and Glassfish have a problem related to keytool and keystore :

[2007-11-16 12:50:43.772]: executing command: /home/brunox/bin/glassfish-v2/bin/asadmin create-domain –interactive=false –adminport 4848 –user admin –passwordfile /home/brunox/bin/glassfish-v2/nbi-14359.tmp –instanceport 8080 –domainproperties http.ssl.port=8181 –savemasterpassword=true domain1, in directory: /home/brunox/bin/glassfish-v2
[2007-11-16 12:50:45.519]: [stdout]: Using port 4848 for Admin.
[2007-11-16 12:50:45.519]: [stdout]: Using port 8080 for HTTP Instance.
[2007-11-16 12:50:45.519]: [stdout]: Using default port 7676 for JMS.
[2007-11-16 12:50:45.519]: [stdout]: Using default port 3700 for IIOP.
[2007-11-16 12:50:45.520]: [stdout]: Using port 8181 for HTTP_SSL.
[2007-11-16 12:50:45.520]: [stdout]: Using default port 3820 for IIOP_SSL.
[2007-11-16 12:50:45.520]: [stdout]: Using default port 3920 for IIOP_MUTUALAUTH.
[2007-11-16 12:50:45.520]: [stdout]: Using default port 8686 for JMX_ADMIN.
[2007-11-16 12:50:45.520]: [stdout]: Domain being created with profile:developer, as specified by variable AS_ADMIN_PROFILE in configuration file.
[2007-11-16 12:50:47.275]: [stdout]: Security Store uses: JKS
[2007-11-16 12:50:59.504]: [stdout]: keytool error: java.io.IOException: Invalid keystore format
[2007-11-16 12:50:59.504]: [stdout]:
[2007-11-16 12:50:59.504]: [stderr]: CLI130 Could not create domain, domain1
[2007-11-16 12:50:59.555]: [return]: 1
[2007-11-16 12:50:59.555]: … command execution finished
[2007-11-16 12:50:59.557]: org.netbeans.installer.utils.exceptions.InstallationException: Failed to create the default domain
[2007-11-16 12:50:59.557]: at org.netbeans.installer.products.glassfish.ConfigurationLogic.install(ConfigurationLogic.java:373)
[2007-11-16 12:50:59.557]: at org.netbeans.installer.product.components.Product.install(Product.java:329)
[2007-11-16 12:50:59.557]: at org.netbeans.installer.wizard.components.actions.InstallAction.execute(InstallAction.java:151)
[2007-11-16 12:50:59.558]: at org.netbeans.installer.wizard.components.WizardAction$1.run(WizardAction.java:120)
[2007-11-16 12:50:59.558]: Caused by: org.netbeans.installer.utils.applications.GlassFishUtils$DomainCreationException: “Could not create domain - error CLI130 occurred.
[2007-11-16 12:50:59.558]: at org.netbeans.installer.utils.applications.GlassFishUtils.createDomain(GlassFishUtils.java:117)
[2007-11-16 12:50:59.558]: at org.netbeans.installer.utils.applications.GlassFishUtils.createDomain(GlassFishUtils.java:87)
[2007-11-16 12:50:59.558]: at org.netbeans.installer.products.glassfish.ConfigurationLogic.install(ConfigurationLogic.java:364)
[2007-11-16 12:50:59.558]: … 3 more

http://wiki.glassfish.java.net/attach/GlassFishAdministrationPages/admincreds.html

http://java.sun.com/javase/6/docs/technotes/tools/solaris/keytool.html#KeyStore

I guess  that I will simply install Sun Java 6.

All this through a FreeNX remote access.


Open Source Social Networks

10 October 2007

Most of the Social Network sites are not Open Source : FaceBook, Plaxo, MySpace, Last.fm, LinkedIn …
I searched for some and here is what I found so far :

  • Mugshot is an open project sponsored by Red Hat.
  • Elgg looks more like a CMS/blogging platform. But you have to install your own.
  • Barnraiser the tools you need to take control of your identity and social network on the web. AROUNDMe is a suite of social tools; a social toolkit from which you can build your Internet identity, create networks and contribute to collaborative environments. Need to search more.
  • The Appleseed Project is an effort to create open source Social Networking software that is based on a distributed model.

Obviously, it needs more work


Could your PC participate to Open Source ?

10 October 2007

I feel frustrated not to participate enough in Open Source. But my PC is running 24/24 …

Would it be possible to use that power to fuel OpenSource ? Currently I run Folding@home, bittorrent, hesitated about TOR, but would it be possible to be part of a cluster of some kind ? To share some CPU or HD ?

I guess that at some point Linux PC will get a critical mass of participating potential that should be given back.

Would it be possible to give Open Source Project the same distributed system that
Google & IBM giving students a distributed systems lab using Hadoop.


Will Human Laziness Burst The Web 2.0 Bubble ?

28 September 2007

Interesting article from Seth Porges on CrunchGear :
Will Human Laziness Burst The Web 2.0 Bubble ?

The comments are worth reading too, to mitigate his opinion.


Post source code on WordPress

14 September 2007

Just to remember : Wrap your code in these tags:

 [sourcecode language=’css’]…[/sourcecode]

Currently available : cpp csharp css delphi java jscript php python ruby sql vb xml

See : http://faq.wordpress.com/2007/09/03/how-do-i-post-source-code/


Konsole session save and restore

14 September 2007

It is possible to save and restore a “Profile” with multiple “Sessions” via Konsole Help (XTerm emulator).

A Session is a console, a shell, whatever is opened in a new tab. The Profile is a group of Sessions.

So once you have opened many shells, connected to distant SSH servers, named your tabs and typed some command like tail -f /var/log/... | grep -v boring

What if you crash or reboot your machine? Redoo all this work ? No ! Because you would have save your Konsole Menu : Settings ... / Save Sessions Profile ... You just type a name MySessions and Konsole will create the file in /home/username/.kde/share/apps/konsole/profiles/.

You can easily restore the Sessions with konsole --profile MySessions You can see the profile list with konsole --profiles.

Even better, you can edit the file vi /home/username/.kde/share/apps/konsole/profiles/MySessions , this way, you can type in the commands like tail -f ...

Sadly there is no menu to restore the session, so you have to launch konsole to launch konsole --profile MySession and then close the first konsole …

References :


PHP and JAVA, PHP on JAVA : Quercus

16 July 2007

Sun should have done this a long time ago, but Caucho did it : Quercus !

I quote :

100% Java implementation of PHP 5 released under the Open Source GPL license. Quercus comes with many PHP modules and extensions like PDF, PDO, MySQL, and JSON. Quercus allows for tight integration of Java services with PHP scripts, so using PHP with JMS or Grails is a quick and painless endeavor.

With Quercus, PHP applications automatically take advantage of Java application server features just as connection pooling and clustered sessions.

Quercus implements PHP 5 and a growing list of PHP extensions including APC, iconv, GD, gettext, JSON, MySQL, Oracle, PDF, and Postgres. Many popular PHP application will run as well as, if not better, than the standard PHP interpreter straight out of the box. The growing list of PHP software certified running on Quercus includes DokuWiki, Drupal, Gallery2, Joomla, Mambo, Mantis, MediaWiki, Phorum, phpBB, phpMyAdmin, PHP-Nuke, WordPress and XOOPS.

Quercus presents a new mixed Java/PHP approach to web applications and services where Java and PHP tightly integrate with each other. PHP applications can choose to use Java libraries and technologies like JMS, EJB, SOA frameworks, Hibernate, and Spring. This revolutionary capability is made possible because 1) PHP code is interpreted/compiled into Java and 2) Quercus and its libraries are written entirely in Java. This architecture allows PHP applications and Java libraries to talk directly with one another at the program level. To facilitate this new Java/PHP architecture, Quercus provides and API and interface to expose Java libraries to PHP.

The Quercus .war file can be run on Java application servers such as Glassfish, i.e. it can be run outside of Resin. This .war file includes the Quercus interpreter and the PHP libraries.

Just a few remarks : it is a .war file that can run on other application servers than Resin, this is great ! Some of the features described are only available in the “professional” non-free version of the Resin Server.


URL utf8

16 July 2007

Note about URL and UTF-8 :

  • There is a Firefox option (about:config) network.standard-url.encode-utf8 that you have to activate in order to comply to the standard (see http://kb.mozillazine.org/Network.standard-url.encode-utf8) So you can type in an URL with é and it will be converted to %C3%A9 wich is the expected stardard behaviour.
  • According to RFC 3987, URLs must be converted to UTF-8 character encoding. IE and Opera, contrary to the specification, encode the path part of the URL in UTF-8 but encode the query string part of the URL in the encoding of the referring page ! That would be right for POST parameter, but not for GET !!!
  • W3C make it clear too that URL should be encoded in UTF-8 http://www.w3.org/International/O-URL-code.html (has some Java example code).
  • In PHP you should use :
    urlencode(utf8_encode('großpösna'))  -> gro%C3%9Fp%C3%B6sna : GOOD
    utf8_decode(urldecode('gro%C3%9Fp%C3%B6sna')); -> großpösna : GOOD