Day: Thursday, April 04, 2013

Website Snapshots with Crafter WEM and Alfresco

Posted by on April 04, 2013

Every now and then we see a requirement from customers who specify that a snapshot of the entire repository for the website be maintained on a deployment or on a daily basis in order to enable a audit of the entire site at a given point in time, or to allow a rollback of the entire site at a given point in time.

The versioning system within Alfresco’s core repository does not natively support snapshots.  While it is possible to model this capability within the system through custom coding, the solutions tend to be complex while the demand for the functionality remains low.   In any technical solution it is important to keep things as simple as possible.  Whenever you run into a narrow requirement that threatens to complicate your systems you need to take a step back and determine:

  • Is the requirement is truly necessary?
  • Can the requirement can be changed slightly to work better with the existing technology?
  • If the requirement is necessary, can you can integrate with a 3rd party that solves the problem directly without complicating the overall solution?

In our example we are left with the third option.  Given this, the first question is: are there any existing, robust, affordable solutions for maintaining snapshots of an entire collection of “assets” that already exists and can be cleanly integrated?

The answer is “Yes.” Snapshot capabilities while not very common in web content management systems are extremely common in source code control systems like SVN, Git and others.  All of these off the shelf source control systems are extremely robust and are free open source platforms.

Following the idea that we’re going to integrate with an existing source control system to meet the snapshot requirement, the second question is: can our WCM environment represent all content and metadata as files?

Again, with Crafter WEM the answer is yes.  All content and metadata are represented as XML files or raw native formats such as images, rich documents, videos etc.

Our third question is obviously: how does the integration work?

Let’s review our business and technical requirements:

  • We want a snapshot of content that went LIVE on our site on either a deployment OR daily basis.
  • We need to be able to audit the entire site at a given point-in-time if an investigation is required (by law or organizational policy)
  • We want a integration with a source control system that does not complicate our overall WCM software and solution.
  • Our solution must cover all content and metadata

Now let’s review a potential solution for these requirements.

alfresco-wcm-repository-snapshot-arch

Getting published content in to the source control system

Because Crafter WEM is a decoupled system where the authoring and delivery system are independent systems separated by an approval process, and a deployment, multi-channel, multi-endpoint deployment is a natural part of the architecture.  As you can see in the illustration above, we have a typical deployment to our web infrastructure in the DMZ and we also have a deployment agent inside our corporate firewall, which will put content and metadata in a disk location managed by SVN, Git, or some other source control management system. All metadata and content can be deployed to the source control endpoint.

Delivering content and metadata to the source control system is a simple and robust solution.

Creating a snapshot

To create a snapshot we must check-in (AKA commit) to the source control system.

If we want to create a snapshot on every single deployment we can use a simple callback in our deployment target configuration to perform a check in via a command line operation.

Code Listing 1:
The configuration below demonstrates how to invoke a command line operation from the deployment agent after content has been received.

<beans xsi:schemaLocation="...">
    <bean id="MyTarget" init-method="register">
        <property name="name"><value>sample</value></property>
        <property name="manager" ref="TargetManager"/><property name="postProcessors">
            <list><ref bean="commitSiteOnDeploy"/></list>
        </property>
        <property name="params">
            <map>
                <entry key="root"><value>target/sample</value></entry><entry key="contentFolder"><value>content</value></entry>
                <entry key="metadataFolder"><value>meta-data</value></entry>
            </map>
        </property>
    </bean>
    
    <bean id="commitSiteOnDeploy">
        <property name="command" value="svn  "/>
        <property name="arguments">
            <map>
                <entry key="ci" value="PATH TO DEPLOYMENT"/>
            </map>
        </property>
    </bean>
</beans>

However, if we want to commit a daily (or any time-based snapshot) we can accomplish this with a simple operating system based scheduled task that performs the check in via a command line operation.

Reviewing a snapshot for audit

Reviewing a snapshot in the event of an audit is as simple as a check out of the particular version from the snapshot repository and launching a Crafter Engine instance on top of the checked out content.

Reverting our WCM environment to a particular version

Reversion of our entire site would require the following steps

  • Check out the particular version
  • Either create a new WEM project based on the check-out content and re-deploy to your targets
  • OR import the checked out site in to your existing WEM project and then deploy to your targets.  Take care to analyze your deployment history for deletes as these will need to be managed if you choose to revert over top of your existing project.

Performing Diff Operations

It’s possible to perform a diff operation between versions at any time. Almost all modern source control repositories support version dif functionality.

If you wish to compare the head of your repository with a particular version you can take the following steps:

  • Check out the trunk of your snapshot repository
  • Copy your preview directory in to your snapshot repository check-out
  • Use source control repository to perform diff operation.

Summary

Repository snapshots are an important requirement for a small number of organizations.  Crafter WEM is able to support these requirements with simple, robust integrations through its deployment architecture and readily available, affordable source control systems.

Building Enterprise Customer Portals with Liferay

Posted by on April 04, 2013

Remaining competitive in today’s market means customer-driven companies must continue to provide their clients with added value, and one of the most effective ways of achieving this is through a customer portal that enables a holistic view of the information customers care about the most. Customer portals also present an opportunity for organizations to generate revenue through strategic discovery features that expose clients to products they might be interested in.

Liferay for Customer Portals

Liferay Portal provides a versatile platform for solving a variety of business needs, including intranets and extranets, collaboration sites with blogs, wikis, and forums, consumer facing websites, and social community sites with built-in social networking features. And one of the most common use cases we’ve seen is customer and self-service portals.

Liferay’s site-based architecture makes it ideal for customer portals. A key capability of these portals is to provide separate sites, pages, and content for each customer. And since Liferay allows you to easily create individual customer sites with very little work, the scoping of the content and digital assets within those sites is supported natively.

LIferay easily supports the two most important features of customer portals – personalization and site-based security.

  • Personalization – Liferay allows for creation of personalized pages for each customer. The information collected within each customer site can then be utilized in creative ways to further enhance personalization and increase user engagement. Liferay roles and teams are often used as an elegant way to differentiate between user types within a single customer site, which in turn opens the door for further fine-grained personalization.
  • Site-based Security – Liferay’s architecture facilitates security by enabling straightforward management of site members and their permissions within the site. Moreover, end users can be appointed as site administrators to help decrease help desk load while providing customers with much needed content ownership and management capabilities.

Challenges and Solutions

Every project has its challenges, and it’s important to follow best practices and address them in the beginning to ensure a smooth implementation. From our experience in implementing customer portals of varying sizes, we’ve seen a number of common challenges and have found successful ways of addressing these with Liferay’s flexible platform.

Information Architecture

The quality of the information architecture will have a large impact on the success of the portal. The information architecture defines the types of content your customers will see inside the portal and the navigation within the portal to get to the right content, so it’s critical to define and categorize the content and display it in a way that’s easy for the customer to understand. A customer portal that makes finding important content difficult is destined for failure.

To resolve this in Liferay, you need to gain a clear understanding of Liferay’s architecture along with best practices. It’s important to involve a customer sample when defining and categorizing your content to determine which content is important for each customer.

Integration

Integration is a critical part of every customer portal because, more often than not, the content that customers typically care about usually resides in external third-party enterprise systems, some of which may change over time. Therefore, the best way to approach integration is with a reusable integration layer.

Liferay supports this with their service builder library, which allows developers to create a standard service layer abstracting all integration logic. With this, technical architects can easily provide their developers with a standard API to use for systems integration, resulting in increased developer efficiency and better overall solution maintainability.

Flexibility

Many customer portal solutions in the market were built to satisfy the immediate needs of those customers. This often leads to the solutions becoming inflexible, so when new technology or new use cases are required, these solutions simply can’t keep up. In addition, today’s users expect Web-based solutions to constantly evolve and get better, making the portal solution framework’s flexibility a key factor in determining both short- and long-term success.

Liferay addresses this challenge with its native support for the implementation and deployment of custom plug-ins to address any future customer needs. Additionally, Liferay was built with customization in mind – almost every aspect of the portal can be customized or overridden without sacrificing the ability to maintain a clear and supported upgrade path.

Branding

The ability for a customer portal to support different branding aesthetics for each customer provides a much appreciated, tailored experience to the users of the portal. The challenge here is that the majority of portal frameworks in the market today don’t easily support site branding, which usually forces adopters of those technologies to stick with one look and feel for all customers. Support for interchangeable skins or themes in a portal, though challenging for the portal vendor, enables more personalized user experiences.

Liferay’s Themes, Layouts, Mobile Support, and Custom Site Metadata allow developers to create unique look and feel options for each customer. The technical knowledge required to implement different skins is standard user interface technology such as HTML, CSS, and JavaScript. This doesn’t just make branding easy, but also quite flexible.

Innovation

Interaction within a customer portal is typically thought to be business-to-customer. However, customer interactions don’t have to be unidirectional, and a new market trend is introducing social customer-to-customer interaction within portals. This social interaction can be particularly beneficial to companies whose revenue depends on successful ongoing transactionality between customers.

Liferay’s flexible platform and robust feature set also allows it to support innovative new features as market trends change. Rivet Logic is proud to be one of the few, if not the only, Liferay partners to have implemented such a portal with a fully integrated marketplace experience for buyers and sellers of services to collaborate and transact within the portal. With features like Google Maps-based discovery, quote management, private messaging, customer service, and more, we were able to build an extremely successful customer portal with the help of Liferay’s flexible framework.

Liferay’s robust portal platform provides a versatile solution for satisfying a variety of enterprise needs, including building consumer-facing websites. Implemented correctly, these customer portals can bring great value to your customers, resulting in increased customer satisfaction and loyalty.