How to register Spring Batch Application in spring cloud data flow? - spring

I am trying to register Spring bath project jar file in spring cloud data flow. I am pretty new to spring cloud data flow. Please help me step by step process to register Spring batch Job in spring cloud data flow.

There are a few examples in the SCDF-samples repo.
Also, we spend cycles writing the documentation, so please make sure to review the reference guide; in particular the task/batch sections could be useful.

Related

need advice on approach of reading file from the Linux system

I am somewhat new to java and spring.
We have the requirement of reading the file of some thousand records and calling micro service developed in spring boot deployed on PCF.
I have two approaches in my mind. One is we have simple spring boot application where it reads the file and call required micro service. The other is to develop spring batch with dummy item writer which calls micro service.
Confused which one to choose. Any advise here will be appreciated.

Does Spring Data Flow and Spring Cloud Stream is what I need to build a data processing pipeline with Choreography approach?

I am planning to implement a data processing pipeline using the Microservice Architecture in Java. Since I have been using Spring boot to implement some of the Microservice already, I am investigating the rest of Spring components to see which one can help me to address my requirements. I have found out Spring Cloud Stream helps me to implement my solution using the event-driven approach, but I am not quite sure whether Spring Data Flow acts as a Single Point of Failure and does the orchestration of the microservices or it actually acts as a tool to help with visualizing the pipeline and deployment to Kubernetes, Cloud Foundry, etc. and still work passively outside the pipeline. Therefore, if it is failed for any reason, the pipeline can work without any interruptions.
To clarify what I am asking for, does the combination of Spring Cloud Stream and Spring Cloud Data Flow provide an almost similar approach to what this article refers to it as a best of both worlds of Orchestration and Choreography?
https://www.sapientglobalmarkets.com/blog/big-data-pipeline-orchestration-choreography

Spring cloud task on data flow server vs #EnableTask

I am new to Spring cloud data flow. Trying to figure out what it mean by registering, creating a task on spring cloud data flow server vs running a spring class with annotation #EnableTask
Any clarification to understand what these two are, will be helpful!
With Spring Cloud Task, you'd build and test standalone Task microservices in isolation. With the programming model, you can address use-cases ranging from ETL/ELT, data migration, or predictive-model-training etc.
Once you have an "n" no. of such applications, you could use Spring Cloud Data Flow's DSL to compose them into coherent Task/Batch pipelines. To use them in the DSL, you'd have to first register the coordinates of the standalone Task Apps.
Refer to the SCDF's Task overview and as well as the Task Developer Guide for more details - you could repeat it locally to follow along and learn the mechanics.

Kafka ItemWriter for Spring Batch for Spring Cloud Data Flow

I've created a Spring Batch application which reads data from file and write to database. I want to write output data into Kafka. I've tried to use Spring Cloud Data Flow but could not even run it.
I've followed that tutorial: https://spring.io/guides/gs/batch-processing/
when I register it to Spring Cloud Data Flow it gives a status as N/A. I've checked that tutorial: http://www.baeldung.com/spring-cloud-data-flow-batch-processing and added #EnableTask to my application class but result is same.
My question is: I want to write data to Kafka and use that Spring Batch job at Spring Cloud Data Flow. How can I do that?

Spring XD REST Service

I would like to have a REST service to expose the data read and processed from Spring XD. Similar to the one in the Analytics Server.
For example I would like my own functions which can be exposed similar to Counters and be able to access the data from a web browser.
Is there any tutorial? I have searched and found that Spring Boot is the one but I am looking for help on how I integrate it with Spring XD.
Would be very helpful if someone can point me to the instructions on how I can achieve this.
You can use trigger as a source with http-client as a processor processor to access any web browsers info regardless if it is a web service URL or not.
Moha.

Resources