Skip to content

Demo project with Apache Camel used in SpringBoot

License

Notifications You must be signed in to change notification settings

BertKoor/camelCase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

camelCase - by BertKoor

This is a simple demo project for Apache Camel used in a Spring Boot application.

It's attached to a talk I did on this subject which is posted on YouTube. I gave that talk in March 2018 to colleagues of a big Dutch bank I work for, using the service my team had built as an example. But since no one outside that bank has access to that project, I had to come up with another public example project.

The links to reference material can be found at the bottom of this article.

The 'use case' of camelCase

The business case here is all about camels. The real animals - smelly, moody, with one or two humps you would find in or near the desert. Where it's hazardous to cross a desert with a car, it's slow but safe to do so using camels.

Imagine we all have camels instead of cars. Ofcourse then there are companies renting out camels, selling and buying them. And imagine the government mandated that each camel carries a license plate (or have a RFID chip) for identification purposes.

The core problem this project is solving:

What is a camel worth?

Existing Components

Since Apache Camel is about Enterprise Integration Patterns, connecting anything with everything , a couple of services and resources already exist:

  • The CVS (Camel Valuation Service) is already developed. It takes some depersonalized input values of a camel such as the weight, age, number of humps, physical condition and customer rating to calculate an estimation of the camel's market value.
  • The CR (Camel Registry) is a legacy datastore which contains details like the weight, year & month of birth and number of humps.
  • The CHS (Camel Health Service) holds the medical history and periodical medical check results of any registered camel. Based on the health records it can return the PHS (physical historical state) of a camel, expressed in a number from one (very bad) to ten (very good).
  • Camels that are rented out might get star ratings from customers, expressing their customer happiness in using that particular camel. The average rating can be retrieved from the CCRS (Camel Customer Rating Service) and is expressed in a number between one (bad) and five (good).

Camel License ID's

For security and privacy reasons the CR, CHR and CCRS cannot be accessed directly with the camel's license ID. Instead an internal ID is used. There exists a top secret algorithm to convert the public license ID to the internal ID. Experts from the government's IT department guarantee this algorithm cannot be reversed.

The public license ID of a camel has exactly six identifying characters. It contains at least one digit and at least one letter. It may be formatted for readability with hyphens, dots or spaces.

The private internal ID of a camel is just a number.

So it is easy to tell whether it's a public license ID or private internal ID, these cannot get confused.

Summary

  • To get the value of a camel, you need to call the CVS.
  • Data needed for the CVS call can be retrieved from the CR, CHS and CCRS.
  • The CR, CHS and CCRS need the private internal ID, which can be constructed by a top secret algorithm from the public license ID.

Technical Details

If you'd like to study how the project is constructed from the bottom up, I'd advise to look at the commit history.

References

Here are all the links from the presentation :

About

Demo project with Apache Camel used in SpringBoot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published