Saturday, June 03, 2006

The need for continuous thought...

This blog entry is mostly focusing on the topic of innovation. The words "process" and "policy" get involved as well.

When a company starts up, it does not have a documented process to follow, even less does it have a certain "policy". The employee needs to use, as his only tools, "common sense" and "domain knowledge" in order to get from A to B. If common sense and domain knowledge are correctly applied, the company makes profit. If the employee makes the wrong decisions all the time, the company tanks and goes bankrupt.

Enter the 5-year old company. Employees have routinely been taking decisions and have established a so-called "process", which is the way how things "are/estar" done. If circumstances do not change, the application and utility of that process can be very successful.
( "estar" comes from Portuguese, meaning a temporary "to be" )

Enter the 30-year old company, 20.000 employees later. Now things are established through "policy". This means, ensuring that "processes" and decisions conform to a certain "grand strategy". This is when things "are/ser" ( meaning the definitive "to be", the Portuguese "ser" ).

Policies can be hyper-destructive, because they are very difficult to change. It is as if they live their own lives, have no owner and no person within the organization generally feels powerful enough to change it. Changes in policy generates enormous quantities of confusion in an organization. Why?

It is funny and sour here that the word "policy" actually means: "A plan or course of action, as of a government, political party, or business, intended to influence and determine decisions, actions, and other matters" (Source: The American Heritage® Dictionary of the English Language, Fourth Edition).

So, the description of policy does not carry the heavy sense of "mandatory", but the interpretation of employees is exactly that. Making a better decision for the sake of your project success may result in assuming the risk of being put in the spotlight for non-compliance. Policies are suitable and useful as a guideline, when assessing which option to favour if the alternatives are about equal.

The companies function differently, because there is a difference how (much) people use their mind. The startup company requires people to use their mind continuously, but the large corporation can live with a very large number of monkeys that apply a certain process, what they would call "best practice".

The world changes very quickly, so what was established as a process some time ago needs to be re-evaluated every so often. Communication about (requests for) changes in processes generates confusion and a barrage of "re-alignment and re-organization emails".

A process should be a helpful tool in order to define the responsibilities for the parties involved. In that sense, the "process" serves a very useful function. But it is also a potential hiding cover. It gives people the potential to stop thinking and use the process as a cover excuse for lazy-ness (or worse, blame the process as the point of failure, ignoring for now whether the process is actually wrong, incomplete or correct!).

Here we enter an interesting arena. The question is not whether we should dump processes altogether. The question is what we need to understand about each process in order to make it a useful tool in our collaboration. Understanding the process in this way goes much further than knowing how it actually works. People need to understand why it is there in the first place, what purpose the process serves outside the context of the routine or practice it is applied in. This is exactly the definition of responsibilities. Without the understanding of those definitions, nobody can use the process efficiently and elaborate on it (become contributing employees).

If employees do not have experience with alternatives, they will not understand additional reasons why the process is the way it is, simply because they cannot imagine how in practice things can go wrong. This "wisdom" only comes from exploration, which is forbidden in the context of the process because you are required to follow it. Thus, processes have the tendency to train monkeys that never think outside the box.

With this problem of never thinking outside-the-box, other people that do understand are inclined to try to prevent the failure by mounting another process, in an effort to help lesser experienced people. Such processes often formalize the responsibility that the employee should have assumed in the first place. Instead the process provides yet another cover for the employee to hide behind and it can make them even lazier than before, countering productivity.

When the environment or market the company operates in does not change, then the mounting of processes is not necessarily a problem. The process is basically the description of a routine that you must follow like a machine in order to be productive. Factories could do this for example and then you might get good results, everybody happy, no problem.

As in IT especially, markets, environments, tools and "insights!" rotate every three years or so, the process building blocks age very rapidly, which in turn very rapidly ages the organization. If you do not have the infrastructure available to create 'process change or adaptation', you will eventually age until you reach mortification.

People that do think in the organization would already have left by that time. So, losing your key employees is a good indication that your organization is aging too rapidly and not adjusting quick enough.

Saturday, May 27, 2006

Project Dune restarted

I've decided to re-kickstart Project Dune using the Google Web Toolkit. This is both an opportunity to learn more about the GWT in a practical environment, possibly creating re-usable components along the way, and also finally gives me the ability to really focus on the behaviour and functionality of the QA app, like I always wanted. Coding Struts & Forms is basically so incredibly boring (copy data from here to there, configure in .xml, it's just numbing).

The project can be found here:

http://pdune.sourceforge.net

http://www.sourceforge.net/projects/pdune

I'm looking for designers and developers to help out in the effort.

Wednesday, May 17, 2006

Google Web Toolkit

It's all over the Internet. Google published the toolkit that is useful for making AJAX enabled web applications. It generates HTML and JavaScript on the fly and you can test the web application inside a JVM during development (relying on Tomcat).

I'm convinced that this is the pre-cursor to a radical re-thought on MVC frameworks and architectures. I don't think it has ever been this simple. HTML and JS personally for me have been the most difficult things to get right. MyFaces and Struts look ancient technologies compared to what Google has done. Amazing job!

http://code.google.com/webtoolkit/overview.html

Thursday, May 11, 2006

Worldbank Initiative

http://youthink.worldbank.org/

I just viewed the Webby awards and discovered this great initiative by the world bank. Remarkable to see an institution for that purpose being so responsible and showing such great involvement into the society (after all, they deal with money & economics, like IMF). If only the IMF were more like the World Bank and had the same insights... *sigh*

http://www.amazon.com/gp/product/0393324397/104-4868404-3764761?v=glance&n=283155

The "YouThink!" is interesting by itself. It treats a whole lot of issues that activist groups are fighting for. This is not done from the activation perspective, but more factual, scientific and "current, common knowledge".

A lot of different tests out there to get people interested. Great website.

Sunday, April 16, 2006

Streets of Casablanca & HDI

I've just finished up on the film "Streets of Casablanca". It is very gripping. It highlights three children in Casablanca, Marocco, living in the street. One of their buddies gets killed by a gang of other street children and they are trying to arrange for his burial. The IMDB probably has a better description of the film, but I would definitely recommend to have a look at the "Extras" section of the DVD. It shows that the film crew also spent a good amount of time working with these children and supported several projects that helped these children to get off the street and build a better life.

There is not a good way to measure "human development" or other figures that properly reflect standards of living. I went to the United Nations Human Development report website here to have a look:

http://hdr.undp.org/

An interesting project could be to start mapping this data in color maps using Google's map API. At the moment it's just a collection of numbers and it does not really say much yet.

The majority of reports I've browsed through are "comparative" reports. I've read a paper here that puts Brazil in quite a good spotlight, but when you look at the majority of the population, poverty is all around. We're seemingly doing not too bad, but from the streets here I know better. An amazing number is that 10% of the richest people in Brazil hold 46% of all wealth. 30% of the poorest have only 3.1% of all wealth. These do not state absolute numbers unfortunately.

Thursday, March 30, 2006

XSL:FO processing

I'm looking into using Formatting Objects lately for the MoneyJar project. Nothing is useful until it is possible to show the monetary amounts on an invoice for customers. :)

The problem here is again that there are many standards, each with pro's and cons, some of them much work to implement, others very easy but difficult to use for others... and the list goes on...

So I am doing some research in the area of XSL:FO and maybe write or extend another little editor around that. There is an editor on SourceForge called FAO, but I don't think it is very intuitive for people to use. I had lots of problems using it because I don't understand XSL:FO in the first place. Also, I don't think many other developers are willing to trawl through 400 pages of XSL:FO documentation in order to write a quick template for something.

XSL:FO is specifically created for the "printing" industry. I'm basically not doing anything else than rendering PDF at the moment based on a full "xsl:fo" document, but this final "xsl:fo" document is generated through an XSL-XML pipeline as well. So, the invoice generator I have set up prints itself in an XML format. This XML is forwarded towards the XSLT-engine, where it generates "xsl:fo". The final "xsl:fo" is then converted into PDF.

Yes, this costs processing power, but so does C + files + ASCII and the latter solution is much more error-prone. The best layout & printing capabilities of the latter is nothing compared to the powerful layout capabilities of XSL:FO + XSLT + XML, not to mention its portability to other document formats. Plus that if you have a printing press set up that accepts PDF to be printed and mailed into envelopes, there should be a solution out there that can automate this without the need to purchase an expensive package. So there you go, I'm sold!

So, if you know of a 'complete' editor for XSL:FO that does it all and is WYSIWYG and can be used to 'drag' element data or attributes into a view of some kind, that would be totally awesome :).

Sunday, March 12, 2006

Money Jar

I've just released a new project on SourceForge. It is a financial library for Java with high precision. The target is to streamline the use of financial numbers in Java applications. BigDecimal supports the precise numbers. Surely, many people already use BigDecimal for finance, but issues like standard rounding and the currency the money is in are not resolved.

This library wraps BigDecimal into a Money class and has some features like automatic rounding based on JVM-wide configuration. It also does not allow calculations to take place between two incompatible currencies.

Since this project is more incremental, I intend to add more and more features to this library. The objective is to add "invoicing" support with some factories and helper classes, so that people can prepare invoices much easier. Another is to add a "tax engine", which is configured according to rounding rules, summation rules, tax application order, etc. to the nation/state where you live, so that taxes is much easier.

Researching about the subject of billing and taxation is a real head-ache. I do not intend to make this a library that you can use straight away in any part of the world. The configuration requires you to do the legal research, this library supports you in setting up the environment so that it is all resolved by itself.

I have some future plans a bigger project that uses this library that also involves some kind of distributed computing.

Tuesday, March 07, 2006

Open Source Progress

Together with some colleauges, I've written an article that was submitted to the Open Source Software Forum in Porto Alegre in April. We'll hear more if it was accepted 17/03.

The ideas are generated after thinking about corporate software use and licensing. The license costs in that area are huge.

The difference between corporate open-source vs. desktop open-source is that there is more "utility" for desktop opensource apps for any particular user and the user base is much larger.

Probably this is why there are so little corporate opensource projects available. I'm not talking about Apache webserver, Struts, JBoss or other projects. Those are platform projects. I'm more talking about specific solutions for specific companies, like CRM / HR / ERP / workflow etc. Yes, projects exist here and there, but the momentum behind them is very low.

So the idea was to generate an additional driver (money) behind opensource development, whilst keeping it open. We do this by proposing cooperatives that drive a system's development in cooperation with many other cooperatives across the globe. Ideologically speaking approaching an idea like syndication of some sorts and a main controlling body when the project gets out of hand.

We've analyzed the difference mostly from an economic perspective (the reason why anybody should even care or look into it, since opensource adoption by itself is hardly a goal). Next article we hope to present is more targeted at the specific composition and organization behind the cooperatives.

Monday, January 30, 2006

Back from WSF 2006

I'm just back from WSF 2006. There was some very little coverage on CNN about it, the majority of CNN was about the World Economic Forum in Davos.

As said, there was a lot of Bush-bashing. However, this was not a gathering of just 'leftists' etc., there were many different people there. It is a bit sad to see that HC gets all coverage on CNN with some radical statements, but the actual topics being discussed are not really being published. Also, although there are some sessions highly politically motivated, the actual essence of the WSF is social action. This does not have anything to do with politics, just changing governmental action whatever the government is composed of.

I went to a couple of interesting meetings:

* A workshop on the legislation of labour in developing countries

* A presentation about the work of a foundation that protects low-skilled labours in the Amazon, so that these people do not turn into slave labourers. The definition of slavery here is not specifically "being traded", but it means co-ercing people into labour with very bad conditions by making it appear as if they owe the owner of a farm. This is done by not declaring the bar bill, charging for the trip from their home-city to the Amazon (the 'gato', which is the guy who lures these guys, is posing as a travel agent and states you have to pay to get there) and more of these practices. For these reasons, one month later they get one bag of rice, maybe some trinkets, and that's it. Some drink water from a hole in the ground. Housing is basically a rooflet of wood with some poles underneath. Beds are wooden without mattress. When working with raw coal, no protection is given against pore-infiltration of coaldust... etc... etc... The federal government is on it now, clearing out the farm owners that violate this solely for the purpose of profit.

* A presentation about incubating "cooperatives" of low-skilled labourers in Brasil. This is where recycling-goods collectors can collaborate together, get better rights together and learn about administration and do things together basically for the good of them all. New hints, new ways of work, etc...

* A presentation from the "Mitterand Foundation" about the new society, which is suffering from "predatory capitalism" and especially why this is the case. They explained issues like water management, the right of people to have at least 4 liters of water a day, the privatisation of drinking water! , terminator seeds discussion (seeds that can grow only once and require farmers to continuously buy the seeds from the same supplier).

All in all, a variety of topics. It's definitely worth a visit and next year in Kenya, I am already planning to go again.

Sunday, January 15, 2006

Keep It Simple, Stupid!

I've worked all weekend on the Patty analyzer and things are getting quite stable. It has been ported to Linux and Solaris in the meantime. It should now be in a state where people can actually start using it more thoroughly and depend on it.

Download: Patty

Other news is that things at work are also going smoothly. We've recently had a long port of entity beans to Hibernate and also an effort to move from an old JDK1.3.1 to JDK1.5.0. One of the most ugly hacks I've ever seen in that project were that Java code compiled for JDK1.3.1 was actually stored in the database and loaded through a custom classloader. *ugh*.

The title of this post refers to that... Just because you can store blobs and code in the database does not mean that you should. An "innovative" idea may be really cool to code in, but it certainly does not mean that it is a good solution. Far from it. And having 4 different executables with different names that all do something similar is really annoying too. Like the Oracle client installation or ClearCase.

Or projects with dependencies on large frameworks of 80MB in download size. Some of them having licenses or evaluation codes that you need to register for.

My objective with Patty is to make it a very simple thing to install and run. Download Tomcat 5.5 (around 7 MB in size), unzip and run it. Deploy 'drill.war' in there. Set up the agent library (42 - 160kB) in 5 minutes in a Java runscript and people should have a profiler ready for the project.

Thursday, January 12, 2006

Progress on Patty

I've been working hard to push out an alpha 0.1 release. This is a sneak peek into what this is evolving into.

The actual GUI doesn't look particularly pretty, but the functionality is all there.

At the moment, I'm finishing up on heap analysis. The first thing I did was the ability to iterate the whole heap to analyze heap usage. Immediately thereafter I worked on the ability to trace objects that you can reach from all instances of another type of object. For example, if you are analyzing a web server application, you really want to find out what kind of objects are referenced in your HttpSession and the total size that is referenced in the instances overall. My idea is to average this out later, so you get an understanding of the average session size.

Garbage collection needs some more work for visualization.

To be able to get to alpha-1.0, I'm still verifying with runs in JBoss now. That seems to start up quite nicely at the moment, so I'll probably look at another J2EE application for download somewhere, deploy it and actually start using the thing for real now, instead of the meager test application.

Sunday, January 08, 2006

Patty went Alpha

Patty, the project for Java Performance Analysis, has gone to version Alpha today.

I've included a selection mechanism for code coverage and method execution analysis and thread contention analysis is working too. It can be downloaded from sourceforge.

I'm currently working on the Beta version, which needs to include dynamic class instrumentation or de-instrumentation. This has just been tested and is working fine now. There is just a little bit of work on the command sockets that I implemented, basically a TCP stream that communicates between the web-application and the agent library.

Another feature planned for Beta is garbage collection analysis and 'which-object-references-what'. The idea is to show a couple of 'root' classes (objects in the VM, but will be shown as classes in the analyzer), so that you can easily track where memory is being held or where it increases.

Maybe a couple of those analysis dumps can be used in the future to perform some heuristics checking on memory leaks or whatever.

After Patty goes Beta, I want to write up some stuff on performance analysis using Patty, so that the tool can be used much more effectively. Some charting is going to be used as well and some better heuristics on the averaging and trouble points ( potential 'trouble' page for instance, where the problem points are listed).

Thursday, January 05, 2006

Garbage collection in Java

I'm going through a lot of information lately about garbage collection, starting from the 1.3.1 JVM. Interesting process overall. The current project I am working in uses the 1.3.1 and is going to upgrade soon to a newer JVM.

The collection itself does not truly impact any server application until the loads get higher and the space settings suddenly start becoming very inefficient. Especially in the 1.3.1 VM and with a relatively very large memory heap maximum, the full gc can take up to 25 seconds to complete.

This is mostly due to inefficient use of Java objects and holding on to references. This happens when server applications decide to "cache" a lot of information to prevent database queries. If the sizing at the design stage is not properly assessed, then the application will perform fine for some 200 records, but if this increases to 20,000 then certainly someone needs to take another look.

My advice is to keep caching to a minimum or use a standard caching framework like 'ehcache' to do this for you instead. It is certainly better than making your own implementations in your application, plus that the caches there work together with Hibernate and exist closer to the persistence layer.

Java 1.4 is already improving this by parallelizing garbage collection. This has enormous positive impact on the server process, but only when the server really gets busy on CPU of course. I'm going to read up soon on 1.5 collection and hope to post some useful documents in the next 6 months to be posted on the Patty site, along with the performance tool that I am working on.

Regarding the performance analysis tool, it is coming along nicely. Already there is a framework for web access now that is going to be expanded and the agent library seems stable. I'll need to expand the testing application to also have some thread contention and to load more classes, libraries, maybe even include Derby + Hibernate and CGLib so that I can see how it performs with proxies and dynamic bytecode instrumentation.

Until then!

Wednesday, December 28, 2005

Patty on SourceForge?

I've worked a bit more on the profiling tool for the JDK 1.5.0, which uses JVMTI. The benefits of this profiler are, in comparison with others:
  • You can target the classes you wish to profile for method execution and coverage analysis
  • There is no need to instrument the classes at build time in the ant script
  • Using JVMTI, any Java process can be analysed. There are no sources required.
  • For an existing project to use the profiling tool means modifying the startup-line of the application to include the profiling agent in the JVM. That is all.
  • Because it targets specific classes for analysis, the rest of the classes not targeted run at full speed ( unless code coverage analysis is turned on ).
  • It currently analyses thread contention, method execution times of the targeted classes and code coverage of the targeted classes.
  • It will (soon) analyse the heap based on how much memory is consumed and can be reached by all objects of a particular class. For example, this allows you to analyse how much memory is referenced by an HTTP session or a singleton.
  • It will eventually include a web interface on Tomcat, where some links can be used as a command interface to the profiling agent. This allows you to instrument/deinstrument classes at runtime and request specific information about heap analysis, etc.
Because it was going on so nicely, I've requested a new opensource project on SourceForge, where I hope the project is going to be hosted. Keep you posted on the acceptance and the link.

[edit]

Patty got approved and is released here: patty

Home page, roadmap, documentation, screenshots, etc. will be added soon. Binaries and source have already been posted.

Tuesday, December 27, 2005

Java Virtual Machine Tool Interface

I'm playing around with JVMTI now.

JVMTI allows you to do a couple of useful things:
  • Query all objects of a particular class and iterate over them to see what other objects are reachable from those classes. This also allows you to analyse the amount of heap consumed by certain classes, like singletons or HTTP sessions.
  • Native method entry / exit. A bytecode instrumentation implementation for execution profiling is more efficient though, because it only hits the classes that are instrumented.
  • Redefine classes at runtime. Useful for instrumenting/deinstrumenting classes on demand. This also allows you to run a profiler in production at no overhead.
  • Analyse thread contention on synchronized blocks.
  • Single step through the code to analyse code coverage. This should probably only be done during unit testing.
In my implementation, I'm using 2 computers. One is running the JVM with the JVMTI agent, the other is running a daemon that receives events and records them in memory.

Ideally, I wish to run a GUI on top of the daemon with some command abilities, so that a control socket into the JVM can be used to send commands to the profiling application. This GUI is likely to become some sort of simple Tomcat / Struts application that renders a couple of views in real-time on a webserver, based on the received information so far. That can also be used to print heap memory usage / changes in realtime.

The idea is to do the following:
  • Collect real-time information about code execution, avg/min/max.
  • Collect code coverage statistics per class and method.
  • Instrument classes at runtime to analyse method execution timings.
  • Request memory usage of reachable classes from a particular class type and analyse this over time when the application is running.
  • Request memory usage of all objects per class type and put this into a list / diagram.
  • Send garbage collection requests at runtime for analysing memory leaks and the impact of long-running sessions.
  • Deinstrument classes on demand.
  • Analyse thread contention.
  • ... Some more features in the future.
Sun has researched another technology called JFluid, which has even more features than JVMTI and is just becoming productized for use in NetBeans probably. I don't really need so many features though, just some good in-depth information what goes on inside the JVM.

Monday, December 19, 2005

Source Code Versioning systems

I've been using a couple of versioning systems now. Some I like,
some I highly dislike.

I've used MS VSS, cmm, cvs, ClearCase, svn and many have interesting
features, but none comes close to satisfying all of the needs that
I have as a developer. Some of them are rich in features, but slow
in operation.

This is one of the things I am thinking of. Developing a module
that can use a web-based front-end on Tomcat to organise sources,
backed up by a database. A client-side daemon process connects to
the server-process and retrieves XML-based repository information plus
optionally different streams of codebases.

CVS almost forces you to look at a single view at a time, unless you
manually set it to do something different. CVS keeps the repo files
inside the same directories, which makes compilation and source management
quite difficult unnecessarily.

Most of the tools were written in C/C++ with the largest overhead in
file management. Which shows clearly that with Java, where files can
be managed easier ( no more string-length checking, etc. ), this can
be implemented much easier and quicker. I am thinking of using Derby
as a local database implementation, rather than individual files to
record information, and to use XML for transferring repository information.

What I want is a system that:
  • Shows baselines and streams of the repository in an easy manner, like an overview and I can choose from them.
  • Shows a description of what the baseline means
  • Lets a user download the whole baseline or stream locally without too much fuzz ( setup view, create local repo, etc... )
  • Can import a new project/baseline through a GUI system
  • Automatically updates local files when updates happen remotely.
  • Does not create alien files within the source directory
  • Can let users work with multiple streams locally, without having to redownload or do extra stuff for diffs, etc.
  • Should not use a network-mapped drive.
  • Allows easy baseline management.
  • Enables good overviews for extra meta-information on repos ( no lines, no changes, what changes are, searching for changes, etc ), maybe even up to annotation.
Well, just some good ideas anyway, now up for the design :)

Tuesday, November 22, 2005

HTTP protocol is broken? ( 1 )

I'm working with the HTTP protocol everyday. It was initially developed as part of an effort to serve static HTML files that have no interactive content or relationship with the server. This was also in the era when servers were not as powerful as today, let alone as cheap.

From a hardware and traffic perspective, it makes sense to terminate a connection once the files have been served. Keeping a connection open for every user means consuming resources on the server. It always includes keeping a socket open. It is required to re-work slightly the concept of a thread serving the user tightly integrated with the socket.

The bad thing about terminating connections is that one needs to communicate a session ID with the client and that "execution context" cannot be maintained and needs to be re-loaded every time. Every new request needs to regain full sense of a session and potentially reload a lot of data for that particular user. Having a separate context of execution per user that remains active (without being serialized) can help in making the application more useful to others and more reliable ( back button? ), because every new action is still related to the same context. (Context management in HTTP applications can be a problem, because you don't know whether someone will contact you again and you do not necessarily want to remain with a large hierarchy of objects for a user if it is not necessary and the user has gone away. This is why session timeout was introduced).

Probably servers should not deal so much with interface code (HTML) as at the moment is the case. The application revolves around re-creating the full GUI at each new request. AJAX has reduced this to only parts of the user interface.

An approach with pages and XML injection has already been proposed before by Microsoft, which was further refined into "AJAX" by Google. Maybe this can be taken a step further to create a browser that downloads a template pack or templates 'on-demand' where the actual data that needs to be injected is inserted from a separate call. I'm not talking Ajax here, but more something like "continuous RMI" where the connection with a container is never terminated. This enables the web server to become quicker in serving requests for smaller communities, because it does not need to reload the context, set up or deal with security checks done every request, etc.

Server push already become broken due to NAT firewalls, so I don't think the solution is there...

To be continued...

Friday, November 18, 2005

Agent based Internet

Mobile agents is an area of research undertaken in computer science. It mostly involves mobile pieces of code that move from one computer to another and 'execute' elsewhere. Whatever it does, the traits or behaviour of these agents do not normally change. The functionality is quite static, but executes in a different environment.

The alternative is an enormous array of protocols. Every protocol slightly different than the other but also quite common. Some protocols are data-driven like XML, while other protocols are more function- or action-driven like HTTP. EDI, HTML, HTTP, XML, SOAP, .NET, the list goes on and on. All of these protocols require a contract between client and server or otherwise a contract to be discovered and complied with dynamically.

Agents can change this. Rather than thinking about agents as "mobile pieces of code", we could think about agents as "mobile, adaptive pieces of code that maintain a conversation". I'm basing this on Java for example, where it's easy to serialize a Java class with its data and transport it over a network. The agents are all sent to the same port without exception, because it is no longer the port that controls behaviour or is entitled to particular functionality, it is the message and request that is inside the agent, which is actually executed within the host environment.

The agent may request information (browsing) or make a request to purchase a particular article. It can give away information about its host environment like HTTP does in some sense, but it can also travel around further for other information that may be required before the action can be completed.

Consider a credit card transaction. An agent could be sent off to buy item "15-XA-01" from a particular online-shop. The agent is sent off along with credit card details and shipping address in its pocket. The agent is executed and requests the item to be purchased and sent off to the address. In return, it hands over the credit card details to the environment, which needs to specifically ask for it. If the environment also asks for an email address or phone number, the agent needs to travel back to the originating host, where it requests the user for the extra information. The agent then returns and continues its conversation.

Rather than creating "software interfaces", I think it's worth to consider "data-objects" that are versioning. For instance, an environment could ask for "v3.0 of Master CC", which is version 3 of the Master Credit Card details, a specific format. Or it could give the list of acceptable payments and ask the user how it wants to pay. Anything is possible. The actual conversation can be based on very basic, old "text adventure" parsing protocols:
  • A: Buy "XA-01-05"
  • B: Accept "{v3.0 Master CC, v2.0 Visa CC, cash}" ( "{...}" being the contents of a Java object )
  • A: Use "{v3.0 of Master CC}"
  • B: Get "Shipping Address"
  • A: Use "{shipping_address}"
  • B: Get "Email Of Host"
  • A: Please forward to {Host}
A is forwarded back to host and continues conversation...
  • A: Request "Email of Host" for transaction "YYY" to "Buy XA-01-05"
  • ( C shows message to user, who accepts )
  • C: Use "Email of Host"
  • A: Please forward to {address_of_destination}
A is forwarded back to destination and continues conversation there, completing transaction...

Just some initial ideas there, in practice there will be a big gap to be filled in the capabilities of the agent and its parsing capabilities, not to mention security! Plus how can it be proven that something was actually bought in a court of law, etc? Cryptography can help here and there, but only to some extent.

What I wish to pursue is "some means" where the endless "integration" of protocols can be avoided altogether. A space in which integration is the addition of a couple of parsing statements or requests, rather than burying layer of layer on additional "plumbing" on top of one another. Business rules with the above are potentially easier.

You should also see in the above that it requires standardisation of data-classes. Properly versioned, I see this as a benefit, because once the data is common, libraries can be written once to do the parsing and validation only once, rather than each entity having to do this "in their own way".

Many benefits over current integration practices... Let's see how this follows in the space.

Thursday, November 17, 2005

Democratic Corporations?

I've been reading a book from "Naomi Klein" called "No Logo". In this book a lot of criticism is made on the responsibilities of large corporations for the community and for the workforce. She documents for instance that MicroSoft hired a core of professionals on the payroll, but around 1500 temps that could be dismissed at any time. All of the departments like printing and other "non-core" were out-sourced to another company, so that "right-sizing" (as America calls it now) can be done at the touch of a button. Nobody wants to bother with workers rights, families and those kinds of responsibilities anymore, because it's a burden to the "responsibility towards the shareholders".

Capitalism is everywhere. I'm not against making money, but I am against making money at the cost of everything else. I am all for economic sustainability, but also for social sustainability and environmental responsibility.

I've been thinking lately about ideas for a "democratic" company. The management of a conventional corporation does not particularly resemble "democracy", since the workers inside the company can hardly exert influence over a company's actions, unless they organise themselves in some kind of demonstration or strike. It's a mainly hierarchical decision making policy that operates top-down, not bottom-up like some companies wish to portray themselves.

Such a company should still identify leaders and make responsibilities clear, plus give people with responsibilities the autonomy to act under that responsibility. For instance, project leaders could become 100% responsible for work and re-organise the people within the project, but forums, votes and news-casts can be used to allow people to make decisions for policy-making inside the company itself ( aligned to mission and goals ), which is more about the identity and culture of a company than anything else.

Consider a new social experiment: - Computer professionals working "away". There are some challenges to face here:
  • How to define and show the "culture" of the company
  • Quickly find consensus and defining ways of dealing with conflict
  • Fair payrolling around the globe (different holidays, economies, work laws)
  • Ensuring that people work for the hours they claim (discipline and ethics)
  • Feeling of belonging to the company and feeling connected
  • Social isolation (from perspective of work)
  • Maintaining projects on budget and time
  • Ensuring fair work (deal with the voluntary work-aholic)
  • Regular meetings and making sure these are held with people present
  • Dealing with confidential information
Especially when you are able to exert influence over how a company is run within the boundaries of mission and goals, this can be a very rewarding experience. Working "away" implies working at home, on travel, at Starbucks in the city or the public library. Anywhere you can get 'connectivity' probably and wherever you like to work most.

The benefits here for the worker are very clear. But the benefits for a customer are not yet clear. Motivation is one and tapping into a global network is another. What kind of services however can be developed in this network that are difficult to organize in a conventional corporation and will it be worth the effort?

Tuesday, November 01, 2005

Standardization

This term in software means adopting the same protocol, format or development methodology as other people do. Patterns is another means of standardization. I like standardization, because it makes things look familiar to many people and it's easier for others to understand.

The bad thing about standardization is sometimes that certain developers see it as a "Holy Grail" of development. For instance, if an application runs on Tomcat, it has been developed quite strongly, does the job well, and it is doing quite an important job, it is likely some guy comes in and says:"Really, this ought to run on an application server, because the service has become so important, we should not risk....".

And there goes another million dollars against a project that was running fine in the first place and now is being rewritten to run inside an expensive application container.

I'm not especially against J2EE, but I've found the actual 'benefit', for what J2EE was developed, to become less and less marking, considering there are now technologies like Spring, Hibernate, Apache libraries and log4j. As in another article written on OpenSource and the costs of software development, I see no problem if someone uses a Tomcat engine properly and writes an application using Servlets or other technologies. As long as it works great and is consistent in behaviour, why change it to EJB's and the rest, *only for the purpose of being standards-compliant*?

I've seen people developing enormous presentations about *why* everything should run on J2EE, that the industry has shown in practice J2EE is the winning factor, that an application server can cater all your needs, etc... etc.. etc...

In practice, from experience, J2EE development is not as cost-effective as people want others to believe. Actually, I am writing software my own using *only* Tomcat, Hibernate, Apache libraries and some XML libraries. The development speed for that project is 3 times higher than if I would have used solely J2EE standards, plus that the testing and unit-testing cycle time is 5 times lower, because Tomcat starts up in 10 seconds, but JBoss in 50 for example ( WebLogic taking even more than that ).

Another defense in favour is remote-ness. "Anybody can use this object as a service...". In reality and practice, people develop an HTTP interface and don't go through the EJB container directly. I'd rather use SOAP probably, if the volumes of using the service permits it.