1 The PDF Document

The Future Generation Computer Systems is an ELSEVIER white paper. ELSEVIER is a Dutch publishing and analytics company specializing in scientific, technical, and medical content. It is a part of the RELX Group, known until 2015 as Reed ELSEVIER. Its products include journals such as The Lancet and Cell, the ScienceDirect collection of electronic journals, the Trends and Current Opinion series of journals, the online citation database Scopus, and the ClinicalKey search engine for clinicians. ELSEVIER's products also include digital tools for data-management, instruction, and assessment.

ELSEVIER produces high quality technical documents. The goal of this example is to show how to reproduce such kind of document using Ax FOP library.

The example below shows the the original versus the generated one (not completed).

Original Generated

2 The source code

The following script code shows how to generate the document.

Copy
// ====================================================================
// Return a file or URL
// ====================================================================
function getFile(name)
{
	if (FILE_PATH.startsWith("http"))
		return FILE_PATH + name;
	else
		return new Ax.io.File(FILE_PATH, name).getObject()
}

// ====================================================================
// Get Authors personal copy block
// ====================================================================
function getStaticHeaderBlockAuthorsCopy(root, masterPage) 
{
	root.getStaticContentBefore(masterPage)
		.getWrapper()
		.addBlock("Author's personal copy")
		.setColor("#CCCCCC")
		.setFontSize(14)
		.setFontFamily("Helvetica")
		.setTextAlign("center")
		.setFontWeight("700")
		//.setBorderBottomWidth(.5)
		//.setBorderBottomStyle("solid")
		//.setBorderBottomColor(COLOR_RED)
	;
	return root.getStaticContentBefore(masterPage).getWrapper()
		.addBlockContainer()
			.setHeight(2.0, "cm")
			.setDisplayAlign("after")
			.addBlock().setTextAlignLast("justify").setFontSize(7).setFontFamily("courier");
}


// ====================================================================
// Constants
// ====================================================================

const FILE_PATH         = "https://bitbucket.org/deister/axional-docs-resources/raw/master/FOP/FutureGenerationComputerSystems/";
const PAGE_FIRST        = "FirstPage";
const PAGE_EVEN         = "EvenPage";
const PAGE_ODD          = "OddPage";
const PAGE_DOUBLE_SIDED = "DoublePageMaster";

// ====================================================================
// Define the document using 3 page master pages
// ====================================================================
var root = new Ax.fop.DocumentBuilder()
	.setDebug("")
	.addSimplePageMaster(PAGE_FIRST, 0.5, 0.5, 0.5, 1.0)
	.addSimplePageMaster(PAGE_EVEN,  0.5, 0.5, 0.5, 1.0)
	.addSimplePageMaster(PAGE_ODD,   0.5, 0.5, 0.5, 1.0)
.build();

// ====================================================================
// Add document margins
// ====================================================================
root.getSimplePageMaster(PAGE_FIRST).setMargins(1.5, 1.0, 0.5, 1.0);
root.getSimplePageMaster(PAGE_EVEN).setMargins(1.0, 1.5, 0.5, 1.0);
root.getSimplePageMaster(PAGE_ODD).setMargins(1.5, 1.0, 0.5, 1.0);

// ====================================================================
// Define the page sequence, first, even, odd
// ====================================================================
root.addPageSequenceMaster(PAGE_DOUBLE_SIDED)
	.addSimplePageMaster(PAGE_FIRST, "first")
	.addSimplePageMaster(PAGE_EVEN, "even")
	.addSimplePageMaster(PAGE_ODD, "odd");
	
// ====================================================================
// Add a page sequence. This will generate a FLOW for given name
// ====================================================================

root.addPageSequence(PAGE_DOUBLE_SIDED);

var totalPageNumbeId = root.getPageSequence(PAGE_DOUBLE_SIDED).getTotalPageNumberCitation();

// ====================================================================
// SETUP REGIONS (BODY, HEADER, FOOTER, LEFT, RIGHT)
//
// BODY 2 columns
// ====================================================================

root.getPageMaster(PAGE_FIRST).getRegionBody().setColumnCount(2).setColumnGap(0.5);
root.getPageMaster(PAGE_FIRST).getRegionBefore().setExtent(2.0);

root.getPageMaster(PAGE_EVEN).getRegionBody().setColumnCount(2).setColumnGap(0.5);
root.getPageMaster(PAGE_EVEN).getRegionBefore().setExtent(3.0);

root.getPageMaster(PAGE_ODD).getRegionBody().setColumnCount(2).setColumnGap(0.5);
root.getPageMaster(PAGE_ODD).getRegionBefore().setExtent(3.0);


// ====================================================================
// FIRST PAGE Header static content
// ====================================================================
var header_first = getStaticHeaderBlockAuthorsCopy(root, PAGE_FIRST);

// ====================================================================
// ODD PAGE Header static content
// ====================================================================

var title = "<i>R.N. Calheiros et al. / Future Generation Computer Systems 28 (2012) 861–870</i>";

var header_odd = getStaticHeaderBlockAuthorsCopy(root, PAGE_ODD);
header_odd.setTextAlignLast("justify").build(c => {
	c.addInline()
		.addText(title);
	c.addLeader().setLeaderPattern("dots");
	c.addInline()
		.putPageNumber()
		.addText(" - ")
		.putPageNumberCitation(totalPageNumbeId);
});

// ====================================================================
// EVEN PAGE Header static content
// ====================================================================

var header_even = getStaticHeaderBlockAuthorsCopy(root, PAGE_EVEN);
header_even.setTextAlignLast("justify").build(c => {
	c.addInline()
		.putPageNumber()
		.addText(" - ")
		.putPageNumberCitation(totalPageNumbeId);
	c.addLeader().setLeaderPattern("dots");
	c.addInline()
		.addText(title);
});

// ====================================================================
// Get main flow wrapper and set a default font for all document
// ====================================================================
var wrapper = root
	.getBodyFlow(PAGE_DOUBLE_SIDED)
	.getWrapper()
	.setFontFamily("Candara")
;

// ====================================================================
// Create standard block paragraph formats
// ====================================================================
var p_title     = root.createBlockProperties().setSpaceBefore(10).setFontSize(16 ).setSpan("all");
var p_authors1  = root.createBlockProperties().setSpaceBefore(10).setFontSize(12 ).setSpan("all");
var p_authors2  = root.createBlockProperties().setSpaceBefore( 2).setFontSize(7  ).setFontWeight("100").setFontStyle("italic").setSpan("all");
var p_para      = root.createBlockProperties().setSpaceBefore( 4).setFontSize(9  ).setTextAlign("justify").setTextIndent("10pt"); 
var p_item      = root.createBlockProperties().setSpaceBefore( 4).setFontSize(9  ).setTextAlign("justify"); 
var p_sectionL1 = root.createBlockProperties().setSpaceBefore(10).setFontSize(10 ).setFontWeight("bold")  .setKeepWithNext("always"); 
var p_sectionL2 = root.createBlockProperties().setSpaceBefore(10).setFontSize( 9 ).setFontWeight("normal").setKeepWithNext("always").setFontStyle("italic").setColor("blue"); 
var p_sectionL3 = root.createBlockProperties().setSpaceBefore(10).setFontSize( 9 ).setFontWeight("normal").setKeepWithNext("always").setFontStyle("italic").setColor("blue"); 

// ====================================================================
// 
// START WRITING DOCUMENT CONTENT USING PAGE_DOUBLE_SIDED sequence
//
// FIRST_PAGE, EVEN, ODD, EVEN, ODD ...
// 
// ====================================================================

// ====================================================================
// HEADER
// ====================================================================
wrapper.addBlock()
	.setPaddingAfter(10)
	.setPaddingBefore(5)
	.setSpan("all")
		.addBlock("Future Generation Computer Systems 28 (2012) 861–870")
		.setTextAlign("center")
		.setFontSize(7)
;

// ====================================================================
// BANNER
// ====================================================================
var t_logos = wrapper
	.addBlock()
		.setPaddingAfter(20)
		.setPaddingBefore(5)
		.setSpan("all")
	.addTable()
		.setBorderBottomStyle("solid")
		.setBorderBottomWidth(3);

t_logos.addColumn().setColumnWidth(2.0).setBorderTopStyle("solid").setBorderTopWidth(0.25).setBorderColor("red");
t_logos.addColumn().setBorderTopStyle("solid").setBorderTopWidth(0.25).setBorderColor("green");
t_logos.addColumn().setColumnWidth(2.0);

var r_logos1 = t_logos.getBody().addRow();

// ====================================================================
// COL 1 IMAGE ELSEVIER
// ====================================================================
r_logos1.addCell()
	// Disable inherited border from table cell
	.getBlock()
	.setBorderTopStyle("none")
	.addExternalGraphic(getFile("FutureGenerationComputerS-000.png"))
	.setContentWidth(2.0)
	.setScaling("uniform")
	.setPaddingBefore(4)
;

// ====================================================================
// COL 2 GRAY TABLE
// ====================================================================

var t_logo_contents = 
r_logos1.addCell()
	// Disable inherited border from table cell
	.setBorderTopStyle("none")
	.setPaddingStart(10)
	.setPaddingEnd(10)
	.setPaddingBefore(5)
	.addTable()
	.setBackgroundColor("#DDDDDD")
;
t_logo_contents.addColumn("");
t_logo_contents.getBody().addRow().addCell("Contents lists available at SciVerse ScienceDirect").setTextAlign("center").setFontSize(10).setBlockProgressionDimension("1.0cm");
t_logo_contents.getBody().addRow().addCell("Future Generation Computer Systems").setTextAlign("center").setBlockProgressionDimension("1.0cm").setFontSize(14);
t_logo_contents.getBody().addRow().addCell("journal homepage: www.elsevier.com/locate/fgcs").setTextAlign("center").setFontSize(8);

// ====================================================================
// COL3 IMAGE F-G-C-S
// ====================================================================
r_logos1.addCell()
	.getBlock()
	.addExternalGraphic(getFile("FutureGenerationComputerS-001.png"))
	.setContentWidth(2.0)
	.setScaling("uniform")
;

// ====================================================================
// TITLE, AUTHORS
// ====================================================================

wrapper.addBlock(p_title).addBlock("The Aneka platform and QoS-driven resource provisioning for elastic applications on hybrid Clouds");
wrapper.addBlock(p_authors1).addBlock("Rodrigo N. Calheiros<sup>a</sup>, Christian Vecchiola<sup>a</sup>, Dileban Karunamoorthy<sup>a</sup>, Rajkumar Buyya<sup>a,b,*</sup>");
wrapper.addBlock(p_authors2).addBlock("<sup>a</sup> Cloud Computing and Distributed Systems (CLOUDS) Laboratory, Department of Computer Science and Software Engineering, The University of Melbourne, Australia");
wrapper.addBlock(p_authors2).addBlock("<sup>b</sup> Manjrasoft Private Limited, Melbourne, Australia");

// ====================================================================
// ARTICLE INFO + ABSTRACT
// ====================================================================

// space-after does not work?? but padding-after yes
// space-before works and padding-before yes

var t_article = wrapper
	// Block
	.addBlock()
		.setPaddingAfter(20)
		.setPaddingBefore(5)
		.setSpan("all")
		// Table
		.addTable()
			.setWidth("100%")
			.setPaddingAfter(30)
;

t_article.setWidth("100%");
t_article.setPaddingAfter(30);
t_article.addColumn("").setWidthPercent(25);
t_article.addColumn("").setWidthPercent(5);
t_article.addColumn("").setWidthPercent(70);
t_article.setBorderTopStyle("solid").setBorderTopWidth(0.5);

// ===========================================================================
// ROW 1 (ARTICLE INFO + ABSTRACT)
// ===========================================================================
var t_article_row1 = t_article.getBody().addRow();

// COL 1
t_article_row1.addCell("ARTICLE INFO")
	.setPaddingRight(20)
	.setBorderBottomStyle("solid")
	.setBorderBottomWidth(0.5)
	.setPaddingTop(3)
	.setLineHeight(30)
	.setLetterSpacing(2.5)
;
// COL 2
t_article_row1.addCell("");
// COL 3
t_article_row1.addCell("ABSTRACT")    
	.setBorderBottomStyle("solid")
	.setBorderBottomWidth(0.5)
	.setPaddingTop(3)
	.setLineHeight(30)
	.setLetterSpacing(2.5);

// ===========================================================================
// ROW 2 
// ===========================================================================
var t_article_row2 = t_article.getBody().addRow();

// ---------------------------------------------------------------------------
// COL 1: ARTICLE INFO
// ---------------------------------------------------------------------------
var c_article_cell = t_article_row2.addCell("").setBorderBottomStyle("solid").setBorderBottomWidth(0.5).setBorderBottomColor("blue");

c_article_cell.getBlock().addBlock(
	"<i>Article history:</i>\n" + 
	"Received 1 June 2010\n" +
	"Received in revised form\n" + 
	"4 July 2011\n" + 
	"Accepted 21 July 2011 Available online 29 July 2011"
).setLinefeedTreatment("preserve").setFontSize(7.5).setPaddingTop(5).setPaddingBottom(5).setBorderBottomStyle("solid").setBorderBottomWidth(0.5);

c_article_cell.getBlock().addBlock(
	"<i>Keywords:</i>\n"+
	"Cloud computing\n" +
	"Resource provisioning\n" +
	"Hybrid Clouds\n" +
	"Spot market\n" +
	"Aneka\n"
).setLinefeedTreatment("preserve").setFontSize(7.5).setPaddingTop(5);
	
// ---------------------------------------------------------------------------
// COL 2 (separator)
// ---------------------------------------------------------------------------
t_article_row2.addCell("");

// ---------------------------------------------------------------------------
// COL 3: ABSTRACT
// ---------------------------------------------------------------------------
var t_article_cell3 = t_article_row2.addCell().setPaddingTop(5).setPaddingBottom(5).setBorderBottomStyle("solid").setBorderBottomWidth(0.5);
t_article_cell3.addBlock("Cloud computing alters the way traditional software systems are built and run by introducing a utility- based model for delivering IT infrastructure, platforms, applications, and services. The consolidation of this new paradigm in both enterprises and academia demanded reconsideration in the way IT resources are used, so Cloud computing can be used together with available resources. A case for the utilization of Clouds for increasing the capacity of computing infrastructures is Desktop Grids: these infrastructures typically provide best effort execution of high throughput jobs and other workloads that fit the model of the platform. By enhancing Desktop Grid infrastructures with Cloud resources, it is possible to offer QoS to users, motivating the adoption of Desktop Grids as a viable platform for application execution. In this paper, we describe how Aneka, a platform for developing scalable applications on the Cloud, supports such a vision by provisioning resources from different sources and supporting different application models. We highlight the key concepts and features of Aneka that support the integration between Desktop Grids and Clouds and present an experiment showing the performance of this integration.")
	.setFontSize(8)
	.setTextAlign("justify");
	
t_article_cell3.addBlock("© 2011 Elsevier B.V. All rights reserved")
	.setFontSize(8)
	.setTextAlign("end");

// ====================================================================
// SECTION 1
// ====================================================================
wrapper.addBlock(p_sectionL1, "1. Introduction");

wrapper.addBlock(p_para, "Cloud computing [1] led to an innovative approach in the way in which IT infrastructures, applications, and services are designed, developed, and delivered. It fosters the vision of any IT asset as a utility, which can be consumed on a pay-per- use basis like water, power, and gas. This vision opens new opportunities that significantly change the relationship that enterprises, academia, and end-users have with software and technology. Cloud computing promotes an on-demand model for IT resource provisioning where a resource can be a virtual server, a service, or an application platform.");
wrapper.addBlock(p_para, "Three major service offerings contribute to defining Cloud computing: Infrastructure-as-a-Service (IaaS), Platform-as-a-Service (PaaS), and Software-as-a-Service (SaaS). Infrastructure-as-a- Service providers deliver on-demand components for building IT infrastructure such as storage, bandwidth, and most com- monly virtual servers, which can be further customized with the required software stack for hosting applications. Platform-as-a- Service providers deliver development and runtime environments or applications that are hosted on the Cloud. They allow abstrac- tion of the physical aspects of a distributed system by providing a scalable middleware for the management of application exe- cution and dynamic resource provisioning. Software-as-a-Service providers offer applications and services on-demand, which are ac- cessible through the Web. SaaS applications are multi-tenant and are composed by the integration of different components available over the Internet.");
wrapper.addBlock(p_para, "The offer of different models on which computing resources can be rented creates new perspectives on the way IT infrastructures are used, because Cloud offers the means for increasing IT resource availability whenever necessary, by the time these resources are required, reducing costs related to resource acquisition and maintenance.");
wrapper.addBlock(p_para, "A case for exploring such a feature of Clouds is in Desktop Grids, which are platforms that use idle cycles from desktop machines to achieve high-throughput computing [2]. Typically, applications are executed in such platforms on a best-effort basis, as no guarantees can be given about the availability of individual machines that are part of the platform. If Desktop Grid resources are combined with Cloud resources, a better level of confidence about resource availability can be given to users, and so it is possible to offer some QoS guarantees related to the execution time of applications at a small financial cost.");
wrapper.addBlock(p_para, "Aneka [3] is a Platform-as-a-Service implementation providing a middleware for the development and deployment of applications in private or public Clouds. Unlike earlier frameworks, such as Condor [4] and ProActive [5], Aneka is the first middleware technology to provide a service-oriented container framework that allows realization of different programming models and enables seamless integration of enterprise computing resources (e.g., Desktop Grids and servers) with public Cloud resources. The Aneka framework has been used to implement various programming models including Thread, Task, MapReduce, and deployment of their applications on private and public Clouds seamlessly. It is important to note that Aneka is the first Cloud application platform supporting market-oriented resource provisioning for optimal leasing of resources from public Clouds to minimize the cost for consumers of Aneka applications.");
wrapper.addBlock(p_para, "In a previous work [6], we discussed how Aneka supports scientific applications by allowing provisioning of resources from typical scientific IT infrastructures including Grids and Clouds. This paper extends such a discussion in the context of Desktop Grids, providing a thoroughly description of how Aneka goes beyond what current Desktop Grid platforms offer to users by supporting hybrid Desktop Grids and Clouds and supporting different application models. In summary, the key contributions of this paper are:");
	

wrapper.addBlock(p_item).addListBlock()
	.addItem("\u2022", "It presents the key components of Aneka, its service-oriented container architecture that allows realization of different programming models and enables seamless integration of enterprise computing resources (e.g., Desktop Grids and servers) with public Cloud resources;")
	.addItem("\u2022", "It proposes a new provisioning algorithm that combines Desktop Grids and public Cloud resources in order to execute distributed applications within a user-defined deadline;")
	.addItem("\u2022", "It demonstrates experimentally Aneka and its new provisioning algorithm’s ability to dynamically lease resources to meet deadlines with fewer public Cloud machines and with less budget expenditure than existing approaches by utilizing Amazon EC2 Spot Instance resources.")
;

wrapper.addBlock(p_para, "The rest of the paper is organized as follows: Section 2 presents systems that are related to Aneka; Section 3 describes the general architecture of Aneka and its major components; Section 4 describes how Aneka supports Desktop Grids and how Aneka scales these platforms with Cloud resources with the use of Spot Instances; Section 5 presents experiments aiming at assessing the performance of the middleware when running applications. Finally, Section 6 presents conclusion and further works.");

// ====================================================================
// SECTION 2
// ====================================================================
wrapper.addBlock(p_sectionL1, "2. Related work");

wrapper.addBlock(p_para, "Condor [4] is a Desktop Grid system which was later expanded to support Grid applications. It allows formation of local pools of resources that can exchange resources with other pools, likewise typical Grid middleware. XTremWeb [7] is a Desktop Grid system that allows execution of unmodified applications in idle desktops. Aneka, on the other hand, can manage resources from multiple sources such as desktops, clusters, Grids, and Clouds, both physical and virtual to execute applications with SLA. Moreover, because Aneka was designed to support Cloud environments, management of budget related to execution of applications is performed by the platform itself, while the other approaches cannot manage this aspect because they were designed for Grid environments, that are typically based on cooperation rather economical benefit.");
wrapper.addBlock(p_para, "ProActive [5] is a middleware for parallel, distributed, and multi-core programming. It provides a set of APIs for develop- ment of distributed implementations of different applications, including embarrassingly parallel applications, Monte-Carlo sim- ulations, SPMD, and workflow applications. A distinctive feature of ProActive with respect to the previous frameworks is its abil- ity to harness virtual resources from Cloud computing infrastruc- tures in addition to desktop machines, clusters, and Grids. Even though ProActive supports different programming models and re- sources, it is based on Java architecture and features (such as RMI and classes) for supporting distributed execution of applications, while Aneka provides a service-oriented container model, which allows creation of multiple programming models using its service architecture. As a result of this, Aneka framework has been used to implement various programming models including Thread, Task, MapReduce, and deployment of applications created using these models on private and public Clouds. In addition, Aneka is the first Cloud application platform to support market-oriented resource provisioning for optimal leasing of resources from public Clouds to minimize the cost for consumers of Aneka applications.");
wrapper.addBlock(p_para, "BOINC [8] is a framework for volunteer and Grid computing. It allows turning desktop machines into volunteer computing nodes that are leveraged to run jobs when such machines become inactive. Because it targets volunteer desktops, it strongly relies on tasks replication to achieve reliability in the results. Moreover, job execution is based in best-effort, and few guarantees are given about deadlines for application execution. The later can be achieved by Aneka, because it can provision resources from reliable sources to complement desktop resources if deadlines are not being achieved.");
wrapper.addBlock(p_para, "Falkon [9] is a task execution framework. Together with Swift, a parallel scripting language for scientific applications, it supports the execution of many-task computing applications. It has been mostly designed to support the execution of scientific workflows and parameter sweeping applications and has peta- scale scientific environments as its target infrastructure. Aneka, on the other hand, has been designed to support both scientific and enterprise applications, and it targets private Clouds as the primary infrastructure. Therefore, requirements from both systems are different, which led to different implementation strategies and different capabilities of each system. For example, Falkon does not address the problem of efficient provisioning of Spot Instances resources to applications, as does Aneka.");
wrapper.addBlock(p_para, "H20 [10] is a component-based, service-oriented framework for Grid computing. Similarly to Aneka, it provides a runtime middleware supporting the deployment and discovery of services. Based on a container model similar to the applied on Aneka, H20 aims to be a general framework for integration of services spanning across different administrative boundaries, while Aneka focuses on a single administrative domain with extra resources provisioned from other sources such as public Clouds.");
wrapper.addBlock(p_para, "Ibis [11] is both a programming system and a deployment system for distributed applications. It is composed of a set of APIs allowing users to express applications with different abstractions, such as MPI, master–worker, and workflow. For what concerns the deployment system, Ibis leverages the Grid Application Toolkit [12], which constitutes a uniform interface to several Grid middleware implementations. Aneka supports not only Grids, but also Clouds to supply computing resources for applications. Moreover, Aneka also supports different operating systems and both physical and virtual machines as compute resources, and it is able to efficiently leverage resources from various sources including Spot Instances.");
wrapper.addBlock(p_para, "Regarding the problem of using Spot Instances for execution of applications in the Cloud, Yi et al. [13] propose and compare different checkpointing strategies. In our approach, we apply high bids and hybrid resources rather than checkpointing strategies. Thus, even in case of termination of Spot Instances, tasks running in local resources will complete, and such resources are kept available for running other jobs. Chohan et al. [14] present an analysis on utilization of Spot Instances to speed up execution of MapReduce applications. Such a work focuses on defining costs and benefits of the subject, and no provisioning algorithm to explore such capacity is supplied, while our work presents a provisioning algorithm for combining Desktop Grids and Spot Instances regardless the application model.");
wrapper.addBlock(p_para, "Finally, Mattess et al. [15] presents a provisioning algorithm for extending cluster capacity with Spot Instances. The goal of such algorithm is reducing waiting time of jobs in cluster queues, where users have reservations that define amount of time required by the job and number of resources required by the job. Our approach, on the other hand, is elastic in the sense that amount of resources allocated to a job can change during its execution if this is required for meeting application deadline. Moreover, our provisioning algorithm does not require resources reservation, as does the described one.");

// ====================================================================
// SECTION 3
// ====================================================================
wrapper.addBlock(p_sectionL1, "3. Aneka: a cloud application platform");
wrapper.addBlock(p_para, "Aneka [3] is a framework for development, deployment, and management of Cloud applications. It consists of a scalable Cloud middleware that is deployed on top of heterogeneous computing resources and an extensible collection of services coordinating the execution of applications, monitoring the status of the Cloud, and providing integration with existing Cloud technologies. One of the key advantages of Aneka is its extensible API for development of distributed applications, integration of new capabilities into the Cloud, and support of different types of Clouds: public, private, and hybrid. These features differentiate Aneka from typical infrastructure management software and actually characterize it as a platform for development and deployment of applications.");
wrapper.addBlock(p_para, "In this section we illustrate the architecture of Aneka and de- scribe the fundamental components that constitute the framework by first looking at the structure of the Aneka container and then discussing its various services.");

wrapper.addBlock(p_sectionL2, "3.1. Architecture");
wrapper.addBlock(p_para, "Fig. 1 provides an overview of the components of the framework. The core infrastructure of the system provides a layer allowing the framework to be deployed over different platforms and operating systems. The physical and virtual resources representing the bare metal of the Cloud are managed by the Aneka container, which abstracts the peculiarities of the underlying hardware and hosting operating system to provide a homogeneous runtime environment for applications and services, which are shared among users from the platform.");
wrapper.addBlock(p_para, "The container is installed on each node and constitutes the basic building block of the middleware. A collection of interconnected containers forms the Aneka Cloud: a single domain in which services are made available to users and developers. The container is also the unit of deployment in Aneka Clouds: the middleware is able to scale on demand by dynamically provisioning additional resources and automatically deploying the container on them. Services are the fundamental abstraction by which the features available in the container are implemented. The container features three different classes of services: Fabric Services, Foundation Services, and Application Services. They respectively take care of infrastructure management, cloud middleware, and application management and execution. These services are made available to developers and administrators by the means of the application management and development layer, which includes interfaces and APIs for developing Cloud applications and the management tools and interfaces for controlling Aneka Clouds.");
wrapper.addBlock(p_para, "Aneka implements a service-oriented architecture (SOA) and services are the fundamental components of an Aneka Cloud. They operate at container level and provide developers, users, and administrators with features offered by the framework. Services also constitute the extension and customization point of Aneka Clouds: the platform allows the integration of new services or replacement of the existing ones with a different implementation. The framework includes the basic services for infrastructure and node management, application execution, accounting, and system monitoring.");

wrapper.addBlock(p_sectionL3, "3.1.1. Infrastructure");
wrapper.addBlock(p_para, "The infrastructure of the system is based on the .NET technology and allows the Aneka container to be portable over different platforms and operating systems. Any platform featuring an ECMA-335 (Common Language Infrastructure) [16] compatible environment can host and run an instance of the Aneka container, which is implemented by both Microsoft .NET framework1 (for Windows-based systems) and the Mono open source implementation of the .NET framework2 (for Linux-based systems).");
wrapper.addBlock(p_para, "The Common Language Infrastructure (CLI), which is the specification introduced in the ECMA-335 standard, defines a common runtime environment and application model for execution of programs, but does not provide any interface to access the hardware or to collect performance data from the hosting operating system. Moreover, each operating system has a different organization of the file system and stores that information differently. Aneka’s Platform Abstraction Layer (PAL) addresses this heterogeneity and provides the container with a uniform interface for accessing the relevant hardware and operating system information, thus allowing the rest of the container to run unmodified on any supported platform. The PAL is a small layer of software comprising a detection engine which automatically configures the container at boot time with the platform specific component to access information about the hosting platform.");
wrapper.addBlock(p_para, "Another important function of the PAL is to provide a platform-independent interface for managing the Aneka Cloud infrastructure. The Aneka Cloud is characterized by a network of interacting containers that are deployed on top of both physical and virtual nodes. Each node contains an Aneka Daemon that is responsible for managing multiple instances of the container.");
wrapper.addBlock(p_para, "The architecture of the system is completed by a repository server that makes the Aneka codebase available to the other nodes for updates via different protocols such as HTTP, file share, or other solutions that can be implemented by the administrator. Each Aneka Daemon can be contacted with proper credentials and controlled remotely by means of the management interfaces. All the nodes are also accessible via a management console from which it is possible to deploy new instances of the container and remotely control them through the management API offered by the PAL.");


wrapper.addBlock(p_sectionL3, "3.1.2. Middleware");
wrapper.addBlock(p_para, "The middleware represents the distributed infrastructure constituting Aneka Clouds. It provides a collection of services for interaction with the Cloud. These include monitoring, execution, management, and all the other functions implemented in the framework.");
wrapper.addBlock(p_para, "The middleware is composed of two major components representing the building blocks of Aneka Clouds: the container and the Aneka Daemon. The container represents the unit of deployment of Aneka Clouds and the runtime environment for services and applications. The middleware scales elastically by dynamically adding or removing container instances. The daemon is a management component controlling the container instances installed on a single node (physical or virtual). Its responsibilities are: installing or removing container instances, managing software updates, and dynamically configuring, starting,and stopping container instances. A standard deployment of Aneka is characterized by a single daemon on each node and one or more container instances controlled by the daemon. Multiple installations of the daemon on a single node is useful for deployment of isolated Aneka Clouds on the same physical infrastructure. This is generally not required because Aneka provides ways for partitioning the containers within a Cloud by putting them into separate groups.");
wrapper.addBlock(p_para)
	.setSpan("all")
	.setTextAlign("center")
	.addExternalGraphic(getFile("FutureGenerationComputerS-002.png"))
		.setContentWidth(12.0)
		.setScaling("uniform")
		.setPaddingBefore(20)
		.setPaddingAfter(20)
	;
wrapper.addBlock(p_para, "The Aneka container performs service management tasks, while all the other functions are implemented by using services. Services are self-contained components used to develop a feature that is accessible through the messaging channel made available by the container. There are three major classes of services, and they are:");

wrapper.addBlock(p_item).addListBlock()
	.setProvisionalDistanceBetweenStarts("100pt")
	.setProvisionalLabelSeparation("3pt")
		.addItem("Fabric services:", "Provide access to the resource provision- ing subsystem and to the hardware of the hosting machine. Services in this class include resource provisioning service, hard- ware profiling services, and reservation ser- vice. Reservation is available for users that, for some reason, want to postpone execution of their jobs.")
		.addItem("Foundation services:", "Constitute the pillars of the Aneka middleware and are mostly concerned with provid- ing runtime support for execution of services and applications, providing services such as directory and membership, resource reser- vation, monitoring, storage management, li- censing, accounting, reporting, and billing.")
		.addItem("Application services:", "Consist of services that are directly involved in the execution of distributed applications. Services in this class include scheduling service and execution service.")
;
wrapper.addBlock(p_para, "Finally a collection of transversal services operate at all the levels of the container and provide persistence and security for the runtime environment. Persistence provides support for recording the status of the Cloud. The persistence infrastructure is composed of a collection of storage facilities that can be configured separately for tuning the performance and the quality of service of the Cloud. Aneka provides two different implementations for each storage: in memory and relational database. The former is used for testing environments and provides better performance in terms of speed. The latter provides a more solid and reliable support and can be used over different database management systems.");
wrapper.addBlock(p_para, "The Aneka Cloud is also resilient to failure by providing a multiple-master failover mechanism. This allows the master container to be replicated on multiple nodes in the network, ensuring that an active master is available at all times for monitoring and managing the execution of applications on the Cloud. The failover mechanism is implemented using an election algorithm.");
wrapper.addBlock(p_para, "The security system of Aneka is composed of a central security service that manages users, groups, and resources available in the Cloud and a pair of providers—authentication and authorization providers—that operate at the container level to identify the user and authorize the processing of each message. Authorization and authentication providers can be dynamically configured, thus providing a more flexible infrastructure. The containers in a Cloud also authenticate messages exchanged between each other using a shared secret key that is unique to the Aneka cloud.");
wrapper.addBlock(p_para, "Billing is calculated considering the time that a task occupies a container. Each container (running on a machine) has an associated cost. The bill then is the sum of the cost of the task in the container for all tasks run by the user. Each application in Aneka is associated to a user, thus Aneka tracks usage of resources per user. Moreover,");

// ====================================================================
// GENERATE PDF
// ====================================================================

var fop = root.toFOP();
let pdf = new Ax.fop.Processor().transform(fop);
let doc = new Ax.io.File("/tmp/JS_FutureGenerationComputerSystems.pdf");
doc.write(pdf);
return pdf;