Conversion MS office to PDF through open source

There is always challenge to convert Microsoft office document to PDF document through open source. I had also some issue when I was working one of the projects and converting Microsoft word doc or Microsoft power point document  to pdf document through open source. Here are some steps to convert Microsoft word document or Microsoft power point document to pdf document through Java application and open source.

Prerequisite Requirements for conversion
1.)    JDK(1.5+)
2.)    Open office version-2.02+(Download from “http://www.openoffice.org/”)
3.)    jodconverter2.2.2 (Download from “http://sourceforge.net/projects/jodconverter/files/”)

Here are steps:-

1.)    install JDK(1.5+) and Open office version-2.02 in your local machine.
2.)    Go to <Open office  install folder>/ program/  folder
3.)    Run this command through MS dos window.

soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard

4.)    Now write the given java code and run

  1. import java.io.File;
  2. import com.artofsolving.jodconverter.DocumentConverter;
  3. import com.artofsolving.jodconverter.openoffice.connection.OpenOfficeConnection;
  4. import com.artofsolving.jodconverter.openoffice.connection.SocketOpenOfficeConnection;
  5. import com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter;
  6. public class MsDocToPdfUtil {
  7. public static void convertDocToPdf(){
  8. try {
  9. File in = new File("C:/test.doc");
  10. OpenOfficeConnection connection = new SocketOpenOfficeConnection(8100);
  11. connection.connect();
  12. DocumentConverter converter = new OpenOfficeDocumentConverter(connection);
  13. File outPutFile = new File("C:/test.pdf");
  14. converter.convert(in,outPutFile);
  15. connection.disconnect();
  16. }catch(Exception ex){
  17. ex.printStackTrace();
  18. }
  19. }
  20. public static void main(String[] args) {
  21. try {
  22. convertDocToPdf();
  23. } catch (Exception ex) {
  24. ex.printStackTrace();
  25. }
  26. }
  27. }

Webservice Spring WS-Security

My previous blog I explain some SOA concept. Now  In this blog I am jumping to some practical and explaining how to setup some basic web services with Spring framework and how to implement some security with web Services. To run this example  you need JDK 1.5+ and spring framework 3.0+I created some basic configuration. Here are list.
1. applicationContext-service.xml — It has some basic configuration of web service in spring
2. HelloWorldWS.java — This class is exposing webservice
3. HelloWorldServiceHandler.java — This class is monitoring incoming request and outgoing message. Here we implement WS-security.
4. HelloWorldManager.java — This class  is interface for business implementation.
5. HelloWorldManagerImpl.java— This class has business implementation.Now lets start how I implemented this web service. here are codes.
1. applicationContext-service.xml
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xmlns:wss="http://jax-ws.dev.java.net/spring/servlet"
  5. xmlns:ws="http://jax-ws.dev.java.net/spring/core"
  6. xsi:schemaLocation="http://www.springframework.org/schema/beans
  7. http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  8. http://jax-ws.dev.java.net/spring/core
  9. http://jax-ws.dev.java.net/spring/core.xsd
  10. http://jax-ws.dev.java.net/spring/servlet
  11. http://jax-ws.dev.java.net/spring/servlet.xsd">
  12. <bean id="constantMap" />
  13. <ws:service id="SOAPservice" bean="#helloWorldWS">
  14. <ws:handlers>
  15. <ref bean="helloWorldHandler" />
  16. </ws:handlers>
  17. </ws:service>
  18. <wss:bindings id="jaxWs">
  19. <wss:bindings>
  20. <wss:binding url="/webservices/HelloWorldService">
  21. <wss:service>
  22. <ref bean="SOAPservice"/>
  23. </wss:service>
  24. </wss:binding>
  25. </wss:bindings>
  26. </wss:bindings>
  27. <bean id="helloWorldHandler">
  28. <property name="constantMap" ref="constantMap" />
  29. </bean>
  30. <!-- Injecting DAO Object -->
  31. <bean id="helloWorldManager">
  32. <property name="target">
  33. <bean>
  34. <property name="userDAO"><ref bean="userDAO"/></property>
  35. </bean>
  36. </property>
  37. </bean>
  38. <bean id="helloWorldWS">
  39. <property name="helloWorldManager"><ref bean="helloWorldManager"/></property>
  40. </bean>
  41. </beans>
2. HelloWorldWS.java

  1. package com.vanrish.service;
  2. import javax.annotation.Resource;
  3. import javax.jws.WebMethod;
  4. import javax.jws.WebParam;
  5. import javax.jws.WebResult;
  6. import javax.jws.WebService;
  7. import javax.jws.soap.SOAPBinding;
  8. import javax.xml.ws.WebServiceContext;
  9. import com.vanrish.service.HelloWorldManager;
  10. import com.vanrish.xml.schema.PeopleInfoRequest;
  11. import com.vanrish.xml.schema.PeopleInfoResponse;
  12. @WebService (targetNamespace="http://www.vanrish.com/helloWorldService",serviceName = "HelloWorldService")
  13. @SOAPBinding(style=SOAPBinding.Style.DOCUMENT, use=SOAPBinding.Use.LITERAL, parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)
  14. public class HelloWorldWS {
  15. private HelloWorldManager helloWorldManager;
  16. @Resource
  17. WebServiceContext context;
  18. @WebMethod(exclude=true)
  19. public void setHelloWorldManager(HelloWorldManager helloWorldManager) {
  20. this.helloWorldManager = helloWorldManager;
  21. }
  22. @WebMethod(operationName = "getPeopleInfo")
  23. @WebResult(name = "PeopleInfo", partName = "PeopleInfo")
  24. public PeopleInfoResponse getPeopleInfo(@WebParam(name = "PeopleInfoRequest", partName = "PeopleInfoRequest",targetNamespace="http://www.vanrish.com/helloWorldService") PeopleInfoRequest peopleInfoRequest) throws Exception {
  25. return helloWorldManager.getPeopleInfo(peopleInfoRequest);
  26. }
  27. }
3. HelloWorldServiceHandler.java
  1. package com.vanrish.service.handler;
  2. import java.io.ByteArrayOutputStream;
  3. import java.util.Iterator;
  4. import java.util.Map;
  5. import java.util.Set;
  6. import javax.xml.namespace.QName;
  7. import javax.xml.soap.SOAPElement;
  8. import javax.xml.soap.SOAPEnvelope;
  9. import javax.xml.soap.SOAPHeader;
  10. import javax.xml.soap.SOAPMessage;
  11. import javax.xml.soap.SOAPPart;
  12. import javax.xml.ws.handler.MessageContext;
  13. import javax.xml.ws.handler.soap.SOAPHandler;
  14. import javax.xml.ws.handler.soap.SOAPMessageContext;
  15. import javax.xml.soap.Name;
  16. import org.apache.commons.logging.Log;
  17. import org.apache.commons.logging.LogFactory;

  18. public class HelloWorldServiceHandler implements SOAPHandler {

  19. private static final Log log = LogFactory.getLog(HelloWorldServiceHandler.class);
  20. /** The Constant USERNAME_TOKEN_STRING. */
  21. private static final String USERNAME_TOKEN_STRING = "UsernameToken";
  22. /** The Constant USERNAME_STRING. */
  23. private static final String USERNAME_STRING = "Username";
  24. /** The Constant PASSWORD_STRING. */
  25. private static final String PASSWORD_STRING = "Password";
  26. private Map constantMap;

  27. public Set getHeaders() {
  28. return null;
  29. }
  30. public void close(MessageContext context) {
  31. }
  32. public boolean handleFault(SOAPMessageContext context) {
  33. logToSystemOut(context);
  34. return true;
  35. }
  36. public boolean handleMessage(SOAPMessageContext context) {
  37. Boolean outboundProperty = (Boolean) context
  38. .get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
  39. boolean isSoapRequestHandle = false;
  40. if (outboundProperty.booleanValue()) {
  41. isSoapRequestHandle = true;
  42. /* ************************************************************************
  43. * If you are manupulating outgoing header then you need to add this code
  44. *
  45. **************************************************************************
  46. * try { SOAPMessage message = context.getMessage();
  47. *
  48. * SOAPPart sp = message.getSOAPPart();
  49. *
  50. * SOAPEnvelope envelope = sp.getEnvelope();
  51. *
  52. * SOAPHeader header = envelope.addHeader();
  53. *
  54. * SOAPElement security = header.addChildElement("Security", "wsse",
  55. * "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
  56. * );
  57. *
  58. * SOAPElement usernameToken =
  59. * security.addChildElement("UsernameToken", "wsse");
  60. * usernameToken.addAttribute(new QName("xmlns:wsu"),
  61. * "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
  62. * );
  63. *
  64. * SOAPElement username = usernameToken.addChildElement("Username",
  65. * "wsse"); username.addTextNode("TestUser");
  66. *
  67. * SOAPElement password = usernameToken.addChildElement("Password",
  68. * "wsse"); password.setAttribute("Type",
  69. * "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"
  70. * ); password.addTextNode("TestPassword");
  71. *
  72. * //Print out the outbound SOAP message to System.out
  73. * message.writeTo(System.out); System.out.println("");
  74. *
  75. *
  76. *
  77. * }catch (Exception e) { e.printStackTrace();
  78. *
  79. * }
  80. */
  81. } else {
  82. try {

  83. SOAPMessage message = context.getMessage();
  84. SOAPPart sp = message.getSOAPPart();
  85. SOAPEnvelope envelope = sp.getEnvelope();
  86. SOAPHeader sh = envelope.getHeader();
  87. isSoapRequestHandle = processSOAPHeader(sh);
  88. message.writeTo(System.out);
  89. if (!isSoapRequestHandle) {

  90. SOAPElement errorMessage = sh.addChildElement(
  91. "errorMessage", "error",
  92. "http://vanrish.com/helloService/error");
  93. SOAPElement error = errorMessage.addChildElement("error");
  94. error.addTextNode("Authentication Failed !!!");
  95. }
  96. } catch (Exception e) {
  97. e.printStackTrace();
  98. }
  99. }
  100. logToSystemOut(context);
  101. return isSoapRequestHandle;
  102. }
  103. private void logToSystemOut(SOAPMessageContext smc) {
  104. Boolean outboundProperty = (Boolean) smc
  105. .get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
  106. if (outboundProperty.booleanValue()) {
  107. log.debug("\nOutgoing message:");
  108. } else {
  109. log.debug("\nIncoming message:");
  110. }
  111. SOAPMessage message = smc.getMessage();
  112. try {
  113. log.debug(handleRequestAndResponse(message));
  114. } catch (Exception e) {
  115. System.out.println("Exception in handler: " + e);
  116. }
  117. }
  118. private String handleRequestAndResponse(SOAPMessage msg) {
  119. ByteArrayOutputStream obj = new ByteArrayOutputStream();
  120. try {
  121. msg.writeTo(obj);
  122. return obj.toString();
  123. } catch (Exception ex) {
  124. obj = null;
  125. ex.printStackTrace();
  126. }
  127. return "";
  128. }
  129. private boolean processSOAPHeader(SOAPHeader sh) {
  130. boolean authenticated = false;
  131. // look for authentication header element inside the HEADER block
  132. Iterator childElems = sh.getChildElements();
  133. SOAPElement child = extractUserNameInfo(childElems);
  134. if (child != null) {
  135. // call method to perform authentication
  136. authenticated = authenticateRequest(child);
  137. }
  138. return authenticated;
  139. }
  140. private SOAPElement extractUserNameInfo(Iterator childElems) {
  141. SOAPElement child = null;
  142. Name sName;
  143. // iterate through child elements
  144. while (childElems.hasNext()) {
  145. Object elem = childElems.next();

  146. if (elem instanceof SOAPElement) {
  147. // Get child element and its name
  148. child = (SOAPElement) elem;
  149. sName = child.getElementName();
  150. // Check whether there is a UserNameToken element
  151. if (!USERNAME_TOKEN_STRING.equalsIgnoreCase(sName
  152. .getLocalName())) {
  153. if (child.getChildElements().hasNext()) { // TODO check
  154. logic
  155. return extractUserNameInfo(child.getChildElements());
  156. }
  157. }
  158. }
  159. }
  160. return child;
  161. }
  162. private boolean authenticateRequest(SOAPElement element) {
  163. boolean authenticated = false;
  164. // variable for user name and password
  165. String userName = null;
  166. String password = null;
  167. Name sName;
  168. // get an iterator on child elements of SOAP element
  169. Iterator childElems = element.getChildElements();
  170. SOAPElement child;
  171. // loop through child elements
  172. while (childElems.hasNext()) {
  173. // get next child element
  174. Object elem = childElems.next();
  175. if (elem instanceof SOAPElement) {
  176. child = (SOAPElement) elem;
  177. // get the name of SOAP element
  178. sName = child.getElementName();
  179. // get the value of username element
  180. if (USERNAME_STRING.equalsIgnoreCase(sName.getLocalName())) {
  181. userName = child.getValue();
  182. } else if (PASSWORD_STRING.equalsIgnoreCase(sName
  183. .getLocalName())) {
  184. // get the value of password element
  185. password = child.getValue();
  186. }
  187. if (userName != null && password != null) {
  188. authenticated = getUserAuth(userName, password);
  189. break;
  190. }
  191. }
  192. }
  193. if (userName == null || password == null) {
  194. log.warn("Username or password is empty. userName : [" + userName
  195. + "], password : [" + password + "]");
  196. }
  197. return authenticated;
  198. }
  199. public Map getConstantMap() {
  200. return constantMap;
  201. }
  202. public void setConstantMap(Map constantMap) {
  203. this.constantMap = constantMap;
  204. }
  205. private boolean getUserAuth(String username, String password) {
  206. //Constant Map populated with database information
  207. String dbUserId = (String) constantMap.get("useIdFormDatabase");
  208. String dbPassword = (String) constantMap
  209. .get("passwordFormDatabase");
  210. if (dbUserId.equalsIgnoreCase(username) && dbPassword.equals(password)) {
  211. return true;
  212. }
  213. return false;
  214. }
  215. }
4. HelloWorldManager.java —
  1. package com.vanrish.service;
  2. import com.vanrish.xml.schema.PeopleInfoRequest;
  3. import com.vanrish.xml.schema.PeopleInfoResponse;
  4. public interface HelloWorldManager {
  5. public PeopleInfoResponse getPeopleInfo(PeopleInfoRequest peopleInfoRequest) throws Exception;
  6. }
5. HelloWorldManagerImpl.java —
  1. package com.vanrish.service.impl;
  2. import java.math.BigDecimal;
  3. import java.math.BigInteger;
  4. import java.util.ArrayList;
  5. import java.util.Calendar;
  6. import java.util.Date;
  7. import java.util.GregorianCalendar;
  8. import java.util.Iterator;
  9. import java.util.List;
  10. import java.util.Map;
  11. import java.util.Set;
  12. import javax.xml.datatype.DatatypeConfigurationException;
  13. import javax.xml.datatype.DatatypeConstants;
  14. import javax.xml.datatype.DatatypeFactory;
  15. import javax.xml.datatype.XMLGregorianCalendar;
  16. import org.apache.commons.logging.Log;
  17. import org.apache.commons.logging.LogFactory;
  18. import org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer;
  19. import com.vanrish.dao.UserDAO;
  20. import com.vanrish.model.PeopleVO;
  21. import com.vanrish.service.HelloWorldManager;
  22. import com.vanrish.xml.schema.ObjectFactory;
  23. import com.vanrish.xml.schema.Person;
  24. import com.vanrish.xml.schema.PeopleInfoRequest;
  25. import com.vanrish.xml.schema.PeopleInfoResponse;
  26. public class HelloWorldManagerImpl implements HelloWorldManager {
  27. private UserDAO userDAO;
  28. public PeopleInfoResponse getPeopleInfo(PeopleInfoRequest peopleInfoRequest) throws Exception {
  29. ObjectFactory factory = new ObjectFactory();
  30. PeopleInfoResponse peopleInfoResponse = factory.createPeopleInfoResponse();
  31. PeopleVO peopleVO = new PeopleVO();
  32. peopleVO.setPeopleId(peopleInfoRequest.getPeopleId());
  33. peopleVO = userDAO.getPeopleInfo(peopleVO);
  34. Person person = factory.createPerson();
  35. person.setFirstName(peopleVO.getFirstName());
  36. person.setLastName(peopleVO.getLastName());
  37. person.setType(peopleVO.getPeopleType());
  38. person.setCreateDate(getXmlDate(peopleVO.getCreateDate()));
  39. peopleInfoResponse.setPerson(person);
  40. peopleInfoResponse.setMessage(SUCCESS_MESSAGE);
  41. peopleInfoResponse.setSuccess(true);
  42. return peopleInfoResponse;
  43. }
  44. private XMLGregorianCalendar getXmlDate(Date date) {
  45. try {
  46. GregorianCalendar cal = new GregorianCalendar();
  47. cal.setTime(date);
  48. XMLGregorianCalendar gc = DatatypeFactory.newInstance().newXMLGregorianCalendar(cal);
  49. gc.setTimezone(DatatypeConstants.FIELD_UNDEFINED);
  50. gc.setTime(DatatypeConstants.FIELD_UNDEFINED,
  51. DatatypeConstants.FIELD_UNDEFINED,
  52. DatatypeConstants.FIELD_UNDEFINED);
  53. return gc;
  54. } catch (DatatypeConfigurationException e) {
  55. log.warn("Cannot format expxiration date: " + date);
  56. return null;
  57. }catch(Exception ex){
  58. log.warn("Cannot format expxiration date: " + ex);
  59. return null;
  60. }
  61. }
  62. public void setUserDAO(UserDAO userDAO) {
  63. this.userDAO = userDAO;
  64. }
  65. }

Cloud Security

Now most of the company wants to embrace cloud computing but security is one of the main concern for these companies. Still CEO or CTO of the companies are feeling uncomfortable to use cloud computing. As an Architect, I also feel this is the one of the main area that cloud based application should focus. According to Gartner, There are seven risk factors for cloud computing.

1. Privileged user access
2. Regulatory compliance
3. Data location
4. Data segregation
5. Recovery
6. Investigative support
7. Long-term viability

There are different levels of risk for different type of cloud. Public cloud is front runner in risk among all other types of cloud.
In top of these risks still companies are thinking about cloud implementation in their organization. Companies are saying, risk is everywhere and you should mitigate these risks or overcome these risks.
Cloud is on demand service by provider to consumer, so there should be good understanding of cloud security between provider and consumer like good service level agreement and contract requirement between provider and consumer.
Here are few points to mitigate risks on cloud.

1. Secure logon – In cloud make sure every user has unique user id with proper authorization on cloud. It should be managed properly and it should access directory structure to provide access control.


2. Encrypted data – When you are accessing data on cloud particularly SAAS on public cloud, data should be properly encrypted and it should follow government privacy law (GLBA, DPPA, FCRA, HIPAA, etc.).

3. Secure Data backup – Data backup is one of the key areas where provider and subscriber should focus about security. There should be clear understanding between provider and subscriber in SLA (Service Level Agreement) about data backup security. There should be secure tool to data transfer, backup data and restore data in cloud.


4. Virtualization Security – Virtualization is back bone of cloud computing. There are multiple risks associated with hardware or software virtualization like VM (Virtual machine) isolation, hypervisor or multi-tenancy. To mitigate risk there should be strong and clear isolation level among different VM. There should be good administrative access and control of VM and also good reporting and logging tool for different VM and administration.

5. Application Security — There are big challenges of application security in different layers of cloud as SAAS, PAAS or IAAS. Application vulnerability is available in almost all level and layer of cloud. To mitigate application vulnerability in cloud we should focus on some of security point as given below.

a) Secure communication between application host machine and consumer.

b) Audit and review the application security on cloud in each level of SDLC (Software
    Development Life Cycle).

c) There should be clear security SLA (Service Level Agreement) of application between
    cloud provider and consumer for each layer of clouds (SAAS, PAAS, and IAAS).

d) Encrypted Application data should transit over network.

What is ESB?

Few days back, one of my friends asked me, what is ESB? How does ESB fit in SOA? It was an interesting question. Let me explain how does ESB work for SOA.

     Initially when organization was going to webservice they were getting issue with integration, orchestration, communication, transaction with services etc. Whenever they were making any change in vendor or services, this change was propagating to code and application. It was big change management for any small change in business or vendor services. It was also taking long time and resources to make any change in business or vendor services. There was no clear SLA (Service Level Agreement) between consumer and service provider.

   ESB (Enterprise Service Bus) gave major contribution to overcome all these issues. ESB is back bone of SOA. It provides pluggable architecture which enables easy decoupling of producer from consumer. It is an extension of EAI (Enterprise Application Integration), an earlier version of middleware, but it adds several other features. ESB is XML based technology. You can define end point, routing rule of message, transaction, or security in xml without doing any line of coding. ESB has clear SLA (Service Level Agreement) between consumer and service provider. Here are the main features of ESB.
1. Service Virtualization – ESB provides loosely couple architecture. You can couple or decouple your services without touching any part of code or services. In ESB you can define end point for each services and their routing rule. You can easily add or remove these services from ESB. Service virtualization gives an ability to define abstract service end point instead of using actual physical address.

2. Service Enablement – Organization were struggling to enable legacy system as services. ESB adapter such as JDBC adapter, Mainframe adapter etc., gives more flexibility to create SOAP based Webservice of any organization. This functionality reduces your IT investments and you can reuse your existing system.

3. Asynchronous Communication – ESB is the key infrastructure for message process and rerouting. ESB provides the platform for asynchronous message with intelligent transformation and rerouting to ensure messages are passed reliably. Services participate in the ESB using either Web services messaging standard or the JMS (Java Messaging System).

4. Protocol Bridging – ESB provides bridging between inbound message and out bound message. Like ESB gets inbound message as HTTP protocol and send to outbound as JMS protocol in one message flow. Both inbound message and outbound message communicate each other without knowing each other protocols.

                       

What is virtualization?

Virtualization concept came in 1960. It was brought by IBM for the Mainframe server to fully utilize hardware resources by logical partitioning them in virtual machine (VM). In 1980’s and 1990’s era, we almost forgot this technology due to rise of desktop and client server computing.
After this era we jumped on distributed computing technology. Company started to use multiple servers to execute their application. Each server took extra space and used more power and cooling which gave rise to extra expenditure cost to run application.
To overcome all this extra expenditure company started to explore virtualization. VM ware is one of the leading companies which provide virtualization. Virtualization is old technology in new box with more powerful resources and options.
Virtualization is the partitioning of not only mainframe server but any physical server into multiple virtual servers. It gives organization maximum utilization of hardware with same CAPEX (ongoing capital expenditure) and OPEX (ongoing Operational expenditure). Each server acts like a real physical server that can run on operating system with just like physical server. Now companies are partitioning their physical server into multiple virtual servers and run their application on virtual servers with same resources and less expenditure.

There are three different types of virtualization
  1.        Hardware virtualization – Hardware virtualization allow us to run different OS (Operating Server) and different servers simultaneously on the same hardware. 
  2.        Desktop virtualization – Desktop virtualization allow us to run different desktop for different users simultaneously on the same hardware.
  3.        Storage virtualization – Storage virtualization is the pooling of physical storage from multiple network devices on the same hardware.

Why SOA?


In my last blog, I explained about SOA. Now, I am going to explain why we need SOA in addition to all existing technologies. Why is business embracing this technology?
Our IT industry is around 40 years old. When IT industry had started, most of the applications were running on Mainframe. Most of the applications were available through centralized server (Mainframe server). Now IT industry is maturing and it is growing from a centralized infrastructure to a distributed infrastructure. Organizations are transitioning from bus computing to cloud computing. There are many software applications, software platforms and operating systems in there market. Business models are also changing very fast. IT industry is also changing along with business models. IT industry has to support both legacy systems and new systems.
 
SOA is a good solution to make a code work with new system and the legacy system at same time. I am summarizing some of the points, why I feel that an organization should implement SOA.

  1. Modular and loosely coupled  — SOA cuts big monolithic systems and services into small modular services. SOA not only disengages the process from system but it also makes loose couple among systems. If, for instance, a SOA implemented organization wants to implement a new service (Internal service, External service or Cloud based services), it can just plug that service or remove that service from the organization system without touching any existing system.
  2. Business Driven  — Now a days, business changes very fast. Mergers and Acquisitions are very common phenomena. Business needs are also changes frequently. There are different permutations and combination coming in market. IT also has to synchronize with all these business permutations and combination. SOA gives flexibility to work with all these changes with minimal effort. SOA is very close to business as well as the business people. One can define or change business process to address business needs in very small time with minimal effort. In short, organization business can change quickly along with the fast changing market.
  3. Platform IndependentSOA is completely platform independent. SOA service client or consumer can use SOA service without knowing SOA service provider platform, language or operating system. So, one can write SOA service without worrying about who is going to consume the service.
  4. Easy Service enablement  — There was big challenge for any organization to make any change in existing legacy system. SOA provides an easy tool to enable existing monolithic application or legacy mainframe system into a SOA service without knowing anything about those systems. Through SOA tool, one can expose interface(s) from existing system as service and use this service in other applications without touching any existing functionality. 
  5. Low Cost development and maintenanceAs I stated earlier, SOA is modular and loosely coupled. So one can implement new service or modify existing service(s) without touching any other service or application. As a result, it takes very small effort and time to make any change in application that uses SOA. SOA also provides the flexibility, such that service can be reused in any other application. For example, if an organization is using third party service (SAAS) for an application, it can reuse this service in other applications without investing on license, server space or maintenance. In other words, if organization builds a service for one application, it can reuse this service in multiple applications.
  6. Easy learning curveSOA is modular and loosely coupled, as such, it has a very easy learning curve. One can start to work on any service without knowing the whole application. SOA technology is completely based on XML and it is one of the easiest technologies and it is accepted by all applications and software.
  7. Increased operational efficiencyTo reuse existing SOA service, one can create new service by using current system or service. In summary, SOA helps us in creating and delivering a new product quickly.     

Types of Cloud Computing

In my earlier post, I explained about cloud? Now I am going to explain about different types of cloud computing and layers of cloud computing.
Based on organization’s business, economy and technical need, we divide Cloud in different category.
Cloud computing is define in three major technology layers. These are SAAS (Software As A service), PAAS (Platform As A Service) and IASS (Infrastructure As A Service).

        1. SAAS (Software As A Service) – This is the top technology layer of Cloud Computing and oldest among these three. Under this layer organization gets fully functional applications on-demand to provide specific services such as email management, CRM, ERP, web conferencing and an increasingly wide range of other applications. These software licenses are managed by Cloud computing company.
      2. PAAS (Platform As A Service) – Second layer of cloud computing is PAAS (Platform As A Service). In this layer organization gets mostly an operating environment to develop application, to run application or to deploy application. PAAS provides operating environment like Java, J2EE, .Net, Window, Linux etc.
      3. IAAS (Infrastructure AS A Service) – This layer provides all basic, physical and virtual resources used in application for any organization. This includes virtual platform (space on server) on which required operating environment and application are deployed. It also includes storage and datacenter.
 In other dimension, there are 4 types of cloud computing service available.  These are Public, Private, Community and Hybrid computing.
      1. Public cloud (External Cloud) – Public cloud is offering service by third party vendor over internet. If any vendor provides infrastructure, data center, search or other service to any organization, then it comes in public cloud type. This type of cloud shares  some benefit like efficiency, High availability, elastic capacity, Low upfront cost, less or no hardware setup and less or no system management.  This type of cloud computing service is provided by Amazon EC2, Microsoft Azure, Sun Microsystem cloud, Salesforce etc.  
      2. Private cloud (Internal cloud) – Private cloud is set up and managed by an enterprise’s own IT department and run inside the organization firewall. If any organization has large number of user and resources, then organization hosts cloud computing within their own firewall. This type of cloud computing is dedicated to that organization. It does not share any resource outside their organization. Any big organization like AT&T, Verizon or Bank of America open their infrastructure or data center near to low cost area and makes the service  available  through their own cloud, then it called as private Cloud computing. It shares some benefit like efficiency, High availability, elastic capacity, Lower cost over time, full access and flexibility, direct control over quality, service and security.
       3. Community cloud (Semi-private cloud) – Community cloud is offering service for similar type of business company. This type of cloud is public cloud but it focuses on same vertical domain companies. Like if any cloud dedicated to government or banking organization and it is serving only those types of organization, then it come as community cloud. It shares some benefit like efficiency, High availability, elastic capacity, expertise in domain knowledge, less cost over time compare to public cloud.
       4. Hybrid cloud (Integrated cloud) – Hybrid cloud is combination of any or all of the other types of cloud.  This type of cloud is  gaining lot of popularity among organizations.  This type of cloud computing give organization more flexibility to manage and share resource between private and public cloud. Like if  any organization host their application in public cloud and during peak sales time they need more server and space to handle this request, they can go for public cloud. In this type of cloud computing Model Company keeps  all sensitive data (transaction or credit card data) in private cloud and less sensitive data in public cloud. It shares  benefits like efficiency, High availability, elastic capacity, more control over quality, service and security, less cost over time compare to public and community cloud.

What is cloud computing?

There are lot of buzz around cloud computing. Almost all big and small companies are talking about cloud computing.
                Cloud computing is service of IT (Information Technology) infrastructure and managed sharing of IT resources.
In network diagram(as shown below) internet icon is displayed like cloud. This typically means an area of the diagram or solution that is some else’s concern. The word Cloud in cloud computing is derived from this diagram.  


To understand more about cloud computing we take a car rent example. User rents a car when he needs. User never worries about car maintenance, insurance or other car expenses, he pays for car rent service only.
 Similar to car rent, cloud computing provides service over the internet.  The beauty of cloud computing is that other company hosts your application. That means they handle the cost of server, maintenance of server and manage software update as per user’s requirement. User pays less for service only. User can increase or decrease service of server as per application requirement. Like user need more server instances in November and December month due to high volume of traffic. So user can demand more server instances for those months only. There is no need to keep all server instances for the whole year. In this way the company saves a lot of money in maintenance of server.
    In summary, Cloud computing provide rapid access to computing at a lower cost of ownership, enabling companies to perform operation that may have previously been unaffordable or impractical.

What is SOA?


Before hitting my blog, probably you heard a lot of time about the SOA buzzword.
SOA is acronym of Service Oriented Architecture.
So now the first thing which hits your mind is, what is service? How it is related with Architect?
Let me explain all these buzzwords and how they are related with each other?
Since I am related with telecommunication world, I am giving simple example how SOA comes in picture when you are activating any phone device.
Like when you buy new phone, you need to activate its number and phone features.
For activating phone user simply calls the customer care or walks to the shop. But behind the scene it communicates with many systems to activate your phone feature based on your requirement and phone device.  
Like some of the features are setting up user information, phone number, email id with phone SMS etc.
All These features are basically Services for that user which he selects or by default he gets with activation.
Now, this service can communicate with each other by n number of way. These services are not necessary to live in same platform of same system. They could be in different environment, different location or different platform.
Now these entire scenarios make your system more complicated.
   To simplify these entire scenarios SOA (Service Oriented Architect) comes in picture.
Web service and Messaging are backbone of SOA. Web service is platform independent, environment independent and location independent.
 SOA (Service Oriented Architect) describes how to communicate (Synchronous or Asynchronous) different service or feature to activate user phone. SOA also gives flexibility when this service need to be invoked and what would be sequence order of these services.