Spring Integration microservices visualization tool - java

I have an application based on microservices which communicate to each other via queues and topics. Each microservice is built using Spring Integration with XML configurations.
Is there a tool/framework that I could use to automatically generate diagram for the whole application, which would ideally show Spring Integration details for each microservice and as well the connection (via queues/topics) between the microservices?

Each application can be visualized using the spring integration runtime graph together with a viewer application.
See the file-split-ftp sample for an example. The viewer mentioned on the README page is in the the angular 1.x branch of the referenced spring-flo project.
Also see Tim Ysewyn's blog post here "VISUALIZING YOUR SPRING INTEGRATION COMPONENTS & FLOWS".
If you create your microservices using Spring Cloud Stream and deploy/orchestrate them using Spring Cloud Dataflow, you can visualize them at a higher level; examples are in the reference manual.

Related

Where can I find a minimal spring boot boilerplate web app with backend and frontend?

I want a barebone template project for a webapp implemented using spring boot (frontend + backend APIs - DB)
I referred this VS Code's doc for working with Java. It worked fine but it is not a complete webapp.
Thanks in advance!
Vaadin Flow is a GUI framework for web apps driven through Spring Boot. (Alternatively, you can base your Vaadin app on Jakarta EE or plain Jakarta Servlet.)
A customized project template can be generated from their "Start building" web page.
You can manage your Vaadin project with either Maven or Gradle.
If you want to generate an app with spring boot + angular/reactjs/vuejs I think that the best solution by far at this moment is JHipster.

Multifunctional SpringBoot JAVA Application (REST/BATCH/LAMBDA)

I have a java spring boot application that runs a job to upload data to Database after polling a message from SQS and this application also contains a REST API over that same database.
Now I need to decouple the upload functionality and REST API.
Upload functionality would be done by an AWS Batch Job which would be triggered by a lambda.
Rest API would be simply as it was before.
Challenge is that I need to do all these operations within the same code repo. This is to avoid having 3 repositories one for REST API, another for the AWS Batch Job, and the last for AWS lambda handler.
Thus trying to find out solutions that spring boot can provide to run a same application in different modes. Please help.
I won't recommend using Spring Boot for lambda - technically you can, but it's waste of money. Spring Boot is overhead for java, it requires more memory, so it's more expensive.
You need to create a multi-module Maven application. The modules would be:
Existing Spring Boot app.
Batch job.
Common code, used by modules 1 & 2.
Simple new lambda.
... more modules if you need ...
But if you still sure that for some reason you want to wrap existing Spring Boot app into lambda, this library would help you:
https://github.com/awslabs/aws-serverless-java-container/wiki/Quick-start---Spring-Boot

Recommended deployment mode for Reactjs

My application is built on microservices architecture and heavily using spring boot.
we want to add an UI dashboard for our app and chose reactJs as we liked the framework. we are new to reactJs.
unlike backend server packagers, ReactJs has tonnes of tools for packaging such as webpack, gulp, babel, and so on
Coming from spring boot background, wondering if there is any recommended ways to package UI code that doesn't deviate much from existing spring boot?
I have successfully packed UI code into spring boot applications using webjars
build the UI with its own tools
package these into a webjar
in your spring boot app, add a maven dependency to the webjar
add resource mappings to the ui content in the spring config
This works, but I dont use that approach any longer because
you need to build/deploy the backend even for minor UI changes
UI developer need to deal with backend configs and builds
you use expensive server resources, just to serve static content
Instead
build the UI with its own tools
host them somewhere Amazon S3 or CDN

Bluemix: Java Rest API starter app

I want to run and deploy a java rest API code on Bluemix. This is more to understand the Devops capabilities in conjunction with API management.
I tried to use this: http://www.codingpedia.org/ama/tutorial-rest-api-design-and-implementation-in-java-with-jersey-and-spring/
But could not push it to Bluemix. May I get some support?
Update:
When I push it to Bluemix, I get an error saying it could not find appropriate runtime.
Reading your comments you are searching for some pointers to create a starter Java REST application (possibly integrating a delivery pipeline).
You can start creating an application on Bluemix using the Liberty for Java runtime. Then you can, from your application dashboard, click on "Add Git" to create a Git repository on IBM Bluemix DevOps Services (IDS). Now you have your starter application running on Bluemix and its code hosted on IDS. You can edit the code directly on the Web IDE of IDS (clicking on "Edit Code") and from there push the new versions of the applcation on Bluemix or you can clone the repository on your local environment (for example using the Eclipse Tools for Bluemix) and deploy directly from your machine to Bluemix.
Using the first option you will be able to quickly setup a delivery pipeline using the "Build & Deploy" button, and use the DevOps capabilities of IDS. The Build & Deploy feature, also known as the pipeline, automates the continuous deployment of your projects. In a project's pipeline, sequences of stages retrieve input and run jobs, such as builds, tests, and deployments.
To add REST capabilities to the sample application you can for example use JAX-RS 2.0. Take a look here.
Javaee jax-rs REST API starter
Use my java REST API starter for bluemix. This uses javaee + jax-rs + swagger
Just fork it, run pom.xml to generate war and push the war file to bluemix. Works like a charm
https://github.com/sanketsw/jax_rs_REST_Example
Spring boot REST API starter for bluemix
if you want a spring boot REST API starter, you can use the following boilerplate. This is a netflix eureka client but you can ignore eureka annotations. The REST API will work seamlessly anyway
https://github.com/sanketsw/Netflix_Eureka_Client_Hello_World
Another cleaner springboot REST API starter is here: https://github.com/sanketsw/SpringBoot_REST_API

Data exchange between Java (Spring app) and C#

I have a Spring web application and an standalone application written on C#. Only Spring application has an access to DB, so I want to implement data exchange between Java and C#. The data isn't large (100KB / Min or so). Application will be placed on the same machine. What is the best way to integrate a communication? Does Spring Framework has a module to work with?
Spring certainly does have a module for doing this, it's called Spring Integration. You can define inbound and outbound channels/gateways and before the data comes in or out do any transformation on it needed to get it in the right format. Pretty standard functionality for doing enterprise integration.
Alternatively if that's too heavy weight you could expose a RESTful webservice in the spring application using the #RestController annotation and call that api from C# application. Another alternative would be to expose a spring-ws Web service in the spring application and write a Soap client that calls it in the C# application.

Categories

Resources