[DOC] Why we deciced to make RR2 as the library and where is the RR2 binaries? #600
rustatian
started this conversation in
Show and tell
Replies: 2 comments 2 replies
-
In light of this, maybe the documentation at https://roadrunner.dev/docs/intro-install should be updated to reflect these changes since the |
Beta Was this translation helpful? Give feedback.
2 replies
-
Hey @jwillp. You are totally right, nice catch. Will do 👍🏻 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As you can see now, RR2 does not contain a
cmd
folder withmain.go
; thus, RR2 can not be run as a standalone program. Instead, RR2 is a runtime for the plugins andPHP
processes management. We did so because of circular dependencies. Imagine the following concept:pkg/pool
inside, thus have import likeimport "github.com/spiral/roadrunner/v2/pkg/pool
."import github.com/temporalio/roadrunner-temporal
in thecmd
folder.RR2 <-> RRT
.How to deal with that problem? We tried the following ways:
go.mod
for each plugin. Very very very hard to properly set versions. For example:logger
depends onconfig
; thus, we should set theconfig
version first. The problem comes when we have 15+ plugins... And also, not of them are free from RR, so, back to circular dependencies.cmd
, and one isroadrunner-binary
with binaries. But that also confusing because we should have 2 types of releases. First - just tag for the RR library, second - actual release with binaries. This solution solves problems with circular dependencies but leads to mistakes and confusion in the releases. For example, release 2.0.1 without binaries (tag) and 2.0.2 with binaries. What release to use? May I use 2.0.1? What the difference between them? So, a lot of questions.When I learned all of this stuff, we decided to leave RR2 as just a library for the plugins. And I introduced a separate repository roadrunner-binary, which has the purpose of:
How to use all this stuff:
1.1 Import the RR2 library and use abstractions from it.
1.2. Add your brand new plugin to the roadrunner-binary repo as just 1 import line or to your personal clone of it; that's it.
2.1.
$ vendor/bin/rr get
command pointing to theroadrunner-binary
repository, so no changes from the PHP side.Beta Was this translation helpful? Give feedback.
All reactions