Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firat attempt at adding some business logic.. #8

Merged
merged 4 commits into from Nov 15, 2020
Merged

Firat attempt at adding some business logic.. #8

merged 4 commits into from Nov 15, 2020

Conversation

simonblund
Copy link
Owner

resolves #7
resolves #6

Take a close look at this request, do we need to keep more information in the student object. The main redesign is that we now keep base information about the student in the microservice for convinience for future development of the project.

@simonblund simonblund added this to In progress in SOA-G2 via automation Nov 13, 2020
@weleoka
Copy link
Collaborator

weleoka commented Nov 13, 2020

Hey,

Nice work on the implementations. Seems to be sticking to the books of how Spring works. A few thoughts here.

The main redesign is that we now keep base information about the student in the microservice for convinience for future development of the project.

  1. You mean that persistence level is now included in the studentservice... so, how does this play in with the mock-services? Will we guarantee transactions and integrity in the service methods with concurrent API requests to the mock-api and writing to this microservice's persistence level?
    All I see now is that this enables the service to be a true microservice... and saves hassles by not having to implement a requests library (and operate on triggers) in student-service.... but sooner or later that has to be done.

  2. Also, I don't aggre that issue You should be able to create a new student using POST containing basic student info (name, ssn) #7 belongs here in this service. We have to stick with the task of linking grades to students and course modules vs. ladok. We can't let the project drift and re-write a whole implementation for NyA... or am I missing something?

How do you want to go ahead with this merge? Continue working in the branch or start a new one, because I would vote to not pass this PR as it stands now. I'd like a second opinion @limolback2016 please.

Cheers

@simonblund
Copy link
Owner Author

I concur with your comment regarding NyA, theoretically we could make that a scheduled task instead. Student-service pulling NyA for new students. I'll have to take a closer look at the mock API before continuing. However for testing purposes an easy to use endpoint to create students is vital.

@weleoka
Copy link
Collaborator

weleoka commented Nov 13, 2020

In fact I think a POST request to mock-services will create a student... it's an in-memory db just manipulated with REST calls and not Repository-classes... which makes me wonder if Spring HTTP requests module/dependency can act like a Repository. Like an ORM around an API.

@simonblund
Copy link
Owner Author

resolves #9

@@ -9,10 +9,12 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.cloud:spring-cloud-starter-circuitbreaker-resilience4j'
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably drop these dependencies to JPA and h2 database.

services:
mock-service:
url: http://localhost:8282
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a newline at end of file.

SOA-G2 automation moved this from In progress to Reviewer approved Nov 15, 2020
Copy link
Collaborator

@weleoka weleoka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a look over this. To get on with the merge I'll approve.

@weleoka
Copy link
Collaborator

weleoka commented Nov 15, 2020

Good work! Made a squash merge to master.

@weleoka weleoka closed this Nov 15, 2020
SOA-G2 automation moved this from Reviewer approved to Done Nov 15, 2020
@weleoka weleoka reopened this Nov 15, 2020
SOA-G2 automation moved this from Done to In progress Nov 15, 2020
@weleoka weleoka merged commit 0cea265 into master Nov 15, 2020
SOA-G2 automation moved this from In progress to Done Nov 15, 2020
@weleoka weleoka deleted the feature-1 branch November 15, 2020 15:30
@weleoka
Copy link
Collaborator

weleoka commented Nov 15, 2020

Done. Made the merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
2 participants