Showing posts with label SOA. Show all posts
Showing posts with label SOA. Show all posts

Friday, January 11, 2008

Improve SOA Performance

SOA Applications Performance are disaster.

Lets assume you want to buy a book using SOA, this means you need to access several times a remote server using web service to complete the transaction, If you work with java then for each web service request you need to parse you java objects to XML objects send the request to the remote server on the other side the XML is parsed back to java objects it do it's stuff and then return a response parse it back to XML you get the XML and parse it back to java objects.

Lets assume that each of this horrible way takes 2 seconds, if you need to send 4 requests to complete the transaction it would take 8 seconds for one small transaction!!!

To improve the performance you would first need to set a well done granularity for your web services if it is possible, For example if to buy a book you first send a request to get the book name by book if and then you send a request with the book name to check if the book exists and then you send another request to buy the book, a better way would be to send one web service request which would do all of the above this would reduce the round trips between the client and the remote server, Instead of parsing XML files 2*3=6 times you would parse only 2 times.

A second way to improve the performance is to cache locally all the read only data which exists in the remote server, so instead of accessing the server using web service you would just read the data from the cache, You can also cache not read only data if you don't necessary need the last-to-update date.

Technical ways to improve the performance is to choose a good performance web service package, some packages take a lot of CPU/Memory to parse the XML to objects and vice-verse.

I recommend this SOA book to learn more:

Saturday, December 8, 2007

Will SOA Succeed?

SOA is hot buzzword in the development community, all the major software companies adopt this buzzword and develop infrastructure to implement it but is SOA is reality or fiction.

The Idea behind SOA (Service Oriented Architecture) is that different services are exposed using Web Services with a specific API, in this development of a new application would just need to write a workflow with steps in which each step would access a different Web Service.

There are several major problems with this SOA idea:

  • Web Service API needs to be appropriate for each client/application which access it, and API can't be appropriate for each client/application.
  • If the Client/Application needs to access several times the Web Service API to complete the task then there are several round-trips with XML-Soap parsing/de-parsing which take a lot of time
  • Performance - Calling an EJB in RMI is much faster then calling Service using Web Service which need to translate objects to XML and XML to objects
  • There is a problem to expose API in Web Service for example an API which get List of Objects and in which each application can be a Polymorphic of another Object, this can't be describe in WSDL file

Links

 
RSS Feeds Submission Directory