diaries, triumphs, failures, and rants

pageicon Friday Apr 17, 2009

View Job Information software architecture in SLAMD

Jobs in SLAMD exist in various states, for example, pending, running, completed, and failed. Job information can be viewed in each state. Jobs are represented by the com.slamd.job.Job class, which models all of the information needed by the view. This entry describes the basic software architecture used to view jobs in SLAMD.

Referring to the diagram, the SLAMD operator chooses a job by the jobID from a specific folder. The jobID is passed from the viewCompletedJob.jsp to the ViewJobAction object via a hyperlink, for example: http://localhost:11080/slamd/ViewJob.action?jobID=20090319144221-9118590&folderName=Unclassified. The ViewJobAction object verifies that the jobID is not null via the Apache Struts Validation framework, and gets a copy of the job object from the SLAMD database and places it in the ValueStack. If the database lookup was successful, the result code for ViewJobAction is "success", and control passes to the view viewJob.jsp which accesses the Job object and displays the information about the job.

In SLAMD2, job parameters (com.slamd.parameter.Parameter) contained a method that returned HTML code that was output via the Servlet OutputStream by the AdminServlet methods. SLAMD3 uses the Adapter pattern from "Design Patterns" to adapt this HTML output to a form where viewJob.jsp can create the appropriate HTML markup (jobParameterList->jobParameterElementList).

SLAMD view job architecture

About SLAMD

The SLAMD Distributed Load Generation Engine (SLAMD) is a Java-based application designed for stress testing and performance analysis of network-based applications. Initial development of SLAMD was performed at Sun Microsystems, with recent development sponsored primarily by UnboundID Corp. Recent development work is by Terry Gardner and Neil Wilson.

SLAMD is available under the terms of the Sun Public License, which is an OSI-approved open source license. The main site for obtaining information about SLAMD is available at its home page, and it is available as a java.net project.

SLAMD was originally developed for the purpose of benchmarking and analyzing the performance of LDAP directory servers, and it is the most powerful and flexible tool available for this task. However, it is also well-suited for testing other kinds of network applications and has been used for things like Web servers and Web-based applications, relational databases, and mail servers. It can also be used for non-network based applications (and in fact, it is used for comparing things like CPU power and memory latency across a number of different kinds of systems), although its distributed nature makes it ideal for systems that can be accessed remotely.

SLAMD provides a Java-based API to make it possible to quickly develop custom workloads, and it also contains an embedded scripting engine that can make it easy to stress applications using protocols like LDAP, HTTP, SMTP, IMAP, and POP, or any database that can be accessed via JDBC. It also includes tools for recording and playing back TCP traffic, and a utility for intercepting LDAP communication and writing it as a script that may be executed in the SLAMD scripting engine.

SLAMD2 is being converted to use a web framework, in this case Struts. This involves separating the HTML generation from the database access code, in short, conversion to MVC. It is a big task, but a fun one. When complete, SLAMD - tentatively called SLAMD3 since I am not very imaginative - will have its display (view) completely separate from the model and the controller. The virtues of this are profound: easy to change the view without mucking about in the database code, easy to localize (only Southern United States English so far, but a Klingon locale is coming), easy to change the model without affecting the view and vice-versa, and a host of other benefits.

Comments:

Post a Comment:
Comments are closed for this entry.

« November 2009
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     
       
Today

Feeds

Search this blog

Links

Weblog menu

Today's referrers

Today's Page Hits: 403