Sage-Bionetworks / sage-monorepo

Where OpenChallenges, Schematic, and other Sage open source apps are built
https://sage-bionetworks.github.io/sage-monorepo/
Apache License 2.0
23 stars 12 forks source link

[Story] Filter challenges by organization #1035

Closed tschaffter closed 1 year ago

tschaffter commented 1 year ago

Enable to filter challenges by organization.

Tasks

tschaffter commented 1 year ago

The Challenge service needs to get information from the Organization service.

Sync vs Async communication

So we should evolve our architecture with applying Async communication or Service Aggregator Pattern in microservices patterns in order to accommodate business adaptations faster time-to-market and handle larger requests.

If we have a few interaction with querying microservices then we should use HTTP request/response with resource APIs. But when it comes to busy interactions in communication across multiple microservices, then we should use asynchronous messaging platforms like message broker systems.

We said Asynchronous protocols, which is AMQP protocol for performing async message transmissions.

So If you have multiple microservices are required to interact each other and if you want to interact them without any dependency or make loosely coupled, than we should use Asynchronous event-driven communication with publish/subscribe pattern in Microservices Architecture.

Async Solutions

There 2 good alternatives that you can pick

Also There are a lot of options for asynchronous integration. Some of the widely used ones are:

Also there is other good options for cloud options like Azure Service Bus or Amazon Kinesis for event streaming.

You said message broker so I’ll say rabbitmq. Rabbit is simple and integrates easily with Boot. It’s geared around the mechanics of routing and reliable message passing. That makes it great between services. Kafka is geared around it’s distributed message log design that makes it great for passing lots of data at high throughput (as opposed to low latency). I would use rabbit for interprocess communication in a microservice architecture. I would use Kafka to send those events to a data lake or data warehouse.

About Feign and RestTemplate

When we use the RestTemplate to call the RESTful service, it creates duplication of code that talks to RESTful services. When we define Feign, we need only to define a proxy and define a single method into it. Feign helps us to simplify client code to talk to the RESTful web services.

https://www.javatpoint.com/using-feign-rest-client-for-service-invocation

OA Generator and communication

The Java generator can be used to generate a library for Feign, resttemplate, and other frameworks.

https://openapi-generator.tech/docs/generators/java/

tschaffter commented 1 year ago

Update 2023-03-19

Remaining tasks include:

tschaffter commented 1 year ago

Update 2023-03-27

The backend of this feature is ready. The frontend behavior is being modified so that typing text in the filter input fields triggers a full-text search using the backend instead of 1) pulling all the results and 2) filtering then at the level of the web app. This will make the behavior of the search input field more consistent across the web app.