Month: March 2008

Productively running multiple versions of Alfresco

How do you juggle multiple versions of Alfresco on your local machine? At any given time, I’ve got at least three versions running: The latest Enterprise release, the Enterprise head, and the Community head. If one or more active Optaros clients aren’t yet on the latest release, those older releases are running as well.

There’s always more than one way to skin a cat but here’s how I handle this problem. First, I want to use a single Tomcat instance, but I don’t want all of my Alfresco versions running at the same time. Second, I want to use the same MySQL instance running with version-specific databases to keep them separate. Third, I want separate, version-specific data directories.

The solution is to name your databases and all of your version specific directories with a naming convention, and then use shell scripts to delete and create soft links in the appropriate locations that point to the version specific directories. (If you are running Windows you can do symbolic links too–they are called Junctions).

In an Alfresco install there are four directories that you need to address:

  • The data directory
  • The web application directory
  • The shared extension directory
  • The virtualization server directory

Decide on a naming convention. For my databases, I use alfrescoXXn where XX is the version number and n is the network abbreviation (“c” for community, “e” for enterprise, etc.). So my database for 2.2 Enterprise would be alfresco22e. For directories, I use alfresco-X.X-nnnn. So, for example, the directories for Alfresco 2.2 Enterprise would be:

  • /home/jpotts/alfresco/alfresco-2.2-enterprise/data
  • /home/jpotts/alfresco/alfresco-2.2-enterprise/webapp
  • /home/jpotts/alfresco/alfresco-2.2-enterprise/extension
  • /home/jpotts/alfresco/alfresco-2.2-enterprise/virtual

When I want to switch between versions, I just call a shell script with the version as the argument. It takes care of deleting the existing links and creating the new:

echo Switching to $1...
echo Switching webapp...
rm $TOMCAT_HOME/webapps/alfresco
ln -s /home/jpotts/alfresco/alfresco-$1/webapp $TOMCAT_HOME/webapps/alfresco
echo Switching extension directory...
rm $TOMCAT_HOME/shared/classes/alfresco/extension
ln -s /home/jpotts/alfresco/alfresco-$1/extension $TOMCAT_HOME/shared/classes/alfresco/extension
echo Clearing Tomcat work directory...
rm -rf $TOMCAT_HOME/work/Catalina/localhost/alfresco
echo Clearing Tomcat temp directory...
rm -rf $TOMCAT_HOME/temp/*
echo Switching virtual tomcat directory...
ln -s /home/jpotts/alfresco/alfresco-$1/virtual $VIRTUAL_TOMCAT_HOME

Note that in this set up, the data directory and the Alfresco database don’t have to be dealt with directly because they are referenced by the file residing in the version-specific extension directory.

While you’re at it, why not make it easier to clear out the repository? Set up a “clean” script that cleans out your data directory and then runs the db_remove and db_setup SQL scripts. Remember that you’ll either need version specific copies of these scripts or you’ll need to modify them to accept the version-specific database as an argument.

With this setup in place, you can set up new versions, switch between versions, and start over with a clean repo quickly and easily.

Alfresco pledges to open community by 3.0

At the Alfresco Community Conference in San Jose Wednesday, Kevin Cochrane and John Newton promised to have a process in place to let non-Alfresco employees become committers to the Alfresco Community code line. The pledge, which many in the community may find surprising because up until this point, Alfresco has operated as a “closed community”, came in response to my question during the “Ask an Expert” session about the possibility of opening up. Kevin responded, “It’s coming with 3.0”, to which John added, “We want to make it easier for developers in the community to contribute to the product. We want to remove the bureaucracy that’s there. The more the merrier.”

Committers will have to assign over copyright and make guarantees that the code they contribute is theirs to give. According to John, this assignment of rights may be difficult for developers working for certain types of organizations, particularly those in government agencies, but Alfresco is working on a solution.

Notes on the Alfresco Community Conference in San Jose

More than 150 customers, partners, and prospects attended the Alfresco Community Conference in San Jose yesterday. There was a BarCamp the night before attended by almost 30 people. Alfresco capped attendance for both the Community Conference and the BarCamp.

Opening Keynotes

During the opening keynotes, Alfresco CEO John Powell and CTO John Newton went through their “state of the ECM market” presentations which attendees to the New York conference earlier in the year have already seen, for the most part. The theme is essentially that the old notion of ECM is dead, basic content services will bring ECM to the masses, and web 2.0/enterprise 2.0 needs to be woven throughout. Alfresco sees itself as being perfectly positioned for the transition to this new, more innovative flavor of ECM. They position themselves as being more front office/extranet/internet savvy than Documentum, Filenet, or OpenText, more back office than Vignette, Interwoven, or Drupal, and more enterprise than Sharepoint.

Adobe Share

For the first time that I know of, Adobe talked publicly about the technology behind their online document sharing service currently in beta. The Alfresco-backed service,, offers anyone a Flex-based user interface for storing, transforming, and sharing documents. It essentially combines three online document-related services: Document Center (protect PDFs and Office documents), Create PDF (online service for creating PDFs), and (email-based service for converting PDF to text). It then adds 1 GB of free storage for shared documents.

Any documents shared on the site are stored in Alfresco. After initial storage, several back-end services are executed including a virus scan, conversion to PDF, conversion to Flash, and the creation of thumbnails.

The Flex-based front-end talks to Flex DS which talks to Alfresco via REST. While in beta, the system is running on an active-passive cluster. To scale to the anticipated volume of millions of users and billions of documents, Adobe is going to have to scale both horizontally and vertically. Details on exactly how they plan to do this were not discussed.

Up-coming releases

  • 2.9 Enterprise (Q2 2008) — This is the first I’ve heard of an Enterprise release for 2.9. I’m not sure if this is real or not.
  • 3.0 Community (Early August)
  • 3.0 Enterprise (Early October)
  • 3.1 (End 2008?)
  • 3.5/4.0 (Mid-2009)

Check the Alfresco wiki for official timelines. All 3.0 development tasks are going to be entered into Jira under a project called “Slingshot” so if you’re wondering what’s in the new release, check there. At the time of this writing I couldn’t find any reference to Slingshot.

Web client 3.0: No longer 100% Flex

One 3.0 change that deserves attention is the new web client. Earlier in the year the plan had been to build it entirely on Adobe Flex. The new plan is to build the client entirely on web scripts with strategic use of Flex-based components where it makes sense. That’s right–no more JavaServer Faces. (Alfresco engineers say JSF just kept getting in the way).

Another interesting aspect of the new web client is the plan to make it an Alfresco WCM-managed web site. That means web client customizations would be handled like changes to any other web site. The new web client could also be used as an example of how to build your own dynamic web site on top of Alfresco’s REST interface. Custom solutions could optionally leverage Alfresco components as needed alongside custom components built on web scripts. The “classic” web client will continue to live for at least two years after 3.0.

An important side note to this change is that with 3.0, the web client and the repository no longer run in the same process. The repository will continue to be a web app deployed to a servlet container, but it won’t be coupled with the web client. They will be two separate web apps.

Alfresco’s Moves to the Front-End: Alfresco Dynamic Web Site

The other big buzz was around the new Alfresco Dynamic Web Site. In a nutshell, this gives Alfresco WCM something it has lacked, particularly when compared to offerings from folks like Vignette or Drupal: a front-end presentation framework.

Currently when you install Alfresco WCM you get just about everything you need to manage a web site but you don’t get a web site or any tools to help you build the web site. Alfresco’s Dynamic Web Site is an attempt to provide a sample site, a set of components, and tools for WYSIWYG editing of the web site. It makes more sense when you see it, but imagine previewing a web site and then dragging and dropping components, web content, and images from a tree view of your repository onto regions of a web page and you’ll have some idea of what this is.

Under this model, Alfresco hopes that web script-based components will flourish into a library of publically-shared modules a la Drupal or Sharepoint’s web parts. Web scripts are built with JavaScript (or Java) and Freemarker which is a much simpler (and open) development model than that of Microsoft’s web parts.

Alfresco for the iPhone

Yet another good example of the power of web scripts was Yong Qu’s iPhone demo. Using Apple’s iPhone SDK and development tools, Yong built an interface to Alfresco for the iPhone. Using an online iPhone emulator, he showed how he could browse the repository, view documents and images, and search all through the slick iPhone interface. He tied that in to Alfresco’s new SMTP capability by taking a picture of the audience with his real iPhone, sending it to his Alfresco server via email, and then using the iPhone emulator to search the repository for the newly-added picture. The interface to Alfresco was based on three web scripts–one that handled browsing the DM repository, one that handled browsing the AVM repository, and one that handled search.

[Updated 2.9 Enterprise date which I had incorrectly listed as 2007]

Trouble with Alfresco? Console yourself

Everyone who has spent more than 10 minutes with Alfresco is familiar with Alfresco’s Admin Console. The node browser is an invaluable tool for troubleshooting, but it is conspicuously located as a link on the Admin Console. There are a few other consoles that you can use to help troubleshoot or manage the repository, but you have to know where to look.

What: Workflow Console
Where: http://localhost:8080/alfresco/faces/jsp/admin/workflow-console.jsp
Use: Deploy, un-deploy, and delete workflows. Inspect workflow metadata. Complete a task that’s become stuck for some reason.

What: AVM Console
Where: http://localhost:8080/alfresco/faces/jsp/admin/avm-console.jsp
Use: List stores, create stores, delete stores, create directories and branches, create snapshots, create new nodes. Basically your one-stop shop for working with the AVM Store. If one model is ever chosen over the other, it is likely to be the AVM Store, so this is tool will become even more useful in the future.

2.9 Community adds a couple of new consoles…

What: Repository Admin Console
Where: http://localhost:8080/alfresco/faces/jsp/admin/repoadmin-console.jsp
Use: Deploy, activate, and de-activate content models. If you are using dynamic data models, you’ll need this. See for more details.

What: Web Client Config Console
Where: http://localhost:8080/alfresco/faces/jsp/admin/webclientconfig-console.jsp
Use: Reload the web client configuration. Handy when placing web-client-config-custom.xml in the repository rather on the file system. See for more details.

Consoles are certainly helpful, but log files and debuggers are also essential. Tweak by setting various loggers to “debug” depending on where it is you are having trouble. The file resides in <ALFRESCO WEB ROOT>/WEB-INF/classes. For JavaScript specifically, there’s a Rhino JavaScript Debugger you can enable, but I haven’t found much use for it. In any case, to turn it on, in, change this logger to “on”:

Last, connecting the Eclipse debugger to your running instance of Tomcat is often very helpful. It allows you to step through Alfresco source code to your heart’s content. (Try that with Sharepoint!) There are a few ways to do this, but the way I do it is:

  1. Set an environment variable called JPDA_ADDRESS to 8000 and one called JPDA_TRANSPORT to dt_socket.
  2. Change the last line of Tomcat’s to look like: exec “$PRGDIR”/”$EXECUTABLE” jpda start “$@”
  3. Create and start a new Remote Java Application configuration in the Eclipse Debug dialog.
  4. Set some breakpoints, hit the web client with a web browser and get to stepping.

With the help of the consoles, the logs, and the source, you’ll be successfully hacking Alfresco in no time.

Is Alfresco the “near beer” of open source?

I grew up in Oklahoma. For my international readers (I have quite a few), Oklahoma is in the central US, is quite beautiful, and is often called the “belt buckle” of the “bible belt”. This last characteristic gives way to some quite asinine laws, one of which is that beer sold in Oklahoma grocery stores must no more than 3.2% alcohol. As a kid I remember people ridiculing Oklahoma’s “near beer” to my father who would inevitably retort, “The 3.2 restriction is by weight while liquor stores measure by volume so it’s not a big deal.” I know–it always sounded lame to me too, but he’s a mathematician. (For details on the math, look here).

One of the criticisms of Alfresco by hardcore open source types is that it isn’t really open source. Like my home state’s beer, it’s almost open source. What does this mean? Certainly, the reasons I cited as to why clients choose open source (fit, standards, source code, transparency) hold true for Alfresco (See this post). But there’s a characteristic of “true” open source projects that’s missing for Alfresco that may not be as high on clients’ care-abouts, but is important to those of us in the community and that is this: In the current Alfresco model, none of us can ever be a committer. Yes, you can contribute patches and enhancements by opening a Jira ticket, but you’ve got to be an employee to be able to write to the SVN repository.

In the early days of Alfresco, this was more defensible than it is now–the code lines were the same, the product was still maturing, and, most importantly, Alfresco needed to protect its interests. Alfresco didn’t necessarily have time to let the community take the product wherever it wanted to. Instead, it needed to establish a critical mass, get things pointed in the right direction, and get some maintenance subscriptions flowing. Unlike other open source projects that start altruistically, Alfresco was a commercial enterprise from the start and there’s nothing at all wrong with that.

But now things have changed. There have been over 1 million downloads. There are tens of thousands of registered members of the community. The Community and Enterprise code lines have been separated. Why not give up some of the control of the Community edition to the, uh, community? Alfresco is still a small company with limited resources. Couldn’t a fraction of those thousands of registered developers be enlisted to help?

Alfresco often compares its model to that of Fedora/RHEL and which is a good way to illustrate the difference between Community and Enterprise from a development build versus enterprise-ready build perspective. But what about the development model? For those not familiar, the JBoss Development Process is roughly that all code starts in where it is available to early adopters. When it starts to look viable, it is pulled into, where it is scrubbed (maybe even recoded), integrated with the rest of the platform, tested, and productized. The key difference is that contributions include not just JBoss employees but others in the community who’ve earned the right to do so. Why can’t Alfresco work this way?

I imagine the answer comes down to resources and control. I concede that having the same engineers contributing to Community that must then pull the features forward into Enterprise is very efficient. Especially In the beginning, I could see how Alfresco engineers might have to spend more time integrating Community code with Enterprise code than they would have under the closed community policy. Surely that would improve over time, though.

Regarding control, I can understand that a commercial software company would feel inclined to tightly control the project’s growth and that an open community would be seen as a threat to that. But if the community takes the product down a substantially different path than the planned roadmap, wouldn’t that tell you something? And this wouldn’t be completely giving up control–Alfresco product management and Marketing would still be responsible for understanding what clients want, setting the road map, and owning the overall vision.

Maybe this is something we can get John and others to talk about next week in San Jose. Over a beer.

Know the way to San Jose?

I’ll be at the Alfresco Community Conference in San Jose next week. I’ll speak for a bit on the Endeca solution at the BarCamp the night before. The day of the conference I’ll be moderating the web scripts discussion. If you’re attending as well be sure to say hello.

Speaking of web scripts, hopefully you are busy hacking together an entry for Alfresco’s Web Scripts Developer Challenge. I’m one of the judges so if you stick a link to somewhere in your code maybe I’ll give you bonus points.

Two worlds collide in Boston

Okay, so maybe it wasn’t so much a collision as it was a harmless grazing. Even though there wasn’t a lot of crossover between the two, I’d still like to offer, as Mel Brooks put it, a “firm embrace” to whomever had the bright idea to co-locate DrupalCon with AIIM this week in Boston because I think (I hope) it gave the old guard of ECM some exposure to and appreciation for the wave of innovation taking place in the space.

Unfortunately, I don’t think there was as much crossover from the AIIM attendee side as there was from the Drupal side. There were a few curious DrupalCon’ers that ventured in to the AIIM exhibition hall. One person shouted out, “Hell yeah, Open Source!” as she walked by the Alfresco/Optaros booth, giving me a sort of “fight the power” gesture as she passed (at least that’s how I interpreted the gesture). Others stopped to chat at our little oasis of open source in the closed source desert. The serious under-representation of open source at the AIIM conference was a major topic of conversation.

I doubt we’ll ever see full integration between the two conferences–90% of the DrupalCon attendees were technical developers and integrators while AIIM attendees are mostly IT and business people evaluating or looking to purchase ECM solutions.

Another big difference is scope. AIIM, as an organization and as a conference, has gotten way too broad, at least for my own interests. A scanner that knows how to open sealed envelopes before imaging the contents is really cool, it’s just not a typical component of the solutions I implement.

Forgive the tangent, but this problem goes beyond AIIM to “ECM” itself. As Alan Pelz-Sharpe of CMSWatch pointed out in one of his sessions (the CMSWatch sessions were far and away the best sessions), almost everything under the sun calls itself “ECM” from source code control to imaging to records management in addition to my focus areas, WCM, Portal, Search, Collaboration, and Document Management. Indeed, the term was invented, largely by vendors, as a way to group all of those types of solutions together in an attempt to convince buyers that having one vendor that could do all of those things is better than buying from individual niche vendors.

I don’t deny a need for an association or a conference that can help people solve problems in these areas but how much overlap can there really be between people interested in microfiche and those looking to implement Web 2.0? One of our clients in the media industry stopped by the booth and asked me, “Are you sure this is the biggest content management conference of the year?”. He was having trouble finding the relevant content management information lost in the noise of vendors hawking copiers, scanners, and printers.

Anyway, back to the “two worlds” topic, the idealist in me hopes a sort of ping pong diplomacy took place. Perhaps the DrupalCon attendees were the New York Philharmonic to AIIM’s North Korea. Maybe a few of the suits learned something from the insightful questions being asked by the messenger bag crowd. Rather than be annoyed, I was actually encouraged by the legacy ECM vendor who came to our booth and grilled me on Alfresco and how it compared to their product. I tried to get her to renounce her faith right then and there but she was tough.

AIIM could do more to encourage that kind of cultural exchange and maybe even foster the innovation that old school ECM so sorely lacks. It sounds like the Rocky Mountain Chapter is planning on offering some open source topics soon. That’s great and I hope to see that happen in other chapters. And while we’re at it, maybe AIIM could offer free floor space to non-commercial open source projects. Just a thought.

At the very least, I hope the physical presence of 800 – 900 people passionate about open source content management was a jarring reality check to AIIM, legacy ECM vendors, and the larger community.

On a tactical note, a nice side-benefit of the co-located conferences was that the Optaros folks attending DrupalCon were able to put in some booth time on the AIIM show floor. If you want to read more about some of the DrupalCon sessions, check out John Eckman’s blog.

A perfect vacation policy might be to have no policy at all

Sounds like Matt Asay is shopping around for vacation policies. Matt points to an associate’s policy of stopping vacation accrual at six weeks as a way of encouraging employees to use their vacation.

At Navigator, we had a vacation policy everyone loved–we had no policy. We expected everyone to behave like adults and take the vacation they needed when they needed it. Some folks took a week or two a year while others took three or four. But no one had to worry about accruals or carryovers or time banks or any other silly thing. If you were sick, you stayed home. If you were wrapping up a project and needed some down time, you took the time off. Even as the company grew and we began to hire younger recruits, I never saw any instance of abuse.
Of course the “no policy” policy didn’t do anything to encourage people to take vacations. And, on termination, no one wrote you a check for the unused accrued vacation. But we all loved the flexibility and the freedom. It was certainly a factor people considered when they looked at alternative employers. You might not ever take the time off, but even a four-week vacation policy seemed restrictive in comparison.

Stop the end-of-year use-it-or-lose-it madness and jettison your vacation policy altogether.