Archive for the ‘SOA’ Category

It’s been a while since I posted my last note over here. It is a year with changes in my work life. As you may know Ebay has decided to minimize the effort dedicated to its open source platform, at least to TurmericSOA. As a consequence, the permanent staff they had assigned to TurmericSOA were extremely downsized to 1 resource.

Although Turmeric was an open source project, and as most of the Open Source initiatives, the developers were salaried, and full time dedicated. Due to the above taken decision, the coworkers in this project , me included, have bound in looking for new horizons.

TurmericSOA is still alive, is there….in Git repo, in forums, in IRC channel, all these resources are still alive, in fact, I do my humble contributions from time to time.
Some months ago I read an article from my friend Dave talking about the rod for measuring success. I totally agree with dave that success is not popularity neither viceversa, but we can’t avoid that outside doors work is a critical leverage, letting know the industry what you can offer them, namely the project broadcast strategy. That strategy takes its time,  depending on what your product is, this “time” could extend from one month to several years, in particular if we’re dealing with open source projects. If we only consider the TurmericSOA’s “broadcast strategy time”, in my opinion is was to early to leave that project adrift the open source community, but who knows, big company decisions have been always a Pandora’s box, and naturally, there must be some upper management decision that we’ll never know.
I honestly wish the best to TurmericSOA project and off course to each of whom collaborate with us. People from Jetty, Intalio and eBay itself, WSO2, MuleSoft guys, in particular to Manuel Chinea, Dave “kingargyle” Carver, Adam Lieber, Tiago Espinha, Jan Bartel, Michael Govoroy and Sastry Mallady

see you soon….

RESTful requests with TurmericSOA

Posted: December 12, 2011 in REST, SOA, Turmeric

This time I’m gonna write about how to play in Turmeric with RESTful requests.

First of all we need a deployed service, any, in our Web Server, in my case Jetty 7, indeed, I use jetty-turmeric , this is a customized Jetty for running our Turmeric engine and deploying services in one or two simple steps…basically for simple but comprehensive tests.

The service I use is a sample EchoService, already included under the Turmeric Runtime module. So, under our WebServer/webapp folder we have a folder called example-echoservice. example-echoservice


|----META-INF
|----WEB-INF
        |-----classes
        |-----lib
               |-----ExampleEchoServiceV1-1.0.1.0-SNAPSHOT.jar
               |-----ExampleEchoServiceV1Impl-1.0.1.0-SNAPSHOT.jar
        |-----web.xml
|----index.html

Our web.xml deployment file should look like this:


<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
metadata-complete="false"
version="2.5">
<display-name>Spfservlet Test</display-name>
<servlet>
<description>ExampleEchoServiceV1</description>
<display-name>ExampleEchoServiceV1</display-name>
<servlet-name>ExampleEchoServiceV1</servlet-name>
<servlet-class>org.ebayopensource.turmeric.runtime.spf.pipeline.SPFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<init-param>
<param-name>SOA_SERVICE_NAME</param-name>
<param-value>ExampleEchoServiceV1</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>ExampleEchoServiceV1</servlet-name>
<url-pattern>/ExampleEchoServiceV1</url-pattern>
</servlet-mapping>
</web-app>

The included Echo sample is ready to be deployed, so after copy/paste this project under our jetty-turmeric, the service could be achieved through: http://localhost:8080/example-echoservice/ExampleEchoServiceV1?echo&echoText=Hello and the response should be similar as:

<echoResponse>
<ack>Success</ack>
<output>HelloGuest</output>
</echoResponse>

Now, let’s review the main config file in this scenario, that is the ServiceConfig.xml under the ExampleEchoServiceV1Impl.jar By default it comes with a very simple an basic turmeric configuration:


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<service-config xmlns="http://www.ebayopensource.org/turmeric/common/config">
<service-impl-class-name>org.ebayopensource.turmeric.example.v1.services.echoservice.impl.ExampleEchoServiceV1Impl</service-impl-class-name>
<service-interface-class-name>org.ebayopensource.turmeric.example.v1.services.echoservice.ExampleEchoServiceV1</service-interface-class-name>
<service-instance-config>
<provider-options>
<header-mapping-options>
<option name="X-TURMERIC-OPERATION-NAME">queryop</option>
<option name="X-TURMERIC-RESPONSE-DATA-FORMAT">query[format]</option>
</header-mapping-options>
</provider-options>

<protocol-processor version="1.1" name="SOAP11">
<indicator>
<transport-header name="X-TURMERIC-MESSAGE-PROTOCOL">SOAP11</transport-header>
</indicator>
<class-name>org.ebayopensource.turmeric.runtime.spf.impl.protocolprocessor.soap.ServerSOAPProtocolProcessor</class-name>
</protocol-processor>
<protocol-processor version="1.2" name="SOAP12">
<indicator>
<transport-header name="X-TURMERIC-MESSAGE-PROTOCOL">SOAP12</transport-header>
</indicator>
<class-name>org.ebayopensource.turmeric.runtime.spf.impl.protocolprocessor.soap.ServerSOAPProtocolProcessor</class-name>
</protocol-processor>
</service-instance-config>
</service-config>
<pre>

We have three main tag blocks here, lets forget the protocol-processor for now, they are SOAP related protocols, not usefull in our REST scenario…

Then, according this Turmeric wiki page, there some required parameters when we make a service call, but if we recall our endpoint (http://localhost:8080/example-echoservice/ExampleEchoServiceV1?echo&echoText=Hello) seems we forgot the X-TURMERIC-OPERATION-NAME. That is the purpose of queryop value in header-mapping-options, it automatically retrieves the first request parameter as the operation name, so we could replace an original and longer URL request http://localhost:8080/example-echoservice/ExampleEchoServiceV1?X-TURMERIC-OPERATION-NAME=echo&echoText=Hello by http://localhost:8080/example-echoservice/ExampleEchoServiceV1?echo&echoText=Hello.

In addition, one of our followers wants to achieve the service through this endpoint instead: http://localhost:8080/example-echoservice/ExampleEchoServiceV1/echo/Hello                <— pay attention, there is no question mark to specify the parameters

So, there are two simple steps you want to perform, first of all you need to update your deployment descriptor file for a propper intrepretation of your new URL, that is adding a wild card in your Servlet Mapping:

<servlet-mapping>
<servlet-name>ExampleEchoServiceV1</servlet-name>
<url-pattern>/ExampleEchoServiceV1/*</url-pattern>
</servlet-mapping>

Next step is to update the ServiceConfig.xml in order to read the latest word in our URL word as the echoText parameter, this tag section must be added following the header-mapping-options


<request-params-mapping>
<operation name="echo">
<option name="echoText">path[3]</option>
</operation>
</request-params-mapping>

That will read the 3rd expression in our URL

Please surf here for more info about URL mapping under REST request.

Also you can specify a pipeline process into the ServiceConfig.xml to provide Authentication, Rate Limiter capabilities or maybe custom handler to improve your service governance, but this  deserves another post 🙂


Hi, I’m back. It has been a long time I don’t have the chance to write some lines over here. It has been a pretty working hard month focused in last release, btw, it is coming in next days.  Today I’m writing these few lines to invite you to the next Turmeric SOA show. I’ll will be there, showing an introduction of TurmericSOA to my Argentinean mates. Yes, this time Turmeric lands in Argentina. November 1st, at the Argentinean Java User Group annual event at ITBA, Buenos Aires.

Will be some other interesting talks during the event, such us “Challenges creating a iPaaS,scalability in MongoDB , pros & cons around ElasticSearch/Fume”  by Dan Diephouse from MuleSoft; “Uses and guidelines around Kanban development method” by Paulo Caroli from Thoughtworks.

I hope you have the chance to participate in this annual event. For more information surf in the Argentinean Java User Group home page . Also if you are interested in participate as presenter/attendee, do not hesitate to contact me

See you soon!!

An improvement of JAXB

Posted: April 25, 2011 in eBayOpenSource, JAXB, SOA, Turmeric

Highly Performance is one of the key aspects of Runtime Core within the eBay SOA Platform. Are you interested in how this platform deals with message protocol conversions??

I’m pretty sure you know (or at least someday you’ve googled) what JBI is.
This is a nice and complete definition about it: JBI (Java Business Integration) is a Java-based standard that defines a runtime architecture for plugins to interoperate via a mediated message exchange model. This mediated message exchange model was simply adopted from the WSDL 2.0 spec’s message exchange patterns (MEPs). Messages between components are mediated by the Normalized Message Router (NMR). The NMR serves as an intermediary for routing messages amongst plugins, no matter where that component resides. Plugins do not communicate directly with one another; they only communicate with the NMR. This provides location transparency for the plugins.

In other words, JBI receives the incoming messages, normalize them in a common protocol, sent it to a NMR and finally the inverse process, it dinormalize the messages in order to send it to the requester.

All this process naturally takes some time, but, there is any way to reduce this time without loose the polymorphism and flexibility?? We need to take a look at Turmeric Platform code to know the answer.

More than JBI; with the natively normalization and dinormalization the incoming messages do not need bridge conversions.

Data could be received in XML, it could be received in NV, JSON or Binary XML for attachments with the use of Message Transmission Optimization Mechanism, MTOM.

Turmeric uses an architecture based in JABX, Java Architecture for Binding XML.

JAXB implementation at Turmeric

JAXB performs it process of marshalling and unmarshaling by the use of the standard Stax Parses (Streaming API for XML), XMLStreamReader and XMLStreamWriter interfaces. So, in Turmeric there are specific stream readers and stream writers implementations for each protocol that Turmeric runtime supports. There is a JSON Stream Reader and Stream Writer, and the same for NV and for Binary XML.
So, once JAXB receives the events, it calls to the corresponding Reader and Writer. That is, when an incoming message is in JSON format for example it calls to JSONStreamReader and it will call the corresponding Writer as consumer service wants; if it wants in NV, then JAXB will call NVStreamWriter.

This is one of the tech secrets under Turmeric, which grant the ability to support multiple protocols and data formats with an overhead below of 10 millisecs

Hi,

Next April 27th and 28th the largest International Symposium on SOA and Cloud Computing will take place in Brasilia, Brazil. Click here to surf in the official site. On Wednesday 28th I’m going to present you the project in which we have been working during last months, Turmeric .

see u there..!

Turmeric 1.0.0 Beta Release Candidate 1 is out and available. More information about the release can be found on the Release Notes page.

Hi!

Today starts the EclipseCon 2011 in Santa Clara, California. If you have a chance to attend these conferences do not hesitate to get into the Product Showcase Ballroom E on Wednesday 17th. There, Dave Carver and Sastry Mallady, the 2 renowned gurus, will be introducing us Turmeric and what development tools have been created for eclipse around the turmeric framework.

Enjoy it!!

…. let’s resume  the Consumer creation process.

My first attempt to run the consumer throw an Server internal exception, as a result Error 500. WTF! I pasted the url at my FF browser and the answer appeared: “Missing SOA operation name header”. Browsing the eBay doco I found that I need to add at least 2 http headers to my request. (for eBay service interaction, I recommend you to take a look at eBay’s devzone site ). The headers are:

  • OPERATION-NAME: The name of the call you are using (for example, findItemsAdvanced or getHistograms).
  • SECURITY-APPNAME: This is the application ID (AppID) for the service consumer. You obtain an AppID by joining the eBay Developers Program.

As it request, I had to join the eBay program. Simple process with the exception of the fully complex password it requires, despite you want to play in his sandbox environment. Btw, do you remember when I added a new environment at Consumer creation wizard?? (part I).

Now, with a eBay sandbox user, let’s set the headers.

Under your META-INF/soa/client/config/FindingServiceV1Consumer/sandbox/ you will find the ClientConf.xml file. Here we could set any particular setting for the rpc, such us endpoints, protocol, headers, timeouts, retries, etc….and headers is what I need!!

FMI about header settings please refer to Transport Header Mapping and Configuring Custom Transport Headers.

In this case both end point in the call are SOA implementations we can avoid the header mappings. So, just added into my ClientConf.xml the following lines:

<transport name="HTTP11">
	<class-name>
		org.ebayopensource.turmeric.runtime.sif.impl.transport.http.HTTPSyncAsyncClientTransport
	</class-name>
	<header-options>
		<option name="X-EBAY-SOA-OPERATION-NAME">findItemsByKeywords</option>
		<option name="X-EBAY-SOA-SECURITY-APPNAME">xxxxxxxxxxxxxxxxxxxxxxxxx</option>   <!-- my sandbox appId -->
	</header-options>
</transport>

At this point of the game everything seems to be done, let’s press Run so…

and the response says:

New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
LG Chocolate Touch VX8575 Verizon Retail Box Cell Phone
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
SAMSUNG A837 RUGBY AT&T CAMERA PTT GSM PHONE BLACK
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
Palm Treo 700wx (Verizon)
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
NEW T MOBILE MOTO MOTOROLA CLIQ WIFI BLUR MB200 ANDRIOD
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
NEW SAMSUNG A887 SOLSTICE UNLOCKED 3G PHONE BLUE……..

In case you get in timeouts troubles please refer to TimeOuts settings

HI,

In this post I will show you how to create a new Consumer service with Turmeric Eclipse plugin. I used a wsdl from an existing eBay’s Developer Service.
For general steps and preconditions, please refer to Create a Consumer using Turmeric Eclipse Plugin.

In your Eclipse,  go to File -> new -> other

new Consumer

This is the wsdl I choose:

http://developer.ebay.com/webservices/finding/latest/FindingService.wsdl

As you can see, I set two environments, production and local. This will create two different configuration files, as follows:

Finally, I implemented the Consumer Service. I selected the SharedFindingServiceV1Consumer class as superclass.

(Please take a look at BaseFindingServiceRequest in the wsdl for more info about the needed parameters in your request.)

	public static void main(String[] args) {
		FindItemsByKeywordsRequest req = new FindItemsByKeywordsRequest();
		req.setKeywords("phone");
		
		try {
		FindItemsByKeywordsResponse res;
		
		
		res = new FindingServiceV1Consumer("FindingServiceV1Consumer", "sandbox").findItemsByKeywords(req);
		if(res.getSearchResult()!=null && res.getSearchResult().getItem().size()>0){
			for (SearchItem item : res.getSearchResult().getItem()) {
				System.out.println(item.getTitle());
			}
		}
		
		
		} catch (ServiceException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

now ,let’s compile:

 


aja!… that’s because I didn’t compile my FindingServiceV1 project yet. Once I did it, a new jar was created under worspace/FindingServiceV1/target, in my case: FindingServiceV1-1.9.0.jar. We need to add this jar into our local maven repository. Now, let’s try a new Consumer compilation. And this time compiles  :).

Is time to try my classes, “run Consumer, run!!!!”

[ TO BE CONTINUED]

Turmeric

Posted: March 1, 2011 in Policy Governance, SOA, Turmeric

During last times, I was involved on a new OpenSource SOA platform.Turmeric, a policy-driven Open Source SOA platform .

eBayOpenSource.org is recently created to open source and host best of breed technologies that were developed originally within eBay Inc, for the benefit of the community, under a liberal open source license. These projects are generic technology projects and several years of development effort has gone into them to mature them. eBay trusts Intalio for a strong and mature partner, and as a result, today we have the first open sourced project, Turmeric.

Turmeric is a comprehensive, policy-driven SOA platform that you can use to develop, deploy, secure, run and monitor SOA services and consumers. It is a Java based platform and follows the standards (SOAP, REST, XML, JSON, XACML, etc.). Salient features include high performance, low overhead, pluggable and extensible architecture, developer friendly eclipse plug-ins, support for a variety of protocols/formats, local binding, tools for managing re-usable types, error definitions, policy administration and monitoring and many more.

I invite you to read about it, download it and of course,  feel free to fire any doubt/suggestion you have at Turmeric forum.

My Turmeric’s experiences are coming soon….