turms-im / turms

🕊️ The world's most advanced open source instant messaging engine for 100K~10M concurrent users https://turms-im.github.io/docs
Apache License 2.0
1.78k stars 280 forks source link

Remove `Spring` #915

Open JamesChenX opened 2 years ago

JamesChenX commented 2 years ago

Motivation

https://turms-im.github.io/docs/for-developers/rules.html#%E5%85%B3%E4%BA%8E%E4%BE%9D%E8%B5%96%E5%BA%93%E7%9A%84%E4%BD%BF%E7%94%A8

Tasks

  1. Replace Spring WebFlux + springdoc (OpenAPI) with our own implementation
  2. Loading YAML configuration via our own implementation
  3. Manage the lifecycle of beans via our own implementation
  4. Remove all components of Spring
l-7-l commented 2 years ago

I hate Spring. I can't even find the project entrance and the complete business process in the code


If you are offended by my poor English, please ask the Apple Translator to apologize.🤪

JamesChenX commented 2 years ago

@G11Max Thanks for sharing your idea. What you have mentioned is one of the reasons why I want to remove Spring.

For other reasons, please refer to: https://turms-im.github.io/docs/for-developers/rules.html#%E5%85%B3%E4%BA%8E%E4%BE%9D%E8%B5%96%E5%BA%93%E7%9A%84%E4%BD%BF%E7%94%A8 if you are insterested. In one word, learning all their code with terrible performance may take 3 days, but writing our own efficient implementation may take 1 day.

Just like some wonderful open-source projects (Elasticsearch, Hazelcast, Ignite, Cassandra, etc) I often read, all of them have a similarity that they try to write and use their own code only without using third-party deps, and I think their motivations are almost same as Turms as I mentioned in the above docs.