Raymond Hua Get In Touch

Get In Touch

Prefer using LinkedIn? Click here.

INFO303

Intergrated four web services using middleware software

Summary

For my INFO303 project, I created two API services with REST and GraphQL. In the first phase of my project, I made a SwaggerAPI for the REST and developed methods for when the user requests something (e.g. GET, DELETE, PUT, POST). The REST service is where all the sale records are kept, and the GraphQL service is where all the customer records are kept alongside their status (Regular or VIP).

In the project’s second phase, I integrated these two services alongside a REST web service provided by the lecturers using ActiveMQ, a message broker and Apache Camel, which routes messages into the correct queues programmed by the user. When a user adds a new account through an AJAX client, it is sent to the web service alongside the local GraphQL with the ID extracted from the web service.

When a user makes a sale through the web service, it gets dumped into a message bridge which then gets converted into a Sales object, which gets appended into the Sales service and checks if the Customer group from the web service matches the REST service; if they exceeded their threshold, they are classified as a VIP member, and if it doesn’t fit with the web services group, it gets changed from that service alongside the GraphQL service. I received full marks in both phases of the project.

I have explained this more in a diagram below using the Enterprise Integration Pattern.

Outcomes

  • Understanding the knowledge of web services and how they work: By the end of the course, I understood these services and how third-party companies can access them.
  • How to create REST and GraphQL using Java and Gradle: Followed the labs provided by the course to develop functional web services.
  • How to integrate these services using Apache Camel and ActiveMQ: These tools I found very good to use and would be helpful if you need to integrate multiple web services in the future.
  • Unit testing web services for any errors: I tested to see if all the web services’ functions were working to ensure there were no bugs when developing software. Testing is crucial before you send any application to production to ensure that no errors occur.
  • Understanding how to secure systems using OAuth: Understand how to secure these services using OAuth and session tokens.

How I found this project

I have wanted to know how APIs work since my final-year project at Polytech. If you complete the labs, I found that you will do fine with both phases of the projects, and most of the material you need is in one source. I also found the lab co-coordinator very helpful if you are stuck with something.

I have found it very good to learn how different web services can interact with one another, especially if, in the future, a company I work for wants to merge the systems using middleware integration; this would come in handy.

Software used

Java, Gradle, Swagger UI, Apache Camel, ActiveMQ, AJAX, draw.io (diagrams)

Diagrams

Left: Sale builder

Right: Customer builder

Repository

Linked on GitHub


Kia ora, my name is Raymond!

Graduated with an ICT Degree and Diploma. Open to any graduate and junior opportunities in NZ and Australia.

Hard-working team player with skills in agile software development, web development, cloud computing, server maintenance, vector design, form design, and more.

I’d love to see how things go, feel free to send me your enquiry below or on LinkedIn!

Get in Touch