© Copyright Maarga Systems, 2015. All rights reserved.
Existing Xpage
On IBM Bluemix / Hybrid
Application
Getting Started
Srinivasan Bakthavatchalam
Sr. Software Engineer
© Copyright Maarga Systems, 2015. All rights reserved.
Table of Contents
I. Introduction to IBM Bluemix ...................................................................................................... 3
II. Hybrid XPages Applications on Bluemix ................................................................................... 4
III. Setting up the environment to work .......................................................................................... 5
IV. Checking the connectivity ............................................................................................................ 6
V. Creating a Simple hybrid Xpage application in Bluemix ........................................................ 7
VI. Checking your Application from Bluemix .............................................................................. 12
VII. Simple data binding .................................................................................................................. 13
VIII. Technical challenges ................................................................................................................ 15
© Copyright Maarga Systems, 2015. All rights reserved.
I. Introduction to IBM Bluemix
Technology is fast evolving and so is cloud. Cloud has changed from just being a storage
system to complete ecosystem allowing business to move towards efficiency and
profitability. World is moving to the cloud to achieve better flexibility, reduce costs, and
enable IT innovation. While taking this important step towards success, organisations
should first understand all the possible ways that can maximise its benefits and minimise
risk. Cloud computing (the cloud) is comprised of three major layers.
Infrastructure as a Service (IaaS) is the foundation that refers to the hardware, storage,
and network capabilities.
Platform as a Service (PaaS) is the middle layer where you build and deliver cloud
applications.
Software as a Service (SaaS) is the top layer that provides business services to
consumers.
In this paper we will try to understand how IBM Bluemix can be leveraged with existing
Xpage application.
IBM Bluemix
IBM Bluemix is a cloud platform for building, running, and managing applications. On
Bluemix, mobile and web developers can easily assemble existing services from IBM or
from third-party providers.
Bluemix is based on Cloud Foundry, an open source PaaS. This layer provides
middleware services such as data management, integration, or workload management.
It provides enterprise-level services that can easily integrate with your cloud applications.
Bluemix also facilitates and accelerates the provisioning of a cloud infrastructure
(storage, network, clustering, virtualization, etc.) so development teams no longer have
to worry about the plumbing (hardware, storage). They can focus on delivering business
value to their clients.
© Copyright Maarga Systems, 2015. All rights reserved.
II. Hybrid XPages Applications on Bluemix
A hybrid application here refers to one that combines a front-end Bluemix cloud
application, with data stored on an external server (server on premises). For XPages, this
means a Bluemix application using the XPages runtime combined with data NSF(s)
hosted on an external private Domino server. The external Domino server could be a
standard on-premises server in your own data centre, or a server running in a cloud
platform like Soft Layer.
The hybrid model is an important solution for production XPages applications as it allows
customers to leverage their existing NSF data and Domino directory from within Bluemix
applications using the very latest XPages runtime. Of course the XPages Bluemix
application can also leverage the host of available Bluemix services, all in all it represents
a real opportunity to truly modernize existing Notes client applications.
Image title
© Copyright Maarga Systems, 2015. All rights reserved.
III. Setting up the environment to work
Below are the Steps to set up the working environment.
1. Make sure that have a Domino designer 9.0.1 installed
2. Install the XPages Extension Library to Designer, release 901_v15. This library
release installs the new Bluemix tooling. You can get it from OpenNTF
3. If you are new to Bluemix, create a new Bluemix account. SIGN-IN
4. That’s it you are almost done
Image title
© Copyright Maarga Systems, 2015. All rights reserved.
IV. Checking the connectivity
1. Open the Domino Designer
2. Navigate to File -> preference
3. As shown in the above image select the IBM Bluemix, and configure the
appropriate values
4. Then click on test connection button. On success you will be getting the
Connection success dialogue box
© Copyright Maarga Systems, 2015. All rights reserved.
5. If you are getting an Error message as “Peer Authentication Failure” then
install the Fix pack for notes 9.0.1. This will resolve your issue
V. Creating a Simple hybrid Xpage application in
Bluemix
As described earlier, hybrid Xpage application to one that combines a front-
end Bluemix cloud application, with data stored on an external server (server
on premises). So our first step would be to separate the design and the data
from our existing application.
1. Create two new copy of the database that you want to host on Bluemix
2. One copy will be our design part and other will be our data.
3. In the design part make sure that you have the Xpages and custom control.
Delete other design elements in the design copy
4. In the data copy make sure that you have the all the design elements
except the Xpages and Custom Control (This will be residing in our
premises)
5. Now log in to you Bluemix account and start creating an xsp runtime
container. You could fine the Xsp Run time container in the Bluemix
catalogue
© Copyright Maarga Systems, 2015. All rights reserved.
6. After creating it download the source code by clicking on the start coding
link in the left menu
7. Now come back to your Domino Designer and select Tools Import IBM
Bluemix Starter Code. Follow the steps as instructed by uploading the
starter code that you have downloaded from blue mix
© Copyright Maarga Systems, 2015. All rights reserved.
8. Once after you complete, you will be able to see the Todo_design.nsf (this
name may differ) on your Application pane on your designer.
9. Do a normal replace design to this Todo_deign.nsf with the design copy of
the existing Xpage application that you have taken in the step 3
10. That’s it your design part is ready.
11. You now need to configure your data part to this design.
12. First open the File Preference Domino Designer IBM Bluemix
© Copyright Maarga Systems, 2015. All rights reserved.
13. If you are not familiar with creating a Trusted Server ID then kindly refer
the link creating a Trusted Server ID.
Note:
Make sure that this server ID that has been created is trusted by the
on-premises server (server on which your data resides).
The idea behind uploading this ID is that, your Bluemix run time sever
were your design resides will be logged in with this ID and from this ID
© Copyright Maarga Systems, 2015. All rights reserved.
Bluemix automatically make a cross certification of your organization
address book.
So now your run time container is signed with the ID that you have
uploaded and that will make a talk to your on premises server.
14. So after that log-in to your designer with the trusted server ID that you
have created recently.
15. Sign in the design elements of the application (NSF that has your xpage
and custom control alone) with the trusted server ID.
16. Now open the IBM Bluemix Manifest from the Application configuration
and the click on the edit button under the Hybrid Configuration part, then
click on “Load Default Configuration”.
© Copyright Maarga Systems, 2015. All rights reserved.
17. Finally click on Finish.
18. You can now deploy the application to Bluemix by right clicking on the
application IBM Bluemix Deploy Application.
19. You will now receive a Deployment successful message box after
deployment is done.
1
2
VI. Checking your Application from Bluemix
1. Once done with deploying, then log on to IBM Bluemix and check whether
the app is running.
2. The green Light indicates that your app is up and running.
3. Now click on the link near the application name to run it.
4. You will be redirected to the IBM Bluemix log in page based on the ACL in
your application (Make sure that you have the Anonymous as no access).
© Copyright Maarga Systems, 2015. All rights reserved.
5. You can now use your own Domino web login that you have used
previously to log in to the system.
6. If you are able to login successfully without any issue, then you have
successfully set up a hybrid application which has its data on the on-
premises server and design hosted in Bluemix
VII. Simple data binding
1. We now need to bind the forms and views in our on-premises server to
the Xpages in the Bluemix.
2. Simple you can just change the database in the binding session to the
database in Bluemix as below.
© Copyright Maarga Systems, 2015. All rights reserved.
3. This “getApp_REMOTE_DATA_SERVER_ADDRESS” will have the values
that you have configured in the on-premises server address (our case it
will be as eapps.maargasystems.com )
4. To know detail about this environmental variable, you can view it in your
application at Bluemix.
© Copyright Maarga Systems, 2015. All rights reserved.
5. The same detail will also be available in the IBM Bluemix Manifest file.
6. So you can do the same for data binding to a view / panel and so.
VIII. Technical challenges
1. There were two block that I have faced while setting up the environments
a. While testing the connection as mentioned in “Checking
Connectivity” session. If you are getting an Error message as “Peer
Authentication Failure” then install the Fix pack for notes 9.0.1. This
will resolve your issue.
b. Then while connecting the on-premises database to the IBM
Bluemix run time container. I got the below error in IBM Technical
Console
Directory Assistance could not access Directory X.XX.XXX.XX names.nsf, error: Unable to find path to
server. Check that your network connection is working. If you have a working connection, go to
Preferences - Notes Ports and click Trace to discover where it breaks down.
© Copyright Maarga Systems, 2015. All rights reserved.
c. If you encounter the same issue, make sure that the fully qualified
host name and TCPIP port are mentioned correctly in Server
Document. Correcting this resolved my issue.
d. You can check the log of the Bluemix server from
2. The system was relatively slow in response.
About Maarga
Maarga Systems is a 11-year-old IBM Premier Partner specializing in Notes/Domino Application
Development and Infrastructure Management. Our customers are spread all over the world including
Coca Cola, Panasonic, Allianz, BT to name a few. Developed after observing over 500 workflows, our unique
XFactory framework cuts down a typical app development timeframe by 50%. Additionally, our 50 Lotus
Certified professionals, 2 Fortune 500 IBM Published Case Studies and 24/7 operation serving 30
countries makes us the largest Notes development firm out of India. Maarga brings a blend of process
driven factory approach and business-savvy consulting to its engagements to deliver rapid value to
customers at the most efficient cost structures. Maarga has an extended eco-system of partners it is
deeply associated with and has access to multiple other technology capabilities through this eco-system,
including .NET, SharePoint, PHP, Graphics Design, iOS, Google AppEngine etc.
Know More: (www.maargasystems.com)