Coder Social home page Coder Social logo

camel-fabric-reverse-proxy's Introduction

Camel reverse proxy with Fuse Fabric

How to install

This uses the fabric8 plugin to generate a profile to install into a fabric.

See more here: http://fabric8.io/#/site/book/doc/index.md?chapter=mavenPlugin_md

Note, to use the fabric8-maven-plugin, youll need this in your ~/.m2/settings.xml (see the docs):

<server>
    <id>fabric8.upload.repo</id>
    <username>admin</username>
    <password>admin</password>
</server>

Run:

mvn fabric8:deploy

to run against a local fabric. if you have a remote fabric do this:

mvn fabric8:deploy -Dfabric8.jolokiaUrl=http://fuse-xpaas.xpaas.com/jolokia

This should build the jar, build the profile, upload both to the fabric, and from there you can deploy it to a container.

The routing is limited, although the pieces are in place to expand on it.

The assumption is that each group of webservices to load balance against has one and only one url context path (for e.g., /context/path/foo)

What this does is take a request, determine how to map the path to the fabric cluster name and then call it using a recipient list.

For example, a call to http://localhost:9000/test will use a recipient list to call fabric:gatewaytest

Note that the context was used to concatenate with a constant "gateway" ... so /test got replaced to gatewaytest. See the Router class for the implementation of the recipient list. Also note where you can plug in your custom logic.

There are three groups: test, beer, cheese.

You can hit each one with the following commands:

curl http://localhost:9000/beer
curl http://localhost:9000/test
curl http://localhost:9000/cheese

Note, there is a small bug in the fabric lookup code that might fail for you on the first attempt.

It this is the case please let me know. I'm going to open a JIRA for it anyway, but still curiuos how many people it affects.

Good Luck!

camel-fabric-reverse-proxy's People

Contributors

michaelcostello avatar christian-posta avatar

Stargazers

Rafael T. C. Soares (A.K.A Tuelho) avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.