Enhance distributed development with IBM Rational Developer for AIX and Linux Version 9.0

Use x86 developer workstations for core development then port workloads to Power systems running AIX and Linux

IBM® Rational® Developer for AIX® and Linux Version 9.0 allows you to use a single project to develop, build, test, debug, and performance tune your application across multiple systems at the same time. Mike Kucera describes the features that enable distributed development.

Share:

Mike Kucera (mkucera@ca.ibm.com), Software Developer, IBM

author photoMike Kucera is a member of the Rational Developer for AIX and Linux development team.



09 July 2013

Introduction

In version 9.0, IBM® Rational® Developer for Power Systems Software™ has been split into two separate editions with new names, IBM® Rational® Developer for i, and IBM® Rational® Developer for AIX® and Linux. This was done to make the names more descriptive, and because the addition of x86 support expands the capabilities beyond Power® systems.

We now provide a complete distributed development experience that includes the x86 systems for the many shops employing a mixture of x86 and Power workstations. There is full support for both local and remote development on x86 Linux, including editing, building, debugging, performance tuning, and code coverage.

A typical scenario begins by working on an x86 development workstation. As the application matures, an x86 Linux server used for pre-production or performance testing can be added to the project. Then, porting the application to PowerLinux™ or AIX® is as simple as adding that server to the project as well.


Remote projects

Remote projects fall into two categories, synchronized and non-synchronized.

Synchronized project
Keeps a copy of your files on the local workstation and on each server it is connected to. Synchronized projects are required for distributed development.
 
Non-synchronized projects
Used only in certain specific scenarios and only support developing on a single remote server.
 

The first page of the New Local/Remote C/C++ Project Wizard provides four options for choosing a project type:

Local
This type is a synchronized remote project but it starts off targeting the local workstation. Remote connections are meant to be added later.
 
Synchronized
This type is a Synchronized remote project that starts off by connecting to a remote server. Additional remote servers can be added later.
 
Remote Only
This type of remote project is not synchronized. Only one copy of the files is kept on the remote server. This type of project is typically used when there is a restriction on downloading source code files to the developer's workstation. If you do not have this restriction it is recommended to use a synchronized project instead.
 
Network File System
This type is a non-synchronized project where the files are accessed through a network file system such as NFS or Samba. Use this type of project only if you already have access to your project over a network file system and have no need of doing distributed development.
 
Figure 1. The New Remote C/C++ Project Wizard, First Page
4 radio buttons for the 4 types of project

Synchronized remote projects

Distributed development is made possible by synchronized remote projects that allow one project to be targeted at multiple servers. Switching between them is quick and easy. Additional servers can be added to a synchronized project at any time.

A copy of your files is maintained on the local workstation and on each server the project is connected to. When you edit a file, you are editing the local copy. When you save the file, the changes are pushed to the remote servers and the remote copies are updated. If you make a change directly to a remote copy, that change will be detected and you can sync the changes back to the local copy. Usually, only text files are kept in sync. Files generated from a build such as .o files and executables are kept only on the server where they were built and are not copied back to the client.

The local copy of the files is the master copy. If you become disconnected, you can still edit the local copies. When you reconnect, the changes are pushed to the remote copies. Integrated version control systems, such as Rational Team Concert™, work with the local copy.


Local development

Version 9.0 also adds support for developing locally on an x86 Linux workstation. If you start off developing only locally, you should still use a synchronized project, although in this case the files are not actually synchronized yet because you are directly editing the local copies. The advantage of using a synchronized project locally is that you can add a remote server to the project at any time. As soon as you are ready to start testing or porting to a remote server, add it to the project and your files will automatically upload.


Create a synchronized project

There are several ways to create a synchronized project:

  • Start from scratch with an empty project using the New Local/Remote C/C++ Project wizard.
  • Start with existing code that is already on a remote server. Navigate to the folder in the remote systems view, right-click on it and select Import to C/C++ Project. The project files automatically download and become the local copy. Command line version control system is available for use on the remote server.
  • Check out a project from version control. When prompted, convert it to a remote project. When the conversion is complete, the files upload to the remote server.
  • Import a project into the Integrated Development Environment (IDE). The project files copy into the workspace. When prompted, convert the project to remote.

The Remote Reconciler

The Remote Reconciler does the work of keeping files in sync. From the Remote Reconciler View you can see the current status of files that need to be synchronized, push local changes to the corresponding remote files, pull in changes made to files remotely, and kick off builds.

Figure 2. The Remote Reconciler View
three projects located on different hosts

Remote contexts

A remote context is an object that represents a folder on a host. It has the following attributes:

  • A host, which may be remote or the local host.
  • A path on the host file system.
  • Additional configuration options such as environment variables and toolchain settings.

A synchronized project has a list of remote contexts that it synchronizes to. There can also be a single local context for local development. When you create a synchronized project, it starts off with one remote context associated with it. You can add more remote contexts to the project at any time, and the reconciler will synchronize the project files to those contexts as well.

When a project has multiple remote contexts, one of them must be set as the current context. When you perform actions in the IDE, such as launching a build, the command is sent to the current context. You can switch the current context at any time.

By default, the remote reconciler only synchronizes with the current context but it remembers all of the files that have been updated, so when you switch to a new current context it automatically pushes all of the changes since the last time that context was set as current. This behavior allows you to be disconnected from the non-current contexts. You may not want to be connected to all of your remote contexts all of the time.

You can create and work with remote contexts from five places:

  • In the Project Explorer right-click on a synchronized project. A Remote Contexts sub-menu is in the pop-up menu that opens. The current context is selected in the menu. To switch the current context to another, select it. You can also create a new remote context from this menu.
    Figure 3. Remote Contexts Menu in Project Explorer
    remote contexts sub-menu
  • In the Remote Systems View there is a Contexts subsystem that contains all of the contexts on that host. You can expand a context to see all of the files in that location. Right-click on the Contexts subsystem node to create a new context.
    Figure 4. Contexts subsystem
    context subsystem expanded to show all contexts
  • The Remote Contexts View shows all of the remote contexts for the currently selected project or all of the contexts if no project is selected. You can perform actions and see files under the context similar to how you can work with a context in the Remote Systems View. Contexts can be created from the view menu.
    Figure 5. The Remote Contexts View
    two remote contexts on separate hosts
  • In the Remote Reconciler View right-click on a synchronized project. A Remote Contexts sub-menu similar to the one in the Project Explorer opens.
    Figure 6. Remote Contexts Menu in Remote Reconciler
    remote contexts sub-menu
  • In the Properties Page for a remote project, there is a Remote Contexts category. From this area you can create new contexts and edit the remote reconciler preferences.
    Figure 7. Remote Contexts properties page
    properties page showing two remote contexts

Run configurations

To run or debug your application remotely, create a Remote Compiled Application Run Configuration. It is not necessary to create a separate run configuration for each host. When creating the run configuration, select the checkboxes that say Has associated project and Use current context. The path to the executable will be replaced with the variable ${remote_path:project_name}. When the application is launched, it runs on the host of the current context and the path on that host replaces the variable.

Figure 8. Run Configurations Dialog
remote compiled application run configuration

Powerful tools

You now have projects that support multiple hosts. What can you do with them?

Develop

You have a fully featured C/C++ remote development environment. Each host gets its own remote index, meaning that the intelligent tooling (such as search, call hierarchy, type hierarchy, content assist, etc...) correctly interprets that host's environment. Each host can configure its own build macros and use different versions of the compiler with different system headers. Because each host has its own index, the C/C++ tooling behaves correctly regardless of the current context.

Version 9.0 adds several new features to the C/C++ tools:

Remote Rename Refactoring
This feature makes it much easier to rename an identifier in your program.
 
Remote Inactive Code Highlight
This feature marks code that is removed by the preprocessor as inactive and greyed out.
 
Remote Make Targets View
This view makes it easier to work with your makefile.
 
Remote Open Type Dialog
The dialog finds the file and opens it in the editor after entering its name into the dialog.
 

Debug

The IBM® interactive debugger can now be used on x86 Linux machines, including the local host. A single run configuration can be used to set up the debugger across all of the contexts.

Also new for version 9.0 is a command line version of the debugger that works similarly to gdb or dbx. You now have the choice of using the debugger on its own or integrated with the graphic user interface (GUI).

Code Coverage

The code coverage tool can now be used on x86 Linux. This feature makes it easy to determine the effectiveness of your test suites.

Performance Advisor

The Performance Advisor component, which was introduced in Rational Developer for Power Systems Software Version 8.5, has always had support for performance tuning across multiple hosts. Performance Advisor is more flexible than some of the other tools because you don't need to switch your current context in order to performance tune your application on multiple hosts. In fact, you can kick off any number of performance runs on separate hosts at the same time.

Version 9.0 expands the scope of Performance Advisor to include support for performance tuning COBOL and Java applications.


Summary

Rational Developer for AIX and Linux Version 9.0 allows teams that use a mixture of x86 and Power hardware to use a single development environment to work across all of their machines.

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Rational software on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational, DevOps, AIX and UNIX, Linux
ArticleID=936331
ArticleTitle=Enhance distributed development with IBM Rational Developer for AIX and Linux Version 9.0
publish-date=07092013