Products »
Desktop Workload Forecasting » Here
Developer guide for Desktop Workload Forecasting
This document is a
developer guide, its purpose is to explain the inner design of
Lokad Desktop Worload Forecasting. If you are not a software developer, then the
Getting Started guide is probably more appropriate.
Wants to discuss this application? Check
our web forums.
Getting the source code
The solution has been developed with Visual Studio 2005 and .NET 2.0. You can retrieve the latest version of the source code from the
Subversion repository of the
lokad project on Sourceforge.net. You will need a Subversion client to retrieve the code. You do not already have such a client, we suggest
TortoiseSVN.
Subversion URL: https://lokad.svn.sourceforge.net/svnroot/lokad/workloadforecastingA MsBuild project file named
win-package.proj is available to compile the various projects and produce the various packages (like
source-only package and
MSI packages). The MsBuild script has several dependencies (listed below), but note that you do not need those dependencies unless you want to actually produce the MSI package associated with
Lokad Desktop Workload Forecasting. The compilation from Visual Studio should work
as such without any particular tweak.
There are two dependencies for the custom MsBuild project
- MsBuild Community Tasks that we are using to perform custom build operations (such as zipping the packages).
- Wix 2.0 that we are using to produce MSI packages.
In order to execute the MsBuild scripts, you need to include several directories in your Windows PATH
- The Visual Studio directory, needed to execute
msbuild.exe (typically C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin). - The .NET 2.0 directory, needed to execute
wsdl.exe (typically C:\Windows\Microsoft.NET\Framework\v2.0.50727). - The WiX directory, needed to execute
light.exe and candle.exe (typically C:\Program Files\wix-2.0).
Lokad.Data
Lokad Desktop Workload Forecasting (LDWF) has been designed for an easy extensibility through
workload providers. Basically, a workload provider is simply a piece of glue specific of a business application (typically a call center software); and this piece of glue is used to retrieve the workload history (typically call volumes). A workload provider inherits the
WorkloadProviderBase class which provides an abstract method
GetWorkloadLogs.
public abstract class WorkloadProviderBase
{
public abstract ICollection<WorkloadLog> GetWorkloadLogs(
int pageSize, int index);
}
When the method
GetWorkloadLogs is called, the inherited class is supposed to return a collection of
WorkloadLogs. The
WorkloadLog is simply class that represents an elementary workload activity in a work queue.
public class WorkloadLog
{
public string QueueName { get; set; }
public DateTime Timestamp { get; set; }
public double Volume { get; set }
}
Notice the three field members:
QueueName which identifies the queue,
Timestamp which indicate the date of the workload log and
Volume that represents the amount of amount of work associated to the log.
Lokad.Data.VB for VB.NET
LDWF provides a DLL project named
Lokad.Data.VB very similar to
Lokad.Data, except that it is implemented in VB.NET and not in
C#. This project works like
Lokad.Data except that it allows to implement workload providers in VB.NET.