Skip to main content
added 103 characters in body
Source Link
Laiv
  • 15k
  • 2
  • 34
  • 72

I'm worried about overloading the Spring microservice with API requests and adding data to the DB.

If you are worried about performance, delegating more workload to the Spring MS won't make you any good.

I understand that in microservice architecture it is better to have each microservice have its database. However, these two microservices are heavily linked to the database.

When each MS is a whole different application contributing to a greater good. Even when they are, there should be a more powerful reason (other than "theory says...") motivating design decisions like yours.

In this specific case (based on the info we have), both arecould be "the same service" or both share the same "business". It happens that, reads and writes are handled apart, and each responsibility has been implemented in different programming languages. That's fine! You have specialized "workers". Python is a great choice for data processing, and Spring is a versatile stack that allows you to deploy web APIs with many different integrations with minimum code.

I have thought about introducing a message queue between the services so the Flask service will just send the processed json to a queue and the Spring service will handle the messages from the queue and add the processed data to a database.

It seems unnecessary complexity. It would be simpler to have a single MS. However, you got 1, composed of 2. That's great because you can scale up/out each of them apart. The more file processing throughput you need, the more Python MS instances you deploy. The more concurrency you have on the fetching side, the more Spring MS you deploy.

I'm worried about overloading the Spring microservice with API requests and adding data to the DB.

If you are worried about performance, delegating more workload to the Spring MS won't make you any good.

I understand that in microservice architecture it is better to have each microservice have its database. However, these two microservices are heavily linked to the database.

When each MS is a whole different application contributing to a greater good.

In this specific case (based on the info we have), both are "the same service" or both share the same "business". It happens that, reads and writes are handled apart, and each responsibility has been implemented in different programming languages. That's fine! You have specialized "workers". Python is a great choice for data processing, and Spring is a versatile stack that allows you to deploy web APIs with many different integrations with minimum code.

I have thought about introducing a message queue between the services so the Flask service will just send the processed json to a queue and the Spring service will handle the messages from the queue and add the processed data to a database.

It seems unnecessary complexity. It would be simpler to have a single MS. However, you got 1, composed of 2. That's great because you can scale up/out each of them apart. The more file processing throughput you need, the more Python MS instances you deploy. The more concurrency you have on the fetching side, the more Spring MS you deploy.

I'm worried about overloading the Spring microservice with API requests and adding data to the DB.

If you are worried about performance, delegating more workload to the Spring MS won't make you any good.

I understand that in microservice architecture it is better to have each microservice have its database. However, these two microservices are heavily linked to the database.

When each MS is a whole different application contributing to a greater good. Even when they are, there should be a more powerful reason (other than "theory says...") motivating design decisions like yours.

In this specific case (based on the info we have), both could be "the same service". It happens that, reads and writes are handled apart, and each responsibility has been implemented in different programming languages. That's fine! You have specialized "workers". Python is a great choice for data processing, and Spring is a versatile stack that allows you to deploy web APIs with many different integrations with minimum code.

I have thought about introducing a message queue between the services so the Flask service will just send the processed json to a queue and the Spring service will handle the messages from the queue and add the processed data to a database.

It seems unnecessary complexity. It would be simpler to have a single MS. However, you got 1, composed of 2. That's great because you can scale up/out each of them apart. The more file processing throughput you need, the more Python MS instances you deploy. The more concurrency you have on the fetching side, the more Spring MS you deploy.

added 103 characters in body
Source Link
Laiv
  • 15k
  • 2
  • 34
  • 72

I'm worried about overloading the Spring microservice with API requests and adding data to the DB.

If you are worried about performance, delegating more workload to the Spring MS won't make you any good.

I understand that in microservice architecture it is better to have each microservice have its database. However, these two microservices are heavily linked to the database.

When each MS is a whole different application contributing to a greater good.

In this specific case (based on the info we have), both are "the same service" or both share the same "business". It happens that, reads and writes are handled apart, and each responsibility has been implemented in different programming languages. That's fine! You have specialized "workers". Python is a great choice to processfor data processing, and Spring is a versatile stack that allows you to deploy web APIs with many different integrations with minimum code.

I have thought about introducing a message queue between the services so the Flask service will just send the processed json to a queue and the Spring service will handle the messages from the queue and add the processed data to a database.

It'sIt seems unnecessary complexity. It would be simpler to have a single MS. However, you got 1, composed of 2. That's great because you can scale up/out each of them apart. The more file processing throughput you need, the more Python MS instances you deploy. The more concurrency you have on the fetching side, the more Spring MS you deploy.

I'm worried about overloading the Spring microservice with API requests and adding data to the DB.

If you are worried about performance, delegating more workload to the Spring MS won't make you any good.

I understand that in microservice architecture it is better to have each microservice have its database. However, these two microservices are heavily linked to the database.

When each MS is a whole different application contributing to a greater good.

In this specific case, both are "the same service". It happens that, reads and writes are handled apart, and each responsibility has been implemented in different programming languages. That's fine! You have specialized "workers". Python is a great choice to process data, and Spring is a versatile stack that allows you to deploy web APIs with minimum code.

I have thought about introducing a message queue between the services so the Flask service will just send the processed json to a queue and the Spring service will handle the messages from the queue and add the processed data to a database.

It's unnecessary complexity. It would be simpler to have a single MS. However, you got 1, composed of 2. That's great because you can scale up/out each of them apart. The more file processing throughput you need, the more Python MS instances you deploy. The more concurrency you have on the fetching side, the more Spring MS you deploy.

I'm worried about overloading the Spring microservice with API requests and adding data to the DB.

If you are worried about performance, delegating more workload to the Spring MS won't make you any good.

I understand that in microservice architecture it is better to have each microservice have its database. However, these two microservices are heavily linked to the database.

When each MS is a whole different application contributing to a greater good.

In this specific case (based on the info we have), both are "the same service" or both share the same "business". It happens that, reads and writes are handled apart, and each responsibility has been implemented in different programming languages. That's fine! You have specialized "workers". Python is a great choice for data processing, and Spring is a versatile stack that allows you to deploy web APIs with many different integrations with minimum code.

I have thought about introducing a message queue between the services so the Flask service will just send the processed json to a queue and the Spring service will handle the messages from the queue and add the processed data to a database.

It seems unnecessary complexity. It would be simpler to have a single MS. However, you got 1, composed of 2. That's great because you can scale up/out each of them apart. The more file processing throughput you need, the more Python MS instances you deploy. The more concurrency you have on the fetching side, the more Spring MS you deploy.

Source Link
Laiv
  • 15k
  • 2
  • 34
  • 72

I'm worried about overloading the Spring microservice with API requests and adding data to the DB.

If you are worried about performance, delegating more workload to the Spring MS won't make you any good.

I understand that in microservice architecture it is better to have each microservice have its database. However, these two microservices are heavily linked to the database.

When each MS is a whole different application contributing to a greater good.

In this specific case, both are "the same service". It happens that, reads and writes are handled apart, and each responsibility has been implemented in different programming languages. That's fine! You have specialized "workers". Python is a great choice to process data, and Spring is a versatile stack that allows you to deploy web APIs with minimum code.

I have thought about introducing a message queue between the services so the Flask service will just send the processed json to a queue and the Spring service will handle the messages from the queue and add the processed data to a database.

It's unnecessary complexity. It would be simpler to have a single MS. However, you got 1, composed of 2. That's great because you can scale up/out each of them apart. The more file processing throughput you need, the more Python MS instances you deploy. The more concurrency you have on the fetching side, the more Spring MS you deploy.