+ All Categories
Home > Documents > Metadata is read and validated X++ source code is converted to p-code and saved Error logs are...

Metadata is read and validated X++ source code is converted to p-code and saved Error logs are...

Date post: 22-Dec-2015
Category:
Upload: octavia-small
View: 218 times
Download: 0 times
Share this document with a friend
Popular Tags:
27
Microsoft Dynamics AX Technical Conference February 3–5, 2014 Bellevue, WA
Transcript

Microsoft Dynamics AX Technical ConferenceFebruary 3–5, 2014Bellevue, WA

Create Dynamics AX builds using the new X++ server-side parallel compilerMarcos Calderon Macias, Senior Software EngineerRobert Badawy, Senior Program Manager

IntroductionWe are excited to share Microsoft Dynamics AX 2012 R3 with you…• This presentation contains Microsoft confidential information• Dynamics AX 2012 R3 is pre-release software and subject to change• Microsoft provides no license, express or implied, in this presentation• Please review and respect the disclaimer included in all printed

and electronically distributed materials

Session Agenda

Overview of X++ compiler and

recent improvements

Demo of new X++ Server Side

Compiler

Creating AX builds:

A review of best practices

Links to related resources

Assumptions

This Session Assumes the Following• Audience is familiar with Microsoft

Dynamics AX Development and AX components like MorphX, AOS and SQL model store.

• Audience is familiar with source control and TFS

• Audience is familiar with AX Models

Overview of X++ compiler and recent improvements

X++ compiler performance • X++ compiler performance is the

bottleneck of build and installation scenarios in many organizations

• Some simple tricks can be applied to minimize the compilation time (pre cu7)• One single machine deployment: SQL Server, Application Object Server (AOS) and

Client in one box.• Memory Availability of minimum 16 GBs.• Do not constrain SQL Server memory consumption. • Install KB2844240 Hotfix [AX2012 R2]. Index optimizations.• Fast speed CPU helps, multiple CPU’s do not. • Solid State Drive helps.

How the Microsoft Dynamics AX compiler works

• Metadata is read and validated

• X++ source code is converted to p-code and saved

• Error logs are created

Phase 1Types and signatures compilation

Phase 2Bodies compilation and p-code

generation

Phase 3Phase 2 is re-executed, but only for

elements with errors

How the Microsoft Dynamics AX compiler works

• Compilation happens on the client.

• Metadata is exchanged from SQL all the way to the client and back to SQL

• Compiler is single threaded

Metadata

Application Object Server (AOS)

Client (MorphX)

AX 2012 R2 CU7 And AX2012 R3 Compilation Improvements

One tier

Metadata

AOS

• Compilation happens on the AOS (no metadata exchange)

• X++ execution during compilation has been reduced (output log)

• 64 bit process• Single threaded

compilation• ~30% performance

boost

Demo

New Server Side X++ Compiler

AX 2012 R2 CU7 And AX2012 R3 Compilation Improvements

AXBuild.exe is a new stand-alone command line tool, to coordinate multiple AOS in the same box to complete a full compilation in parallel

Parallelization

Metadata

AOS AOS AOS

Microsoft Dynamics AX

Build

Creating AX builds: A review of best practices

Recommended Development Topology

Private AOS Topology with TFS• A private AOS topology is a setup

where each developer has his or her own Microsoft Dynamics AX client, AOS instance, model database, and business database.

• Artifacts are synchronized between developers using a supported version control system like TFS

Development Lifecycle Flowchart

Administrator: Setup TFS

Administrator: Configure Version

Control for AX Development (Build

Computer)

Administrator: Add Model (s) to Version

Control (Build Computer)

Administrator: Apply a Label to Latest

Version of Source Files

Administrator: Create AX Build

(Build Computer)

Periodic

Developer: Deploy Build

As needed

Developer: Check out, Check in and

Get Latest

Need new clean build?Yes

Developer: Synchronize to

Latest

No

Developer: Configure Version

Control on Developer Computer

AX BuildsCreate an AX Build on the Build Computer• An AX Build is created from a collection of source files

residing in the central TFS repository (XPO files, VS Projects, label files).

• Source files that share a common TFS “label” constitute a specific version (build) of an AX model or application. (Example: label = v1.0.2.1)

• Any Developer should be able to deploy a specific AX build or synchronize their AX environment to that build.

• It is recommended to dedicate a one-box installation of AX to be a build computer, where an administrator creates daily/periodic builds of the AX application.

Creating AX Builds: Core Steps (1)1. Sync your local repository files to the latest version of your

model(s) files• Use Team Explorer or use the TFS get command

2. Set the build label (Take a snapshot of your files)• Example: tf label “1.0.0.101” c:\<ProjectName>\

PrimaryAXApplication\ModelA /recursive 3. Stop the AOS4. Delete the current version of your models5. Start the AOS6. Synchronize the business database• ax32.exe startupcmd=synchronize

7. Stop the AOS8. Create new blank models

Creating AX Builds: Core Steps (2)9. Generate the combined import XPO artifact from the individual

XPOs (Use the tool combineXPOs.exe)10. Start the AOS11. Load Label (.ald) files into AX when applicable

ax32.exe -startupcmd=aldimport_<label_file>12. Load combined XPOs into AX using ax32Serv.exe

Ax32Serv.exe -console 01 [email protected] -aol="%Layer%" -AOTIMPORTFILE=%xpoFile% nocompile

13. Compile the application using AXBuild.exe14.Build and import AX Visual Studio projects (using MSbuild) when

applicable15.Rebuild application (AXBuild.exe)** then perform CIL compilation.16.Run database synchronization (DB sync), as above17.Export your model(s) to a model file(s).

Demo

Demo results and performance

Performance test resultsConfiguration• MorphX client, AOS and SQL Server installed on the same computer.• 4 Cores 3.7 GHz. Hyper-Threading enabled, which logically doubles the CPU count.• 32 Gigabytes of physical active memory.• 6.0 Gigabits/s SATA Controller• Windows Server 2012• SQL Server 2012 Enterprise with SP1 (no memory constraint)• Windows virtual page caching disabled.• Fresh AX 2012 R2, with cu7 installed.

Results • Compilation using AXBuild.exe running 9 AOS workers: About 12 minutes.• Compilation using MorphX client (for comparison): 2 hours and 10 minutes.

Both measurements were done using the same hardware and setup.

Links to related resources

AXBuild.exe: More details?Official documentation for the toolhttp://msdn.microsoft.com/library/d6da631b-6a9d-42c0-9ffe-26c5bfb488e3.aspx

Blog post that explains the architecture of the toolhttp://blogs.msdn.com/b/axtools/archive/2013/11/04/parallel-x-compilation-for-microsoft-dynamics-ax2012-r2-in-cumulative-update-7.aspx

Change management and TFS integration for multi-developer projects (white paper)• This white paper describes in details tasks and best practices that are related to

development life cycle management in Microsoft Dynamics AX 2012. It is located on information source at this link.

• It focuses on TFS integration, creation of AX builds, and deployment on development environments.

Deploying Customizations Across Microsoft Dynamics AX 2012 Environments (White paper)• Deployment best practices, located at this link.

Development Lifecycle: More Details?

Windows PowerShell® (PS) Scripts• PS scripts that automate the creation and deployment of AX builds are located in

the Windows PowerShell gallery.• These scripts can handle multiple models, multiple layers, and dependencies on

external models and assemblies

CombineXPO Tool• Installed with Microsoft Dynamics AX management utilities.

Development Lifecycle: More Details?

THANK YOU for attending! Your feedback is extremely important, please complete an evaluation using one of the following options:

• On the fly from the mobile event app• Communications Kiosks located in the Evergreen Foyer, Grand

Ballroom Foyer and Regency Foyer

• Via the Dynamics AX Technical Conference website: www.microsoft.com/dynamics/axtechconference

DisclaimerThis presentation contains Microsoft Confidential Information. Microsoft may use any suggestions, comments, or other feedback that you provide for any purpose without obligation. This presentation is provided for informational and training purposes only. It represents Microsoft’s view as of the presentation date. Microsoft cannot guarantee the accuracy of any information after the presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted as a commitment on Microsoft’s part. This presentation is provided “as-is”.

Microsoft Dynamics AX 2012 R3 is pre-release software under development. All dates, features, and descriptions specified are preliminary, are based on current expectations, and are subject to change at any time without notice.

Sample code included in this presentation is made available AS IS.  THE ENTIRE RISK OF THE USE OR THE RESULTS FROM THE USE OF ANY SAMPLE CODE REMAINS WITH THE USER.

MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. NO LICENSE (EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE) TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS PRESENTATION.

© 2014 Microsoft Corporation. All rights reserved.

© 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


Recommended