-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
RFC: Monorepo #1
Comments
I have several concerns about the monorepo approach: 1) Modular design So far, LoopBack was designed as a composition of smaller building blocks (juggler, remoting) that can be used on their own. In which case I think it's better for both strong-remoting and juggler to live in their own repository that can be versioned independently and have project-focused issue tracker where people interested only in a particular building block can follow the discussions without being overwhelmed by everything else happening in LoopBack core. Having said that, it doesn't look like there are many people using strong-remoting or juggler without loopback (loopback downloads: 58k/month, juggler downloads: 58k/month, remoting: 52k/month, see also https://www.npmjs.com/browse/depended/strong-remoting and https://www.npmjs.com/browse/depended/loopback-datasource-juggler), so maybe it's time to get rid of this layered design and move all code into a single Node.js project/npm package? 2) Back/forward-porting changes, git history With 3.x version living in multiple GitHub repositories, and the NEXT version living in a single monorepo, it will be difficult to back/forward port changes across major versions, as Also if we eventually decide to copy code from loopback-next monorepo into individual projects we have now, the commit history and links to valuable discussions in pull requests will be lost. Here is the alternative solution I would like to propose for consideration:
|
Related reading:
The first article recommends https://lernajs.io/ as the tool to use for managing a monorepo containing multiple npmjs packages. |
Here are my take aways from above:
So I think the things for consideration are:
|
Please also consider the impact to CI our systems which may have assumptions about the module/repo layout. |
I completely agree with this. IMO, if we're going to sell Juggler as it's own thing, why attach the LoopBack name to it. Could be like waterline from sails for example. Maybe people can swap ORMs in the future for one they prefer, etc. I'm down with unix philosophy of do one thing (which means more repos really). We shouldn't have to rewrite large portions because we coupled our components too much, we need better decouplling and better extensibility. What if they want to swap strong-remoting or boot itself. I think we need to design from a different perspective: extensibility first, which means end users will have to hook in via other GitHub repos (and we're going to dogfood our own extensibility API first). Anyways, one huge benefit of monorepo I can see is centralizing issues to one github repo which will make keeping track and searching through issues much easier during triage/roadmapping compared to what we have now. I'm also concerned about CI and the line-ups that I can already see forming. Less concerned when it's distributed over N repos like we do now and take advantage of free open source CI systems like traivs (which can run in parallel over N projects). |
For now the approach is to try lernajs as part of the general 4.x refactor / rewrite in TS. If it ultimately does not work out lets open another discussion. Closing for now to keep focused on moving forward. |
* feat(websocket): add files of websocket extension implementation Implementation of websocket server allow route controller by namespace, handle events and customize way Signed-off-by: Alexander Rondon <[email protected]> * feat(socketio): bind key for request listener used to create httpserver Signed-off-by: Alexander Rondon <[email protected]> * feat(socketio): bind SocketIO instance and created namespaces Signed-off-by: Alexander Rondon <[email protected]> * feat(socketio): add providers ot handler sequence of event handle Signed-off-by: Alexander Rondon <[email protected]> * refactor(socketio): preparing socket controller factory for test Signed-off-by: Alexander Rondon <[email protected]> * feat(socketio): add booter to autoload controller Signed-off-by: Alexander Rondon <[email protected]> * refactor(socketio): preparation context connection moved into websocket controller factory Signed-off-by: Alexander Rondon <[email protected]> * feat(socketio): add decorator for injection of io server as param Signed-off-by: Alexander Rondon <[email protected]> * feat(socketio): separate httpOptions of serverOptions in the applications options Signed-off-by: Alexander Rondon <[email protected]> * fix(socketio): add socketio controller booter Signed-off-by: Alexander Rondon <[email protected]> * test(socketio): add unit test from webscoket extension Signed-off-by: Alexander Rondon <[email protected]> * refactor(socketio): move application and controllers into acceptance tests to fixture dir Signed-off-by: Alexander Rondon <[email protected]> * test(socketio): add acceptance tests for events Signed-off-by: Alexander Rondon <[email protected]> * chore(socketio): remove unnecessaries packages Signed-off-by: Alexander Rondon <[email protected]> * refactor(socketio): add constant SocketIOBinding.CONTROLLERS_NAMASPACE Signed-off-by: Alexander Rondon <[email protected]> * chore(socketio): license update Signed-off-by: Alexander Rondon <[email protected]> * chore(socketio): update MONOREPO and CODEOWNERS Signed-off-by: Alexander Rondon <[email protected]> * feat: remove websocket extension Signed-off-by: Alexander Rondon <[email protected]> * fix(example-socketio): update imports and options Signed-off-by: Alexander Rondon <[email protected]> Co-authored-by: Raymond Feng <[email protected]> Signed-off-by: Alexander Rondon <[email protected]>
* feat(websocket): add files of websocket extension implementation Implementation of websocket server allow route controller by namespace, handle events and customize way Signed-off-by: Alexander Rondon <[email protected]> * feat(socketio): bind key for request listener used to create httpserver Signed-off-by: Alexander Rondon <[email protected]> * feat(socketio): bind SocketIO instance and created namespaces Signed-off-by: Alexander Rondon <[email protected]> * feat(socketio): add providers ot handler sequence of event handle Signed-off-by: Alexander Rondon <[email protected]> * refactor(socketio): preparing socket controller factory for test Signed-off-by: Alexander Rondon <[email protected]> * feat(socketio): add booter to autoload controller Signed-off-by: Alexander Rondon <[email protected]> * refactor(socketio): preparation context connection moved into websocket controller factory Signed-off-by: Alexander Rondon <[email protected]> * feat(socketio): add decorator for injection of io server as param Signed-off-by: Alexander Rondon <[email protected]> * feat(socketio): separate httpOptions of serverOptions in the applications options Signed-off-by: Alexander Rondon <[email protected]> * fix(socketio): add socketio controller booter Signed-off-by: Alexander Rondon <[email protected]> * test(socketio): add unit test from webscoket extension Signed-off-by: Alexander Rondon <[email protected]> * refactor(socketio): move application and controllers into acceptance tests to fixture dir Signed-off-by: Alexander Rondon <[email protected]> * test(socketio): add acceptance tests for events Signed-off-by: Alexander Rondon <[email protected]> * chore(socketio): remove unnecessaries packages Signed-off-by: Alexander Rondon <[email protected]> * refactor(socketio): add constant SocketIOBinding.CONTROLLERS_NAMASPACE Signed-off-by: Alexander Rondon <[email protected]> * chore(socketio): license update Signed-off-by: Alexander Rondon <[email protected]> * chore(socketio): update MONOREPO and CODEOWNERS Signed-off-by: Alexander Rondon <[email protected]> * feat: remove websocket extension Signed-off-by: Alexander Rondon <[email protected]> * fix(example-socketio): update imports and options Signed-off-by: Alexander Rondon <[email protected]> Co-authored-by: Raymond Feng <[email protected]> Signed-off-by: Alexander Rondon <[email protected]>
- add files of websocket extension implementation - bind key for request listener used to create httpserver - bind SocketIO instance and created namespaces - add providers ot handler sequence of event handle - preparing socket controller factory for test - add booter to autoload controller - preparation context connection moved into websocket controller factory - add decorator for injection of io server as param - separate httpOptions of serverOptions in the applications options - add socketio controller booter - test(socketio): add unit test from webscoket extension - move application and controllers into acceptance tests to fixture dir - add acceptance tests for events - remove unnecessaries packages - add constant SocketIOBinding.CONTROLLERS_NAMASPACE - license update - update MONOREPO and CODEOWNERS - remove websocket extension - update imports and options Signed-off-by: Alexander Rondón <[email protected]> Signed-off-by: mayank <[email protected]>
Signed-off-by: Alexander Rondon <[email protected]> Signed-off-by: mayank <[email protected]>
- add files of websocket extension implementation - bind key for request listener used to create httpserver - bind SocketIO instance and created namespaces - add providers ot handler sequence of event handle - preparing socket controller factory for test - add booter to autoload controller - preparation context connection moved into websocket controller factory - add decorator for injection of io server as param - separate httpOptions of serverOptions in the applications options - add socketio controller booter - test(socketio): add unit test from webscoket extension - move application and controllers into acceptance tests to fixture dir - add acceptance tests for events - remove unnecessaries packages - add constant SocketIOBinding.CONTROLLERS_NAMASPACE - license update - update MONOREPO and CODEOWNERS - remove websocket extension - update imports and options Signed-off-by: Alexander Rondón <[email protected]> Signed-off-by: mayank <[email protected]>
Signed-off-by: Alexander Rondon <[email protected]> Signed-off-by: mayank <[email protected]>
In the past year or two, we have repeatedly came across the idea of using a single monorepo containing all core LoopBack modules (strong-remoting, juggler, loopback, possibly others like swagger, etc.). The last time this was mentioned by @ritch when discussing loopback-next kick-off.
In this thread, I'd like to discuss pros and cons of using monorepo approach for the development of loopback-next (and possibly beyond).
@raymondfeng @superkhau @ritch
The text was updated successfully, but these errors were encountered: