PsExec

Utilities like Telnet and remote control programs like Symantec’s PC Anywhere let you execute programs on remote systems, but they can be a pain to set up and require that you install client software on the remote systems that you wish to access. PsExec is a light-weight telnet-replacement that lets you execute processes on other systems, complete with full interactivity for console applications, without having to manually install client software. PsExec’s most powerful uses include launching interactive command-prompts on remote systems and remote-enabling tools like IpConfig that otherwise do not have the ability to show information about remote systems.

via PsExec.

Java HttpClient and Load Balancer bad interactions

Working for a very big customer, I found a very nasty interaction between Sun HttpClient (JDK 1.4) and Http  Load Balancers.

In a complex network environment, sometimes you can experience low level TCP/IP comunication errors, because sometimes HttpClient get confused and hangs.

The bad behavior of Sun HttpClient is well known: some guys suggested me to use the Axis Web Client. Anyway you can solve the issue adding these three parameters to the JVM launch line

-Dsun.net.client.defaultConnectTimeout=5000
-Dsun.net.client.defaultReadTimeout=5000
-Dhttp.keepAlive=false

The first two parameters set globally the socket timeout to 5 seconds.
The last parameter forces the JVM to avoid reusing http connections when doing http request.

To be honest, http.keepAlive=false is not always effective and could have huge performance impacts, so be very carful adopting it.

But if you stick on the two sun.net.client.default*  properties (doing some tests) you can solve the issue.

References

From Java Plug-in Control Panel:

[…]
Networking properties description:

sun.net.client.defaultConnectTimeout

sun.net.client.defaultReadTimeout

These properties specify, respectively, the default connect and read timeout values for the protocol handlers used by java.net.URLConnection. The default values set by the protocol handlers is -1, which means there is no timeout set.

sun.net.client.defaultConnectTimeout specifies the timeout (in milliseconds) to establish the connection to the host. For example, for http connections it is the timeout when establishing the connection to the http server. For ftp connections it is the timeout when establishing the connection to ftp servers.

sun.net.client.defaultReadTimeout specifies the timeout (in milliseconds) when reading from an input stream when a connection is established to a resource.

For the official description of these properties, see Networking Properties.

[…]

Asus EEE-PC better then Mac Air?

Finally I managed to buy a Asus EEE PC 700  this week. I would thanks a lot Next Store and its kindly clerks, which I will prefer in future to Mediaword :)
If you are at Milan and you plan to buy it, Next Store is a good choice.

There are a lot of sites and articles around the net about the EEE-PC, because it is a very new article in the IT consumer world.

The EEE PC is the First  full featured PC sold at 300 euros. The Register tries also to compare it with the Mac Air, and we'll see why this is not a so crazy idea.
In these days in Italy was launched an overpriced version (320 euros) with Windows XP preinstalled. We are waiting also the more powerful version (EEEPC 900) at 400 euros. Anyway, what do the product is the 300 euro price: powerful and richer model at an higher price are no so stunning as the EEE PC 700.

Introduction: the hardware

The Asus EEE PC come with 3-usb 2.0 ports, and one SD Card reader. It is expandable a lot, considering it has the same usb ports of my Lenovo Thinkpad R60.  It has no DVD reader, but it is very small and tight. The  battery charger is similar to that of a GSM phone, and it sounds great because of its reduced weight.
The screen is tiny, but very very bright, so it can work if you are not too much greedy as me.

Even if the keyboard is too small, and the fan is noisy, for the rest EEEPC looks well.
With an external monitor&keyboard attached,  your trouble are reduced, at least at home.
You can compare it to a Mac Mini, sold at 600 euros, which has a similar but powerful hardware: so having half the ram for the EEEPC is not a surprise.
But the EEEPC 701 is easy to expand, and on Internet some guys managed to install 2Gb of RAM.
And it is not shipped by deafult with windows but with a linux operating system… another big news, isn't it?

 

Games
I code every day. So in my spare time, at home, I have two priorities: my girlfriends, and games.
And EEE-PC come with some funny games like Frozen Bubble, so it is definitively a very good machine.

 Vodafone & EEE-PC

In Italy, Telecom Italia sells a branded version of EEE-PC, with its USB connect key. If you have a Vodafone Connect Key, I have found an italian article to try to connect it. I will do some tests, and then translate it in English if it is worth of it.

The Software…

The operating system is a commercial version of Linux. Anyway it is well packaged, and it is reasonable fast. The File Manager does not start in a snap, but it could be worst.

…the ideas

Because ObjectsRoot.com is  heavly focused on software development, I am searching a set of article to how build a small cluster of EEE-PC, for doing small distributed computing. The cluster should be easy to set up, with no installation of new operating system, and should have decent performance.
I will report  my experiments in the next month.

Hacking it [Update on 11 june 2008]

Ubuntu has relased a specilized version of ubuntu linux

Conclusion: Why it is great

All these stuff fit in about 300 euros, and there is no decent PDA  at this price…even a good Nokia GSM phone is difficult to find for a such price. The EEE-PC weights less then 1 Kg, and it is very easy to carry on. The webcam is good if you have sufficient light to give it, and you can record at 44.1 khz your voice.
Skype comes preinstalled, giving you a lot of freedom with its VoiceOverIP technology.

 

 

Javascript and Smalltalk

There is a future for SmallTalk? I was a very strong fan of the SmallTalk language, but in the last five years I have seen more and more contraction of its usage in the IT field.

The OLPC project, which uses also Squeak Smalltalk and its done by the core team fo Squeak, is not going very well.

Anyway, Dan Ingalls, one of the father of Smalltalk, is working on a new project called Lively. It is a rewrite of Morphic in Javascript, especially target  for building a Squeak-like interface.

 The interesting part of this work is a paper outlining the limitation of javascript as programming language. I have tried in the past years to look for ajax and or web 2.0 javascript libraries, but I feel very difficult to develop with them.

From the Paper we underline these parts:

Loading multiple JavaScript applications into the same virtual machine is problematic.[…] For instance, if two programs
happen to use the same names for global variables or functions, the overlapping variables or functions of
the first program will be replaced with the corresponding features of the second program, resulting in
unexpected behavior in the subsequent execution of the first program. Since JavaScript will not typically
give any warning messages or errors in such situations, the resulting behavior can sometimes be a total
surprise; in many cases the errors resulting from such situations may not be discovered until much later.

 

Evolutionary development approach is a necessity. Due to the highly permissive, error-tolerant nature of
JavaScript, JavaScript programming requires an incremental, evolutionary software development
approach. Since errors are reported much later than usual, by the time an error is reported it is often
surprisingly difficult to pinpoint the original location of the error. Error detection is made harder by the
dynamic nature of JavaScript, for instance, by the possibility to change some of the system features on
the fly.

 

A lot of room is left in optimizing JavaScript performance. Current JavaScript virtual machines are
unnecessarily slow. Even though JavaScript is a significantly more dynamic language than, for instance,
the Java programming language, there is no fundamental reason for JavaScript VMs to run two orders of
magnitude slower than Java virtual machines.

 

Memory management capabilities of the current JavaScript VMs are poorly suited to large, long-running
applications. Current JavaScript virtual machines have simple, 1970's style garbage collectors

 The reason of these issue are simple:JavaScript was intially a language for web developers, small and easy to use, and very compact.
Absence of errors or warning is a nightmare, if you care of your digitating time.
And Javascript is slow because no one will write  long script with it.

A very compact and clean discussion can be found in http://javascript.crockford.com/javascript.html 

Fixing these problems is hard. Until the current  implementation will not provide a better way of error detection, writing javascript code will be a very long and time-consuming task.

And using a so old garbage collector, give a chance to a c/64 BasicV2 to beat your code:  you are awared, guys :)

Anyway, there is a good set of javascript libraries out of there (prototype and jquery, for instance but not only), so you should be quite happy