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

Document the LoopBack 4 request-response cycle #1833

Closed
hacksparrow opened this issue Oct 10, 2018 · 10 comments
Closed

Document the LoopBack 4 request-response cycle #1833

hacksparrow opened this issue Oct 10, 2018 · 10 comments
Assignees
Labels
Milestone

Comments

@hacksparrow
Copy link
Contributor

This will be a low-level description of all the components involved in the request-response handling process. It will help consumers and developers interested in knowing what's happening under the hood.

@hacksparrow hacksparrow self-assigned this Oct 10, 2018
@marioestradarosa
Copy link
Contributor

@hacksparrow , I can't wait to see this documentation. I am hungry to learn.

@dhmlau dhmlau added the TOB label Oct 19, 2018
@b-admike
Copy link
Contributor

based on @raymondfeng's feedback, here are some details to consider in this narrative (opt for visualization for clarity):

  • node.js http layer
  • express listening on given port (restServer)
  • middleware processing
  • sequence actions
  • default sequence
  • routing (find the route, parse parameters, request body (checking OpenAPI spec), invoking controller method/handler with parameters)
  • serialize response, reject if necessary
  • send action
  • how each request creates a controller instance

Try to group it into two phases: 1st phase interaction between API client and LoopBack, 2nd phase API business logic interact with existing backend services using repositories/datasources/models.

@dhmlau dhmlau added 2019Q2 and removed TOB labels Feb 8, 2019
@dhmlau
Copy link
Member

dhmlau commented Mar 19, 2019

Closing as duplicate of #2390

@bajtos
Copy link
Member

bajtos commented Mar 29, 2019

@dhmlau I slightly disagree. The goal of #2390 is to describe request-handling flow at high level, especially in regards to different Express middleware types. I am concerned that by including low-level details listed in #1833 (comment), we will greatly inflate the scope of #2390. Was this change taken into account when #2390 was estimated?

@dhmlau
Copy link
Member

dhmlau commented Mar 29, 2019

When discussing with @raymondfeng , he mentioned that this is a duplicate of #2390. Since #2390 has more descriptions so we're closing this issue instead.
If two are different, is there any sequence we should work on the task?

@raymondfeng , what's your thoughts?

@dhmlau
Copy link
Member

dhmlau commented Mar 29, 2019

Let's reopen it for now so that we won't forget.

@dhmlau dhmlau reopened this Mar 29, 2019
@bajtos
Copy link
Member

bajtos commented Mar 29, 2019

If two are different, is there any sequence we should work on the task?

I would start with #2390, I think it's a smaller task.

@dhmlau
Copy link
Member

dhmlau commented Mar 11, 2020

FYI - There's a diagram at the top of https://loopback.io/doc/en/lb4/Concepts.html, it would be a good starting point.

https://loopback.io/pages/en/lb4/imgs/key-concepts-overview-diagram.png

@dhmlau dhmlau added this to the Mar 2020 milestone Mar 12, 2020
@dhmlau
Copy link
Member

dhmlau commented Mar 24, 2020

PR in progress: #4914

@dhmlau
Copy link
Member

dhmlau commented Mar 25, 2020

Closing this issue as #4914 lands

@dhmlau dhmlau closed this as completed Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants