sofastack / sofa-rpc

SOFARPC is a high-performance, high-extensibility, production-level Java RPC framework.
https://www.sofastack.tech/sofa-rpc/docs/Home
Apache License 2.0
3.81k stars 1.17k forks source link

Framework Design Optimization Proposal #1329

Closed dajitui closed 1 year ago

dajitui commented 1 year ago

Your question

@SofaService When I saw this annotation in Sofa-boot, I didn't think it was very reasonable

If I am a user, it is generally better to rely on fewer third-party packages. If I want to use Sofa-rpc now, I need to rely on Sofa-boot dependencies, which will be more important for the framework

Do you consider extracting these into the RPC module, while Sofa-boot only performs dependency and injection control? I think this framework design would be more reasonable

OrezzerO commented 1 year ago

@SofaService mechanism depends on spring, but SOFA-RPC will not directly depend on spring. So, it is not suitable to add @SofaService to SOFA-RPC.

Maybe we need a simpler SOFA-RPC starter only depends on Springboot.

dajitui commented 1 year ago

as I thought

@SofaService mechanism depends on spring, but SOFA-RPC will not directly depend on spring. So, it is not suitable to add @SofaService to SOFA-RPC.

Maybe we need a simpler SOFA-RPC starter only depends on Springboot.

yeah,as I thought

MingJunDuan commented 1 year ago

This is issue is discussed in https://github.com/sofastack/sofa-rpc/issues/1031, SOFA-RPC is a pure RPC framework,@SofaService only exist in sofa-boot(integrated with spring)

dajitui commented 1 year ago

Great, it gave me an understanding of the previous design

However, there is still a problem inside. As an open source framework, it makes developers rely on Sofa-boot, which I think is unreasonable and the coupling is too heavy

As mentioned by OrezzerO above, a lightweight version of spring dependency is required

dajitui commented 1 year ago

Great, it gave me an understanding of the previous design

However, there is still a problem inside. As an open source framework, it makes developers rely on Sofa-boot, which I think is unreasonable and the coupling is too heavy

As mentioned by OrezzerO above, a lightweight version of spring dependency is required

OrezzerO commented 1 year ago

Now our community does not have enough resources to open a new repo to maintain a springboot version starter.

It is not difficult to write such a starter. Maybe you can write it and donate it to SOFAStack. @dajitui

dajitui commented 1 year ago

OK, I see