Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In
Continue with Google
Continue with Facebook
or use


Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here
Continue with Google
Continue with Facebook
or use


Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.


Have an account? Sign In Now

Sorry, you do not have a permission to ask a question, You must login to ask question.

Continue with Google
Continue with Facebook
or use


Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Stack Ask

Stack Ask Logo Stack Ask Logo

Stack Ask Navigation

  • Home
  • About Us
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Contact Us
Home/ Questions/Q 3613
Next
In Process
Hihi
  • 0
HihiTeacher
Asked: December 10, 20212021-12-10T13:43:09+00:00 2021-12-10T13:43:09+00:00In: Spring

Hỏi về Spring Batch

  • 0

Xin chào mọi người, thời gian gần đây em có tìm hiểu về Spring Batch.Em có vài câu hỏi muốn hỏi là:

  1. Điểm mạnh và nổi bật nhất của Spring Batch có phải là chỉ để tối ưu hiệu năng khi  import 1 số lượng cực lớn data của  1 resource (file,…) vào đích (DB,…) không ạ? Ngoài ra thì người ra dùng Batch Processing để làm những gì nữa ạ?
  2. Mong anh Dũng và mọi người cho em xin lộ trình các kiến thức cần học khi tìm hiểu sâu về Spring Batch với ạ.Em đã có biết cơ bản về Job, Step, Processer, Writer, Reader.

Em cám ơn rất nhiều!

batchspring
  • 7 7 Answers
  • 133 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook
  • Report

7 Answers

  • Voted
  • Oldest
  • Recent
  1. tvd12 Enlightened
    2021-12-10T14:53:40+00:00Added an answer on December 10, 2021 at 2:53 pm

    1. Spring Batch không liên quan gì đến hiệu năng em ạ. Nó chỉ đơn giản là 1 thư viện hỗ trợ việc lập lịch và xây dựng các chuỗi hành động khi đến thời điểm mà batch chạy mà thôi.
    2. Các thành phần cơ bản của spring batch cũng chỉ có vậy, em nắm chắc là được em ạ.

    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
    • Hihi Teacher
      2021-12-10T15:44:04+00:00Replied to answer on December 10, 2021 at 3:44 pm

      Dạ em cám ơn anh đã trả lời em ạ.
      Nhưng em có một thắc mắc muốn hỏi anh là các chức năng của Spring Batch thì theo em thấy thì Spring Boot cũng có thể làm được.Nên em nghĩ chắc vì 1 lí do nào đó cao siêu ( ban đầu em nghĩ là xử lí theo batch thì sẽ tối ưu hiệu năng hơn) thì Spring Batch mới xuất hiện.Nhưng theo anh nói việc sử dụng Spring Batch ko giúp việc tối ưu hiệu năng vậy anh cho em hỏi là tại sao người ta lại ra đời Spring Batch vậy anh trong khi Spring Boot cũng có thể làm được ạ?

      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
        • Report
      • dungtv Pundit
        2021-12-15T11:21:01+00:00Replied to answer on December 15, 2021 at 11:21 am

        Cái này anh cũng không rõ em ạ. Anh thấy nó cấu hình tiện hơn đó, kiểu chạy cái này xong đến cái này, tái sử dụng đc 1 ít cấu hình, nhưng anh cũng chẳng dùng bao giờ.

        • 0
        • Share
          Share
          • Share on Facebook
          • Share on Twitter
          • Share on LinkedIn
          • Share on WhatsApp
          • Report
  2. Nguyễn Thái Sơn Professional
    2021-12-11T03:12:33+00:00Added an answer on December 11, 2021 at 3:12 am

    Em hiểu thế nào là batch ?

    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
    • Hihi Teacher
      2021-12-11T15:51:07+00:00Replied to answer on December 11, 2021 at 3:51 pm

      Dạ theo hiểu là Batch Processing là xử lý theo mẻ, tức là mỗi lần connect database ta sẽ insert, update, delete một nhóm bản ghi. Việc xử lý theo mẻ như vậy giúp ta tiết kiệm thời gian (tăng hiệu năng) trong mỗi lần kết nối tới database.

      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
        • Report
  3. dohai2105
    2021-12-22T14:42:25+00:00Added an answer on December 22, 2021 at 2:42 pm

    Batch dùng khi lượng data phải di chuyển lớn ko thể kết thúc trong vài s như lướt web. Ví dụ ngân hàng hết mỗi ngày phải chạy batch để validate lại data của ngày hôm đó, các trang thương mại kiểu amazon hết ngày cũng phải chạy batch để tổng hợp báo cáo cho lãnh đạo. Batch rất quan trọng hầu như hệ thống lớn nào cũng có.

    Spring batch là 1 library tích hợp với  spring nên nó sẽ có các chứng năng của spring plus theo các tính năng hỗ trợ batch. Ví dụ Spring batch có chunk em insert 1 triệu bản ghi em có thể set chunk là 100k thế cứ đọc 100k là vào db, sáng ra xem log thấy batch chết ở 700k thì chạy tiếp chỗ còn lại thui.

    Master thì chạy test debug xem cách các Java champion viết thư viện :v. Đùa thui làm 1 2 lần là quen thui.

     

     

     

    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
    • Hihi Teacher
      2021-12-22T15:19:06+00:00Replied to answer on December 22, 2021 at 3:19 pm

      Cám ơn anh đã chia sẽ ạ !

      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
        • Report

You must login to add an answer.

Continue with Google
Continue with Facebook
or use


Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question

Stats

  • Questions 554
  • Answers 1k
  • Best Answers 63
  • Users 291
  • Popular
  • Answers
  • monkey

    [Deep Learning] Làm thế nào để xác định được cái ...

    • 16 Answers
  • Tú Trần Anh

    [Ezyfox Server] Unity game client không gửi được command khi ...

    • 12 Answers
  • Thưởng Đặng Văn

    Multiple tenant multiple database .net core

    • 10 Answers
  • monkey
    monkey added an answer 1. Em có thể lưu dữ liệu tạm ở Local… May 25, 2022 at 4:52 am
  • Hoàng Kiếm
    Hoàng Kiếm added an answer Huy ơi bạn đã thử login bằng command, mysql -u… May 21, 2022 at 5:42 am
  • tvd12
    tvd12 added an answer public class EzyEventLoopGroup { private final EzyRoundRobin eventLoops; private final… May 19, 2022 at 2:20 pm

Related Questions

  • monkey

    Hướng dấn sử dụng Spring Boot Test controller

    • 0 Answers
  • ptitdev

    Nhiều instance service websocket ?

    • 2 Answers
  • Hihi

    Expose API trả về kiểu Video (giống như Tiktok,..)

    • 7 Answers

Top Members

tvd12

tvd12

  • 63 Questions
  • 1k Points
Enlightened
monkey

monkey

  • 88 Questions
  • 588 Points
Enlightened
Nguyễn Thái Sơn

Nguyễn Thái Sơn

  • 140 Questions
  • 220 Points
Professional

Trending Tags

.net core abstract class analytics android ansible anti-flooding apache poi api async asyncawait atomicboolean backend backend nestjs bash script batch bean big project binding bitcoin blockchain blog british buffered build bundle c# cache caching callback career career path cast centos chat cloud cloud reliability commit company content-disposition contract cors cosmos css database datasource datastructure decentralized exchange deep learning design-pattern devops dex distraction programing docker download draw.io du học dữ liệu lớn eclip editor employee english erc20 erc721 eth ethereum ethereum login extensions exyfox ezyfox ezyfox-boot ezyfox-server ezyfoxserver ezyhttp facebook fe flutter freetank french front-end frontend fullstack fulltextsearch future game game-box game-room game-server get git go golang google grapql grpc guide hazelcast hibernate hibernateconfig html http https indexing intellij interface interview io ipfs isolate issue it java javacore java core javascript java spring javaw java web job jpa js json jsp & servlet jvm jwt kafka keep promise kerberos keycloak kotlin language languague library load-balancing log log4j log4j-core login lưu trữ machine learning macos math maven merge messaging metamask microservice model msgpack multiple tenant multithread multithreading mysql n naming naming convention netcore netty nft nft game nio nodejs non-blocking io opensource optimize orm pagination pancakeswap panic pgpool phỏng vấn pointer postgresql pre programming promise push message android python python unicode question queue rabbitmq reactive reactjs reactjs download recyclerview redis request resource rest roadmap ropssten ropsten rust rxjava schedule search security server shift jis singleton sjis slack smart contract socket soft delete sosanh spring spring-boot-test spring-jpa spring aop spring boot springboot spring data jpa spring redis spring security springsecurity sql sql server sse stackask storage stream structure trong spring boot system environment variables thread threadjava thymeleaf totp tracking location unit test unity upload file vector view volatile vue vue cli web3 web3 client webpack websocket windows 11 winforms work zookeeper

Footer

Stack Ask

Stack Ask is where Developers Ask & Answers. It will help you resolve any questions and connect you with other people.

About Us

  • Meet The Team
  • About Us
  • Contact Us

Legal Stuff

  • Terms of Service
  • Privacy Policy
  • Cookie Policy

Help

  • Knowledge Base
  • Support

Follow

© 2021 Stack Ask. All Rights Reserved
Powered by youngmonkeys.org