Googleplex 2011

Posted: November 23, 2011 in eBayOpenSource, Eclipse, Turmeric, VJET

A new “googol” event is coming son, Nov 30th, the GooglePlex takes place at Olympus Mons Tech Talk Room,  Building CL4 in Mountain View, CA.

“Googleplex is a 1-day event for developers to learn about different Eclipse projects and related technologies. You are invited to attend and listen as experts from the Eclipse projects and Google share their experiences of using Eclipse. It’s also a great opportunity for you to meet and network with other Eclipse enthusiasts”

There you can learn about two projects under the EbayOpenSource ecosystem, VJET, an Eclipse plugin for javascript development by Justin Early (eBay) and TurmericSOA, the open source version of eBay’s SOA engine, by Dave Carver (Intalio)

Another interesting talks:
NASA Ames uses Eclipse RCP
Xtext success story: Google’s protobuf-dt

Enjoy the devs party 🙂



Rule Syntax in TurmericSOA

Posted: November 10, 2011 in Turmeric, XACML


Turmeric‘s next release will provide two new rule patterns for Rate Limiting Policies, which allow to limit calls for any XACML Subject or Subject Group. With them,  grows the rules flexibility as well as its throwput.

Recalling those years developing a Motohealth protocol, I cleaned up the dust from my writing capabilities in EBNF  🙂 , then, this is how the Rule syntax looks:

rule = opt-ws expression opt-ws | opt-ws expression opt-ws '||' opt-ws expression opt-ws | opt-ws expression opt-ws '&&' opt-ws expression
expression = global_hits | subject_hits | count

global_hits = 'HITS' opt-ws comparator opt-ws number
subject_hits = subject ':hits' opt-ws comparator opt-ws number
count = service [':' operation  ['.SubjectGroup' ['.Subject'] ] ] '.count' opt-ws comparator opt-ws number

comparator =  '<'|'>'|'<='|'=<'|'>='|'=>'|'=='
number =  {digit}
digit = '0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'
character = lowercase-char | uppercase-char | digit | special-char
lowercase-char = "a" | "b" | "..." | "z"
uppercase-char = "A" | "B" | "..." | "Z"
special-char = '_'|'-'

subject = ip | dev | user | app
ip = range '.' range '.' range '.' range
range = ['0'|'1'|'2'] [digit] digit
dev = word
user = word
app = word

word = lowercase-char  {character | digit} | uppercase-char  {character | digit}

service = word
operation = word
opt-ws = [{' '}]

With this syntax we assume following are valid rules:>1000: Limit that IP after 1000 calls*
HITS>10000: Limit any call after 10000 calls, regardless what and who made them*
MyService:my_operation.count>150: Limit any call to my_operation after 150 calls, regardless who made them*
MyService.count>100: Limit any call to myService after 100 calls, regardless the caller and the operation*

new ones….
MyService:my_operation.SubjectGroup.count>500: Limit any call to my_operation after 500 calls, made by a Subject Group*
: Limit any call to my_operation after 500 calls, made by each Subject member of a Subject Group*

(*) Limiting action acts based on on the specified Effect action field.

Don’t forget Subject and SubjectGroup must be targets on the RL Policy definition. (FMI refer the Turmeric 1.0.0 wiki)

c u  soon….

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!!

New coming features…

Posted: September 14, 2011 in Cassandra, Turmeric

Here are some of the new features delivered within the next rlse.

      • Expanded Rest Support: SOA Framework will now support REST operations that come in with HTTP verbs PUT and DELETE in addition to GET and POST. Operation mapping in service config xml can be done for each http request type (GET, POST, PUT and DELETE).
      • OSGI – Now SOA consumers can use SOA in an OSGI safe way : Currently, SOA runtime loads resources and handlers from classloader. When running in OSGi environment, resources such as ClientConfig.xml, ServiceConfig.xml, and application customized handlers don’t belong the SOA runtime bundle. Now SOA OSGI fwk provides registration API which supplies directly streamed config resource information so that getResourceAsStream() does not need to be called.
      • Zero Config Consumer: This feature eliminates the need for separate consumer jar. Now Plugin has Simple and Advanced mode for Consumer creation from WSDL. In simple mode, consumer project would not be created. Runtime will automatically switch to use the default Client Config file.
      • Protocol Buffers Support: SOA fwk now supports the Google’s data format – Protocol Buffers along with existing data formats XML, FAST_INFOSET, JSON and NV. SOA tooling generates the required artifacts to handle protobuf if the service is enabled for protobuf. The developer no need to write any special code to use the protobuf format except the configuration in Client Config file just like any other format.
      • Distributed Rate Limiter counters:   With the use of Cassandra ring the rate limiter feature can be deployed in cluster mode
      • Aggregation data for Monitoring:   the powerful monitoring console will now show summarized data. It can also read data from distributed nodes in Cassandra.

Hi, when coding under Eclipse IDE v3.5 or above you can’t miss this extra for Turmeric development. It bring us some aditional support for the eBay Open Source Turmeric SOA project’s configuration files. Here we have a screenshot:

The project is looking for contributions, please feel free to fork the project on github

Working with GWT has a number of benefits but in the other hand we could get some cons and troubles that you’ll need to solve by yourself. That’s the case for a user Session Timeout, for example. While in an ordinary JSP servlet you could have total control of a user session and its actions, due to the client resident feature of GWT, things turns a bit complicated….

Last Friday I was working on a Session Timeout feature for Turmeric, an eBay Open Source platform. In the next lines I’m gonna show you how I did it , anyways you can surf these updates at my git-hub home.

Based on GWT RPC call mechanism and a few timers, I added a new service into Policy Admin UI (the web project to manage policies in Turmeric), called SessionServiceImpl, which implements RemoteServiceServlet and extends my service. This servlet instance, as usual will reside in the server side of my app.  Then I added the two interfaces needed for RPC calls, SessionInterface and SessionInterfaceAsync, and its implementation.

public class SessionServiceImpl extends RemoteServiceServlet implements
SessionInterface {

private static final long serialVersionUID = 1L;

private int timeout;

public Integer getUserSessionTimeout() {

timeout = getThreadLocalRequest().getSession().getMaxInactiveInterval() * 1000;
return timeout;

public Boolean isSessionAlive() {

return new Boolean((System.currentTimeMillis() - getThreadLocalRequest().getSession()
.getLastAccessedTime()) < timeout);

public void ping() {



This Servlet has its own time counters for user logged. Why I had to create a specific time member instead of using the HTTPSession ones? Since  of GWT genned code resides on client machines, the server session is not updated until a new RPC call be made by user, ie FindByXXXX, createXXX methods and so on… So, in the user does some clicks on the left side tree menu, the last accessed time at HTTPSession will not be automatically updated. Now since in our GWT  app a common dispatcher should be the selectPresenter method under the Controller, I preferred to use it as a common entry point to notify the session updates, just calling to a ping method. .

the SessionService interface:

public interface SessionInterface extends RemoteService {
Integer getUserSessionTimeout();
Boolean isSessionAlive();
void ping();

the asyncronous one, at your client side. Our  code will call the sessionService but it will not wait for a reply as in synch way. The response will came later…who knows…

public interface SessionInterfaceAsync  {
void getUserSessionTimeout(AsyncCallback<Integer> callback);
void isSessionAlive(AsyncCallback<Boolean> callback);
void ping(AsyncCallback callback);

Later, since GWT 1.6, if I recall correctly, you could add your servlets into your *.gwt.xml file instead of your web.xml file. I’m on GWT 2.2 so I added these lines into our PolicyAdminUI.gwt.xml file:

<servlet path="/sessionService" class="org.ebayopensource.turmeric.policy.adminui.server.SessionServiceImpl"/>

and finally in the web.xml a new property to set the timeout configurable:

<!--  session timeout in minutes -->

and here is how my appController looks like:

//this method is called when the controller starts and bind...
private void initSessionTimers() {
sessionService.getUserSessionTimeout(new AsyncCallback<Integer>() {
public void onSuccess(Integer timeout) {
timeoutCicle = timeout;
sessionTimeoutResponseTimer = new Timer() {
public void run() {

public void onFailure(Throwable caught) {
               //throw custom errors


private void isSessionAlive() {
sessionService.isSessionAlive(new AsyncCallback<Boolean>() {
public void onSuccess(Boolean alive) {
if (alive.booleanValue()) {
} else {


public void onFailure(Throwable caught) {
//throw custom errors


private void displaySessionTimedOut() {


private void updateSessionLastAccessedTime() { AsyncCallback<Object>() {
public void onSuccess(Object paramT) {
//do nothing

public void onFailure(Throwable caught) {
//throw custom errors



that’s all folks,
hope it helps somebody….

Turmeric In Action…

Posted: June 29, 2011 in Events, Turmeric

Turmeric with Cloud Mashups Webinars

Data services present a challenge to many businesses on the web as they are channeled from various partners. Turmeric, a proven open source solution in the eBay environment, helps you achieve seamless integration capabilities to address these data demands. It is a stable, fast, SOA runtime along with Eclipse-based service development tools, and web based management and reporting.

Teams at Intalio and eBay designed a working example to demonstrate Turmeric’s integration with Amazon services. Learn from these development gurus how this solution results in low latency messaging and protocol or format transformations.

Wed, Jun 29, 2011 9:00 PM – 10:00 PM ART
Thu, Jun 30, 2011 10:00 AM – 11:00 AM ART

Jose Alvarez Muguerza

Manuel Chinea

Including Automated Tests and Automated Builds are some of the key aspects in a Continuous Integration development activity. Most of us are already familiar with these premises but, in the other hand, it is a common practice to commit/push our updates once all Unit Tests run successfully; leaving those Integration Tests and, why not, inter-dependencies troubles to be analyzed after the remote repo build. Anne Thomas Manes estimates that ongoing maintenance could achieve 92% of the total lifetime cost of an application.

Automated builds, with the use of any Integration Tool such as Hudson/Jenkins, are commonly performed “over there”, after our commits, but why don’t prevent to those possible dependency issues? or those failed integration tests?

Martin Fowler explains in his Continuous Integration article: “The point of testing is to flush out, under controlled conditions, any problem that the system will have in production. A significant part of this is the environment within which the production system will run. If you test in a different environment, every difference results in a risk that what happens under test won’t happen in production…” . Decreasing the gap between the Local dev environment and the Production environment reduces the chances of a Red Ball nightmare.

Continuing with my last post, eBayOpenSource with Sonatype Nexus, I decided to complete my dev environment with the use of Hudson+Sonar+Nexus tools.  Here are the simple steps:

Configure Sonatype nexus in your environment

– Go to Hudson home page and download the war file. You could install a native package as well, I prefer the war-way for OS upgrade purposes.

– Go to Sonar site, download latest zip file. v2.8 in this case.

Run Hudson with:

java -jar your_hudson_war

Hudson console runs on port 8080 by default. You can chage it by adding parameter –httpPort=8888

Go to Manage Hudson -> Manage Plugin and install Sonar plugin

In my case I use Git as repo, so I needed to add some extra plugins:

Then, go to Manage Hudon -> Configure System and add:

JAVA_HOME: in my case, /usr/lib/jvm/java-1.6.0-openjdk

GIT installations, give it a name

MAVEN_HOME: /home/jose/Tools/apache-maven-3.0

MAVEN_OPTS: -Xms512m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=128m

Sonar installations, give it a name

Create a new Hudson Job:

Add your Source Code Management:in my case GIT and  file:///home/jose/workspace/<any-git-project>

Branches to build: origin/master

Poll SCM: @hourly

and don’t forget to check last item, Post-build Actions: Sonar

press Save.

Now, it’s turn to run Sonar:

go to [Sonar_Home]/bin/[your_OS_Distro] and execute the script. It will load sonar service and console at localhost:9000

Go back to hudson console and press Build now in your Hudson Job….then magic happens!!!

Started by user anonymous
Checkout:workspace / /home/jose/.hudson/jobs/turmeric-policy/workspace - hudson.remoting.LocalChannel@3ed9c921
Using strategy: Default
Last Built Revision: Revision 2a40432f5ed44da0ada7e326b224198cb676f175 (origin/master)
Checkout:workspace / /home/jose/.hudson/jobs/turmeric-policy/workspace - hudson.remoting.LocalChannel@3ed9c921
Fetching changes from the remote Git repository
Fetching upstream changes from file:///home/jose/workspace-git/turmeric-policy
Commencing build of Revision 2a40432f5ed44da0ada7e326b224198cb676f175 (origin/master)
Checking out Revision 2a40432f5ed44da0ada7e326b224198cb676f175 (origin/master)
Found mavenVersion 3.0 from file jar:file:/home/jose/Tools/apache-maven-3.0/lib/maven-core-3.0.jar!/META-INF/maven/org.apache.maven/maven-core/
Parsing POMs
downloaded artifact
downloaded artifact
[workspace] $ /usr/lib/jvm/java-1.6.0-openjdk/bin/java -Xms512m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=128m -cp /home/jose/.hudson/plugins/maven-plugin/WEB-INF/lib/maven3-agent-2.0.1.jar:/home/jose/Tools/apache-maven-3.0/boot/plexus-classworlds-2.2.3.jar org.jvnet.hudson.maven3.agent.Maven3Main /home/jose/Tools/apache-maven-3.0 /home/jose/.hudson/war/WEB-INF/lib/hudson-remoting-2.0.1.jar /home/jose/.hudson/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-2.0.1.jar 47965
���channel started
Executing Maven: -B -f /home/jose/.hudson/jobs/turmeric-policy/workspace/pom.xml sonar:sonar
[INFO] Scanning for projects...

You can see the “" over there, it's Nexus in action....

Unfortunately I fell into the Duplicated Source Sonar issue. 😦

We should see something similar to:

see you in the next one…Hope SONAR-2444 be solved, otherwise I should find a workaround asap.

During last days I’ve suffered some Internet connection troubles, sometimes connections goes, other it turns very slow, similar at the 56kb modems in the early stages of internet. BTW, thanks to Movistar.

Those ones, can become (or not) in serious issues for an isolated developer or web page designer who could upload his advances once a day, or a week…but it turns critical for this developer who works together a multi-country team in an Open Source project.

For instance, in my daily labor I run maven builds, some days several of them…as you may know these maven builds look for and downloads huge quantities of files, artifacts, or dependencies…off course according your configurations, at least, I have to…….So, the need of an enhancement in this process arose me during these days. Does not take much time to decide one of the better and well-known tools that bring you the ability to manage the provisioning artifacts during development, mainly based on the its simply installation and configuration process. Welcome Nexus to my laptop. Nexus Open Source is available under the GNU Affero General Public License version 3 (AGPLv3):

Is not the intention of this post to tell you what Nexus is or does, for that purpose just surf on the adequate and, for sure more complete;  nexus site. Instead of that, I wrote this lines to let you know how to get Nexus working on your computers.

So, firstly some key aspects about nexus:

  • Nexus is a Jetty unzip and run tool
  • You can manage your repositories from different approaches, in my case I set them as Proxy Repos: “When you proxy a remote repository with Nexus Open source you can control all aspects of the connection to a remote repository including security parameters, HTTP proxy settings. You can configure which mirrors Nexus will download artifacts from, and you can control how long Nexus will store artifacts and how it will expire artifacts which are no longer referenced by your build….”
  • Nexus provides a JavaService wrapper for Windows. Just in case u prefer MS W rather than any linux OS

… for a better feature description here you have a copy of the Sonatype Nexus Feature Matrix:

OS: Open Source version  –  Pro: Professional version

Then, fisrt of all, go to download page, choose the last one. In this case, Release There you can choose it from a list of formats, war, tar, zip, etc…I download the nexus-oss-webapp-

Decompress this file into a folder that you selected as nexus home. This package contains 2 folders inside: nexus-oss-webapp-, the nexus distribution itself and the sonatype-work, empty for now, that is the folder where your local repo will resid. You can assign different /home/.. folders for each of them, or you can decompress it in just one. I choose that way, both, nexus-oss-webapp- and sonatype-work, under a /home/jose/.nexus/ folder.  In case you are damning the two-folder structure, just think in upgrading the nexus distribution in your environment, your local repo will remain intact!

Now, under your …./.nexus/nexus-oss-webapp- folder you can see several distribution folders. I use a linux over 64 bits, so I’m going to work with linux-x86-64. Be sure to run the appropriate according your OS.

Then, let’s create a linux link for nexus path:

ln -s .nexus/nexus-oss-webapp- nexus

You can run nexus as a service or just manually, but you need to remember to run it prior to start you development day. I preferred to set as service., and these were the steps:

  1. Copy either ${NEXUS_HOME}/bin/jsw/linux-ppc-64/nexus, ${NEXUS_HOME}/bin/jsw/linux-x86-32/nexus, or ${NEXUS_HOME}/bin/jsw/linux-x86-64/nexus to /etc/init.d/nexus.
  2. Make the /etc/init.d/nexus script executable – chmod 755 /etc/init.d/nexus
  3. Edit this script changing the following variables:
    • Change APP_NAME to “nexus”
    • Change APP_LONG_NAME to “Sonatype Nexus”
    • Add a variable NEXUS_HOME which points to your Nexus installation directory
    • Add a variable PLATFORM which contains either linux-x86-32, linux-x86-64, or linux-ppc-64
    • Change WRAPPER_CMD to ${NEXUS_HOME}/bin/jsw/${PLATFORM}/wrapper
    • Change WRAPPER_CONF to ${NEXUS_HOME}/bin/jsw/conf/wrapper.conf
    • Change PIDDIR to /var/run.
    • Add a JAVA_HOME variable which points to your local Java installation
    • Add a ${JAVA_HOME}/bin to the PATH

another useful setting is edit in ${NEXUS_HOME}/conf. You’ll see an element named webapp-context-path. Change this value from “/nexus” to “/”

cd /etc/init.d

update-rc.d nexus defaults

service nexus start

and finally…..

Starting Sonatype Nexus...

Sonatype Nexus will be running in your local and you can access to the admin console through you browser at. The defaults credentials are admin/admin123

So, once we have nexus already deployed we need to add some custom parameters and configuration in order to be useful during our maven deploys.

During these days I’m working with a project from eBayOpenSource community, so, let’s assign those repositories.

Basically for Turmeric we need to add two repositories:

Release repository:

and Snapshot Repository:

And, finally we need to update our .m2 settings file in order to run our maven build integrated with nexus. For a better HOW-TO explanation let me post my maven’s settings.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!-- If you want to deploy content (SNAPSHOT or RELEASE) to the
Nexus instance at
You'll need an account, and then you can enable this section.

To get an account, create an INFRA issue requesting the account.
Include your svn userid in the request.

<!-- Search Order for Maven Plugins not configured in a project -->


<name>eBayOpenSource Release Repository</name>
<name>eBayOpenSource Snapshots Repository</name>

<name>eBayOpenSource Release Repository</name>
<name>eBayOpenSource Snapshots Repository</name>

<name>Nexus Public Mirror.</name>



Take care about the repositories id that you set, ie: ebayopensource-snapshots. These need to be the same as you defined in Nexus repo.

And….that’s all!!! now let’s do a maven build.
mvn clean package

During this process maven should attempt to download all your artifacts from http://localhost:8081&#8230;.. Of course first time you run your build, your nexus repo is empty so, the consuming time will not be decreased, but, try with your second build.

NOTE: If after your first maven build, maven is still getting some artifacts from any other external repository just review your Nexus Repositories looking for a wrong setup or just for a missing custom repository.

now, run your builds and enjoy your new Free Time.

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