GithubHelp home page GithubHelp logo

muruks123 / camel-workshop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bibryam/camel-workshop

0.0 2.0 0.0 5.63 MB

Java 0.61% HTML 0.14% JavaScript 98.83% Dockerfile 0.01% Shell 0.01% TypeScript 0.39% CSS 0.02%

camel-workshop's Introduction

Apache Camel Workshop

This is a Apache Camel Workshop "from zero to hero". It starts from basic features, like how to expose a REST endpoint, to building a complex system composed of multiple microservices and coordinating actions using the Saga pattern to obtain consistency.

All artifacts produced in the workshop are present under the /app directory, but we suggest to follow the step-by-step guide.

Slides

The slides for this workshop are located here.

Final Result

You can check the Youtube video to see all services in action.

The final result of the workshop is a "Plush Shop Demo".

Plush Shop Catalog

A demo user can make purchases on the Plush Shop, if he has enough credit...

Plush Shop Purchase

Architecture

The system is composed of a Angular 6 UI interface backed by 4 microservices.

Plush Shop Architecture

The role of each service is:

  • UI (Angular 6 on Node.js or any static HTTP server): a graphical user interface that is provided for the workshop and can be used to test the full application;
  • Recommendation (Camel on Spring-Boot): a simple recommendation service that provide ratings for the best items;
  • Credit (Camel on Spring-Boot): manages how much money is owned by the user(s);
  • Inventory (Camel on Spring-Boot): manages items present in stock and movement out of it;
  • Gateway (Camel on Spring-Boot): provides uniform access to all other services and orchestrates calls to them.

Requirements

  • Java 8
  • Maven 3.5.x
  • Your favourite IDE
  • HTTPie (to test endpoints)
  • Minishift and Openshift client tools (optional)

HTTPie can be installed on Linux, OSX and Windows.

For Windows users: Installation of HTTPie on Windows requires pip that is included in the Python installer. Read this thread if you need to troubleshoot. Alternatively, you can use a graphical tool like Postman to test endpoints, but instructions on this tutorial are given for HTTPie only.

The Minishift requirement is optional. Minishift allows you to start full Openshift pseudo-cluster in your development machine and run your service as containerized images. You can download the binary from the Minishift release page.

Refer to the "quick start guide" to install Minishift on your laptop. The section about the Openshift client binary explains also how to include the oc binary into the path in order to interact with the cluster.

Part 1: writing the services

1. Recommendation Service

Here's how to create the recommendation service.

2. Credit Service

Here's how to create the credit service.

3. Inventory Service

Here's how to create the inventory service.

4. Gateway Service

Here's how to create the gateway service.

5. Running the UI

Here's how to run the UI.

Part 2: advanced features

6. Circuit breaking and Caching

Let's add a circuit breaker and caching logic.

7. Adding Sagas

Let's see how to fix inconsistencies.

8. Running on Kubernetes and OpenShift (Optional)

Let's see how to run everything on Kubernetes and Openshift.

camel-workshop's People

Contributors

davsclaus avatar nicolaferraro avatar

Watchers

 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.