Some regrets about doing open source projects in the past two years


For 2 years, an open source project has been iterating a little bit from the initial idea to now having a little users. From a project at the beginning, it has become a micro ecosystem with micro service components and gateway components. It has really experienced hardships along the way. There are questions, encouragement and ridicule.

Sometimes I really wonder if I should stop here and give up maintenance. Just hang the project there. Just look at what I like and learn from Jiang Taigong. I’ll be relaxed if I’m willing to take the bait, but I always feel a little pity. After all, it took a lot of effort to do it.

I may not remember why I did this project. I only remember that I didn’t intend to do this at the beginning. I just wanted to verify my understanding of the principle of springboot, so I tried to implement a similar framework myself. When I realized the basic functions, I was reluctant to delete the code, so I put it on GitHub for hosting. At that time, there was no idea of open source, that is, I regarded GitHub as a network disk for storing code. There is no open source protocol, no readme, and even the code structure is a mess.

This code is saved, but every time I’m free, I can’t help thinking about where to write well, where to optimize, whether the directory structure can be more elegant, whether the details can be polished, etc. every time I think of something, I will maintain it and enjoy it. It’s precisely because of this maintenance, Let this code become more and more robust, so I have the idea to share with you. So I started the official website and began to share in some technology groups, but the feedback was not very friendly, almost all mocking and questioning. Most of the ridicules focus on [nothing new, personal projects are too junk, etc.]. Every time I face these ridicules, I think about how to make everyone accept and be willing to try, rather than immediately deny it after reading an article introduction, so I try my best to optimize my code, Add some new features (maybe not new, because every feature can find projects containing this feature in the world)

That’s it.

  • I changed the controller to a declarative API,
  • Self developed [semi ORM] to save the trouble of integrating mybatis,
  • Annotation type parameter verification and annotation type redis lock are provided,
  • The exception on the server side is also encapsulated so that it does not have to return 500, but a JSON to avoid adding try catch to each interface.
  • At the same time, the original AOP, IOC and declarative transactions are still retained

It can be said that after a small integration, a project can provide some common function points in the development of small and medium-sized projects. But the reaction is still general. No one cares. No one cares what it is. Every time you share it, it is a spray conference. However, there are also some rational people. They will speak their own views rationally, which has helped me a lot, and I am also very grateful to them.

At this stage, I can also say that it is difficult to ride a tiger. I have invested so much. I can’t give up. I can only go forward with a hard head. I keep thinking. What is the reason why people are unwilling to try? Maybe the label [personal project] itself is the original sin, or maybe the ecology I provided is not enough, so I made the following plan:

  1. Once again, lose weight for the project and lose some replaceable tripartite dependence within my ability
  2. Develop micro service components and gateway components to enrich the ecosystem
  3. Once again, optimize the documents, official website, etc., and try to reflect that this is a dedicated project and a sense of professionalism

Therefore, Tomcat is gone. It directly adopts httpserver (tested on jdk8-jdk14, no problem). Microservice components that do not need a registration center have also been put into development, and the gateway has been put on the agenda. At the same time, the official website and documents are becoming more and more perfect. I even find professional people to design the logo (I think it’s very good)

After two years, these have become a reality. With microservice components, gateway components and their own logo, the official website is much better than before, and the documents are fresher and simpler than before.

At the same time, there is another problem. The high integration of the project makes the scalability insufficient. For example, when httpserver is bad, can you switch to Tomcat? Can microservice fuses and load balancing be plugged in and out, or even developed by users themselves? Can users develop components themselves? Therefore, in the next period of time, I started the optimization in this direction. So far, it has been realized, but there are still some problems:

  • The Tomcat launcher has not been optimized yet, so it can only be started with the default Tomcat configuration
  • If you don’t want to use httpserver, you can only switch to the Tomcat launcher at present, but users can develop the launcher themselves. I provide an API
  • Although the fuse is pluggable, it has not developed its own fuse
  • Load balancing is pluggable. At present, the official only provides two algorithms [ordinary random and ordinary polling]
  • Although users can develop their own components, there are still too few official components

Next, I will focus on optimization. As for the longer-term plan, it must be infinitely close to enterprise level development, so that he can be competent for large-scale projects.

Over the past two years, constant optimization, trial and error, and all kinds of ridicule have long become a habit. In short, I wish I knew what I was doing. It doesn’t matter even if no one cares. At least I can learn something from this matter and experience something. This is also a kind of value, just like returning to my original heart, At the beginning, I just wanted to verify my understanding of the principle of springboot. I just enjoyed it. Let all other thoughts disappear.

Oh, by the way, this project is called Martian