Title

Posted: April 21, 2014 in Uncategorized

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….

Solving the Anagram-Game in Ruby

Posted: March 5, 2012 in ruby

Anagram

(Excerpted from Wikipedia). An anagram is a type of word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase, using all the original letters exactly once; for example orchestra can be rearranged into carthorse


class NoElementsInArrayError < StandardError ; end

  def combine_anagrams(words)
  raise NoElementsInArrayError unless words.length > 0

  h = Hash.new
  words.each_index do |x|
    sorted_word = words.at(x).downcase.chars.sort.join  # ==> [acrs, for, aeoopstt, acrs, foru, acrs, acemrs, acemrs]
    unless h.has_key?(sorted_word)                      # creates an empty new array as value for key "acrs", "for" and so on...
      h[sorted_word] = Array.new()
    end

  h.fetch(sorted_word).push(words.at(x))              # populates the array for key "acrs", "for" and so on...
  end

  result = Array.new
  h.each_value {|value| result.push(value) }
  return result

end

example:   combine_anagrams(['cars', 'for', 'potatoes', 'racs', 'four','scar', 'creams','scream'])

enjoy it!

ebayOpenSource FLOSS show

Posted: February 28, 2012 in eBayOpenSource, Turmeric, VJET

“Netcasts you love from people you trust”, the FLOSS site bring us a new talk with our colleague Sastry Mallady, the eBay’s Technical Architect. Sastry comments about the ebayopensource and also mentions the 3 “open sourced” projects, Turmeric, ql.io and VJET.

Enjoy this weekly episode http://twit.tv/show/floss-weekly/201

c u!

Diagramming Tools

Posted: February 14, 2012 in Tools

Probably this will be one of my shortest post in this blog…I just want to share with you 2 simple but awesome tools that I frequently use:

  • An on line Sequence Diagrammer: http://www.websequencediagrams.com/. There, all you need to do is to write your nodes (classes, modules, etc) and their messages, ah! they are optional.

 

  • Finally, if you work in a distributed/remote team, you may want to take a look at Cacoo Diagrammer: https://cacoo.com/. A real time collaborative diagram tool. Your team share projects with multiple types of diagrams, supports versioning, exporting, social net sharing, discussion tools, such as the internal chat, and  so on .

 

that’s all folks, enjoy them!!!

Java 7 – key features

Posted: January 20, 2012 in Java

curious about what Java 7 offers to us ?? just watch this JavaOne talk

http://bcove.me/jenzviyb

enjoy it!

Today I’m gonna share with you my experience when I started with Apache Cassandra…One of the most complicated steps to learn any NoSql stuff, is to take away of your mind the normalization principles and those relational DB structures. Relational databases are designed to persist normalized data and without duplicated data. Well, one of the main changes here is that you need to think or design for your queries, in what your reports or finder methods want, and build a the persistent structure as it need.

Cents of web pages, books, papers treat about What Cassandra is, What Hazelcast is, What Hadoop, MemcacheDB, MongoDB, etc….But none of them treat about HOW TO migrate my data from a relational DB to one of them.

We wanted to migrate the persistent data of two our modules, Turmeric SOA Monitoring and Turmeric SOA Rate Limiting data. In Turmeric we use MySql as relational database. After a week reading and analyzing several NoSql options we decided for Cassandra. <— I hope to write another post about the whys…. btw, I highly recommended this reading: Cassandra: The Definitive Guide

From Relational tables to Keyspaces

The big deal now is How to migrate them. Well this is what we did:
Following an Agile best practice, if something is to hard or complex, just, break it in small challenges. After all we still had a good gap for a MMF (“Minimal Marketable Feature”, refer to Software by Numbers. So:

Step 1: Move our Relational DB tables to Cassandra Column Families.
Step 2: Customize our new Column Families in your Keyspace in order to have all needed data without JOIN operators
Step 3: Explode those Column Families as finder and query method needs. Typically a finder or query method should use 1 Column Family
Step 4: Customize Creators and Updater methods according previous changes. Don’t be scared if you are saving duplicated data. Keep in mind, “think for your queries!, forget to normalization rules.”
Step 5: while (!pleased) -> do step 3 and 4

A Cassandra DAO

Now, the hardest step is #1. Don’t panic, we developed a kind of generic (in fact it uses Java Generics) Cassandra DAO for your migration. As all this work was needed for the project I’m actually working on, you will find it as a submodule of TurmericSOA, but following the Apache License you can use it through your Maven dependency file.


<dependency>
<groupId>org.ebayopensource.turmeric.utils</groupId>
<artifactId>turmeric-utils-cassandra</artifactId>
<version>1.2.0.0-SNAPSHOT</version>
<type>jar</type>
</dependency>

Features

  • 100% Java code
  • It can runs an Embedded Cassandra Service or just talk to your external Cassandra Service
  • Uses Hector library as Java Cassandra client
  • Dynamically [Super] Column Family creation
  • Key Types and Data Types defined at runtime with the use of Generics
  • Main CRUD methods supported:
boolean containsKey(KeyType key);

void delete(KeyType key);

T find(KeyType key);

Map> findItems(final List keys, final Long rangeFrom, final Long rangeTo);

Set findItems(final List keys, final String rangeFrom, final String rangeTo);

Set getKeys();

void save(KeyType key, T model);

Main Classes
This util package contains the following package and classes:

org.ebayopensource.turmeric.utils.cassandra.service

  • CassandraManager: initialize a static EmbeddedCassandraService instance based on yaml configuration file

org.ebayopensource.turmeric.utils.cassandra.hector

  • HectorManager: Manages the keyspace and column family creation and reading. It uses Hector Api
  • HectorHelper: Includes some utility methods based on Java Reflection and Java Generics. IE: retrieving the field names from a POJO which are used as column names in cassandra keyspaces

org.ebayopensource.turmeric.utils.cassandra.dao

  • AbstractColumnFamilyDao: As it is called, this should be a base class that every dao should extends. It defines and implements basic DAO operation with the use of Hector Api.

Configuration files

Here is the directory structure of the configuration files:

META-INF/
         security/
                  config/
                         cassandra/
                                   cassandra.properties

An example of this property file:

cassandra-cluster-name=TurmericCluster
cassandra-host-ip=127.0.0.1
cassandra-rpc-port=9160
cassandra-my-keyspace=My-keyspace

#column families
cassandra-foo-column-family=foo
cassandra-bar-column-family=bar

How to use it….
It is very intuitive. Lets suppose we have a Foo table in our relational DB, ie MySql.
So:

Create the BaseDao interface

public interface BaseDao {
		  public void delete(String key);
		  public Set getKeys();
		  public boolean  containsKey(String key);
		  public void save(String key, FooPojoClass  fooPojo);
		  public FooPojoClass find(String key);
}

Create the FooDao interface

public interface FooDao extends BaseDao  {
}

Create the FooDao implementation


public class FooDaoImpl extends AbstractColumnFamilyDao
		implements FooDao {
	public FooDaoImpl(final String clusterName, final String host, final String keySpace, final String cf,  final Class kTypeClass) {
		super(clusterName, host, keySpace, kTypeClass, FooPojo.class, cf);
	}

}

… in your code

//initiates an embedded Cassandra Service
CassandraManager.initialize();

//creates our Foo Column Family
FooDao fooDao = new FooDaoImpl("myCluster", "127.0.0.1", "myKeyspace",
				"myColumnFamilyName", String.class);

and voilà, you have your relational table migrated as a Cassandra column family!!!

Anyways your can surf at UT classes to see how are they implemented…

enjoy it!!!

Some mvn tips

Posted: December 22, 2011 in maven

Hi all, as you may know TurmericSOA has a multi-module project structure, as example take a look at Rate Limiter module under turmeric-security project:

turmeric-security/ratelimiter
|
|---RateLimiterService
|---RateLimiterProvider
|---RateLimiterCounterProvider
|---RateLimiterServiceConsumer
|---RateLimiterServiceImpl
|---RateLimiterErrorLibrary
|---RateLimiterCounterMapProviderImpl
|---RateLimiterCounterCassandraProviderImpl
|---RateLimiterProviderImpl
|readme.txt
|pom.xml

a simple mvn clean package process takes about 9 minutes…no so bad, it could be worst, for example if you build the entire security project….please be patient :)

For those kind of projects here I recall you some useful tips building with maven…

  • Use the maven reactor plugin: in short terms it allows to resume your build process where last fails has placed or simlply from where you specify:

In my case I pasted the RateLimiter module structure based on its dependencies, not alphabetically… Now assume you’ve got a fail at RateLimiterCounterMapProviderImpl module, if you run a simple “mvn clean install” you are running a complete rate limiter project build, instead of that try: –resume-from  or -rf

mvn clean package –rf RateLimiterCounterMapProviderImpl

That command just runs RateLimiterCounterMapProviderImpl, RateLimiterCounterCassandraProviderImpl and RateLimiterProviderImpl.

__________________________________________________

Also you can specify a particular module or project to run with the use of –projects or -pl

mvn clean package –pl RateLimiterCounterMapProviderImpl

That build just the indicated project. You can specifiy one or more projects separated by comma.

__________________________________________________

Another option could be, build my project and its dependencies: –also-make or -am

mvn clean package –pl RateLimiterCounterMapProviderImpl -am

That builds RateLimiterService, RateLimiterCounterProvider and RateLimiterCounterMapProviderImpl
__________________________________________________

Or build my project and its dependants: –also-make-dependents or -amd

mvn clean package -pl RateLimiterCounterMapProviderImpl -amd

That builds RateLimiterCounterMapProviderImpl and RateLimiterProviderImpl

__________________________________________________

  • An easy one, working in offline mode: –offline or -o
mvn clean package -o RateLimiterCounterMapProviderImpl

That will not try to download the artifacts from remote repos, you’re an isolated developer :)

__________________________________________________

Sometimes I use my own Nexus repo (see Continuous Integration in Local post), so I need to change some
configurations in my maven setting files, to be honest I use two files: –settings or -s

mvn -s ~/.m2/settingsnexus.xml clean package

__________________________________________________
If you are familiar with maven I’m pretty sure you’ve hit your head on the table more than once and you finally decided to manually delete the your .m2 repo. The –update-snapshots or -U option could helps in those annoying times

mvn -U clean package

This will force to download the artifacts despite mvn does not consider them obsoletes.
__________________________________________________

  • Dependencies and versions
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.5</version>
<scope>test</scope>
</dependency>

That is a common dependency section in a pom.xml file. But you can specify the version in different ways:
1.8.5 => “Soft” requirement on 1.8.5 as a recommendation
[1.8.5] => “Hard” requirement on 1.8.5
[1.8.1,1.8.5] => Any between 1.8.1 and 1.8.5
[1.8.1,1.8.5) => Any between 1.8.1 and 1.8.4.99….
[1.8.5,) => Any above or equals to 1.8.5
(,1.8.1],[1.8.5,)=> Any below or equals to 1.8.1 OR any above or equals 1.8.5.
__________________________________________________

  • What-if fails

By default maven works with –fail-fast or -ff option. That is the multi-module build stops as soon a module fails.

mvn clean package       -> -ff option by default

…the output:

[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] turmeric-ratelimiter-parent ....................... SUCCESS [2.177s]
[INFO] Rate Limiter :: Rate Limiter Service .............. SUCCESS [17.947s]
[INFO] Rate Limiter :: Rate Limiter Provider :: Interface  FAILURE [0.361s]
[INFO] Rate Limiter :: Rate Limiter CounterMap Provider :: Interface  SKIPPED
[INFO] Rate Limiter :: Error Library ..................... SKIPPED
[INFO] Rate Limiter :: Rate Limiter Service :: Consumer .. SKIPPED
[INFO] Rate Limiter :: Rate Limiter Service :: Impl ...... SKIPPED
[INFO] Rate Limiter :: Rate Limiter CounterMap Provider :: Impl  SKIPPED
[INFO] Rate Limiter :: Rate Limiter CounterCassandra Provider :: Impl  SKIPPED
[INFO] Rate Limiter :: Rate Limiter Provider :: Impl ..... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

__________________________________________________________
You can use the –fail-at-end or -fae option to continue the build despite some modules has failed.

mvn -fae clean package -Dmaven.test.skip=true   -> just to avoid my tests during the build process

…the output:

[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] turmeric-ratelimiter-parent ....................... SUCCESS [1.959s]
[INFO] Rate Limiter :: Rate Limiter Service .............. SUCCESS [29.078s]
[INFO] Rate Limiter :: Rate Limiter Provider :: Interface  FAILURE [0.309s]
[INFO] Rate Limiter :: Rate Limiter CounterMap Provider :: Interface  SUCCESS [13.085s]
[INFO] Rate Limiter :: Error Library ..................... SUCCESS [6.886s]
[INFO] Rate Limiter :: Rate Limiter Service :: Consumer .. SUCCESS [5.550s]
[INFO] Rate Limiter :: Rate Limiter Service :: Impl ...... SKIPPED
[INFO] Rate Limiter :: Rate Limiter CounterMap Provider :: Impl  SUCCESS [7.367s]
[INFO] Rate Limiter :: Rate Limiter CounterCassandra Provider :: Impl  SUCCESS [8.224s]
[INFO] Rate Limiter :: Rate Limiter Provider :: Impl ..... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

__________________________________________________________
…and finally the preferred tool for dishonest developers :)
–fail-never or -fn

mvn -fn clean package -Dmaven.test.skip=true   -> just to avoid my tests during the build process

…the output:

[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] turmeric-ratelimiter-parent ....................... SUCCESS [1.959s]
[INFO] Rate Limiter :: Rate Limiter Service .............. SUCCESS [29.078s]
[INFO] Rate Limiter :: Rate Limiter Provider :: Interface  FAILURE [0.309s]
[INFO] Rate Limiter :: Rate Limiter CounterMap Provider :: Interface  SUCCESS [13.085s]
[INFO] Rate Limiter :: Error Library ..................... SUCCESS [6.886s]
[INFO] Rate Limiter :: Rate Limiter Service :: Consumer .. SUCCESS [5.550s]
[INFO] Rate Limiter :: Rate Limiter Service :: Impl ...... SKIPPED
[INFO] Rate Limiter :: Rate Limiter CounterMap Provider :: Impl  SUCCESS [7.367s]
[INFO] Rate Limiter :: Rate Limiter CounterCassandra Provider :: Impl  SUCCESS [8.224s]
[INFO] Rate Limiter :: Rate Limiter Provider :: Impl ..... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO]  + Ignoring failures
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

draw your own conclusions based on the outputs and your needs….

Now enjoy your new free time with the use of these tips….

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 dude..

In this post I’m going to show you a brief demo about the use of Rate Limiter feature with Turmeric SOA and Cassandra Integration.

Firstly let me explain you the scenario and the environment setup.

Scenario:

-A resource, a Service in this case,  must be denied after a member of a Subject Group makes 4 calls to an Echo Service

Environment:

  • A simple Echo Web Service deployed in two customised Jetty server, these are Jetty-Turmeric 1 and 2 (see chart Environment Setup)
  • Then Rate Limiter Service and Policy Service and PolicyAdmiUI deployed in other two Jetty servers
  • 4 Cassandra nodes running as stand alone services. In my case I used cassandra v 0.8.2
  • a turmericdb schema in a MySql database to store the predefined policies
  • any web browser, as REST client, FF in my case

Jetty-Turmeric Web Server Setup:

Download and decompress jetty-turmeric. This customised Jetty already provides a Echo Service as example. We need 4 instances (copies) of it, so let’s call it jetty-turmeric-1.0.1.0-SNAPSHOT-1, jetty-turmeric-1.0.1.0-SNAPSHOT-2, jetty-turmeric-1.0.1.0-SNAPSHOT-3 and jetty-turmeric-1.0.1.0-SNAPSHOT-4. Don’t forget to change their listening ports, otherwise you will get a nightmare of conflicts. I choose 8080, 8081, 8082 and 8083. Also you need to change SSL ports, and debugging port in case you want to do a remote debuggin with Eclipse:  -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000

Then, lets prepare the Jetty #1 and #2, those who has the Echo Service Consumer. One of the yellow boxes we need to setup in the SIF is the AuthenticationHandler, that is a handler which makes call to the Authentication Service deployed in Jetty Server #3 and 4 respectively.  So we need to edit the {JETTY-HOME}/resources/META-INF/security/config/AuthenticationPolicy.xml file and add the operation against we need the Authentication process be run  :

<resource name="ExampleEchoServiceV1" default-authentication-method="basic" type="SERVICE">
<operation name="echo">
<authentication-method>basic</authentication-method>
</operation>
</resource>

Now, since we use our Turmeric-Cassandra-util package we need to add some jar dependencies under {JETTY-HOME}/lib/turmericsoa-security/ folder:
log4j-1.2.9.jar
TurmericUtils-0.9.0-Beta.jar

As some services are deployed under another Web Server, we must indicate the actual endpoint and don’t forget to change the Transport Protocol, from LOCAL to HTTP. This applies for {JETTY-HOME}/lib/turmericsoa-security/AuthenticationServiceConsumer-1.x.x.jar/META-INF/soa/client/config/AuthenticationService/ClientConfig.xml

<client-config-list xmlns="http://www.ebayopensource.org/turmeric/common/config"></pre>
<client-config service-name="{http://www.ebayopensource.org/turmeric/services}AuthenticationService">
<service-interface-class-name>org.ebayopensource.turmeric.services.authenticationservice.intf.AuthenticationService</service-interface-class-name>
<service-location>http://localhost:8082/security/AuthenticationServiceV1</service-location>
<client-instance-config>
<invocation-options>
<preferred-transport name="HTTP11">
<override-options>
<skip-serialization>true</skip-serialization>
</override-options>
</preferred-transport>
<request-data-binding>XML</request-data-binding>
<response-data-binding>XML</response-data-binding>
</invocation-options>
</client-instance-config>
</client-config>
</client-config-list>
<pre>

localhost:8083 for Jetty#2 setup

Also applies for {JETTY-HOME}/lib/turmericsoa-security/RateLimiterServiceConsumer-1.x.x.jar/META-INF/soa/client/config/RateLimiterService/ClientConfig.xml

Endpoint: http://localhost:8082/security/RateLimiterServiceV1 or http://localhost:8083/security/RateLimiterServiceV1 for Jetty#4

Now, lets prepare the Jetty #3 and #4.

As we can see in the above chart in Jetty#3 resides, Security Service, Policy Service and PolicyAdminUI (the Web UI for
policy Administration).
Download and extract them under webApps folder. Then the custom updates are:
For Security Service: None
For Policy Service: None
For PolicyAdminUI: in {Jetty3-HOME}/webapps/policy/lib/web.xml update the endpoint ports as Jetty3 has, that is 8082
for http and 8445 for shttp.

Later, in both {JETTY3-HOME} and {JETTY4-HOME} /resources/META-INF/config/cassandra.properties you need to add Rate
Limiter Keyspace info and also indicate there that cassandra will run in standalone mode instead of embedded mode,
default mode.

################################
###### RATE LIMITER COUNTER ####
################################
cassandra-rl-cluster-name=TestCluster
cassandra-host-ip=127.0.0.1
cassandra-rpc-port=9160
cassandra-rl-keyspace=rl

#column families
cassandra-active-rl-column-family=activeRL
cassandra-active-effect-column-family=activeEffect

embedded=false

This config should follow the cassandra configuration. Other cassandra files are not necessary to be changed due to we set embedded=false. This, tells Turmeric that Cassandra service is running in a standalone mode; setting to true TurmericSOA will start its own embedded Cassandra service.

If you need more datails on how to enable Rate Limiting to your own service surf on Turmeric Rate Limiting Setup page

enjoy it!!