Solon It's a miniature Java RPC Development framework . The project from 2018 Since its inception in , Referring to a lot of previous works ; For two years ,3500 A lot of commit; Kernel retention 0.1m The figure of , Super high running points , Good use experience . Support :Rpc、Rest api、Mvc Multiple development models .

Solon emphasize : restraint + concise + The principle of openness ; Strive for : smaller 、 faster 、 A freer experience .

Smaller :

kernel 0.1m, The smallest development unit 0.2m( comparison Dubbo、Springboot Project package , Small enough to be ignored )

Faster :

This machine helloworld test ,Qps Can be up to 12 Wan Zhi Du . May refer to :《helloworld_wrk_test

More freedom :( Code controls freedom )

//  In addition to the injection mode , You can also do it manually on demand 
// Get configuration manually
Map<String,String> db = Solon.cfg().getMap("db"); // Get the... In the container manually Bean
UserService userService = Aop.get(UserService.class); // Manual monitoring http post request"/user/update", x-> userService.updateById(x.paramMap())); // Manually add RPC service"/rpc/", HelloService.class, true);

Major changes in this edition :

1、 Release Solon cloud Adaptation interface and configuration specification

The design purpose of this specification : It provides a unified interface and configuration specification for the third-party micro service component adaptation . So as to make the adaptation and use of third-party micro service components more standardized and unified ; At the same time, developers can seamlessly switch between different third-party components .

The released interface and configuration specifications mainly include :

  • Configure service related interfaces and configurations
  • Register interfaces and configurations related to discovery services
  • Interface and configuration related to event bus
  • Log bus related interface and configuration

2、 Publish configuration service adaptation components

Components explain remarks
consul-solon-plugin Yes consul The adaptation of Use the first level directory as the corresponding configuration group
nacos-solon-plugin Yes nacos The adaptation of
water-solon-plugin Yes water The adaptation of

Description of characteristics :

  • 1- Support configuration loading at startup
group: demo # Application Group // It is also the default group used by the configuration service
name: helloapp # Application name // The application name used by the discovery service #consul, Can be replaced by nacos or water
server: #consul Service address
loadKey: "" # Configuration loaded at startup , And keep real-time updates ***( It's going to be Solon.cfg() Part of )
// Use the loaded In the configuration of the
public class DemoConfig {
public DataSource ds(@Inject("${db1}") HikariDataSource ds){
return ds;
  • 2- Payment configuration subscription
* Configure subscription ( Gets the real-time refresh of the configuration )
public class DemotConfigHandler implements CloudConfigHandler { @Override
public void handler(Config config) {
  • 3- Support direct injection of cloud configuration , And automatic refresh mechanism ( Non singleton does not need to turn on the automatic refresh mechanism )
public class DemoController {
@CloudConfig(value = "demo_header", autoRefreshed = true)
String demo_header;

Attached demo source code :

3、 Publish the registration and discovery service adaptation component

Components explain
consul-solon-plugin Yes consul The adaptation of
nacos-solon-plugin Yes nacos The adaptation of
water-solon-plugin Yes water The adaptation of

Application example :

  • 1-Solon rpc Service registration
group: demo
name: helloapi # The application name used by the discovery service ( stay Demo, Will be NimaClient quote )
server: #consul Service address
@Component(remoting = true)
public class HelloServiceImp implements HelloService {
public String hello() {
return "remote: hello";
  • 2-Solon rpc Service release
group: demo
name: helloapp
public class DemoController {
// "helloapi" Corresponding registered services
@NamiClient(name = "helloapi")
HelloService helloService; @Mapping("/test")
public String home(String msg) throws Exception {
return helloService.hello();

Attached demo source code :

4、 Publish event bus service adaptation components

Components explain remarks
rabbitmq-solon-plugin Yes rabbitmq Adaptation of message queue
rocketmq-solon-plugin Yes rocketmq Adaptation of message queue Timed events cannot exceed 2 Hours
water-solon-plugin Yes water The adaptation of message center

Description of characteristics :

  1. Supports timed events
  2. Just subscribe to the topic , Every consumer group can receive
  3. If the current processing fails, it will be delayed and retried step by step , Until it's finally successful ; But it doesn't affect other consumer groups

The consumer group consists of + Automatically combined ; Or through{ Components }.event.queue Appoint

Application example :
group: demo # Configure the default group used by the service
name: helloconsumer # The application name used by the discovery service
server: localhost:5672 #rabbitmq Service address
username: root #rabbitmq Linked account
password: 123456 #rabbitmq Link password
// consumer : Subscription events
public class EVENT_hello_demo implements CloudEventHandler {
public boolean handler(Event event) throws Throwable {
// Business processing
System.out.println( + ONode.stringify(event)); // If successful return true, Otherwise false( And then it'll be delayed )
return true;
} //
// The producer : Release events
public class DemoController {
public Object test(String msg) {
msg = "demo2";
} // Release events
Event event = new Event("hello.demo", msg);
return CloudClient.event().publish(event);

Attached demo source code :

5、 Publish the log bus service adaptation component

  • water-solon-plugin( Yes water Log adaptation )

Description of characteristics :

  1. Support meta information description ( It can be operated semantically )
public class DemoController { CloudLogger logger = CloudLogger.get(TestController.class); @Mapping("/test")
public void test(String msg) throws Exception {" I am a good person. :(");" I'm not :{} \n\n {}", " The bad guys ",12);" Clock in "), " Who am I ?");

6、NamiClient upgrade , And Solon cloud Standardize and better cooperate

new property explain Example
url complete url Address
group Service group water
name Service name or load balancing component name ( Use with discovery service ) waterapi
path route /cfg/get/

notes : Old expression based properties uri, No longer use

attach 1: Unified service adaptation interface

Service interface explain Adapter components are supported
CloudConfigService Configure service interface consul-solon-plugin、nacos-solon-plugin、water-solon-plugin
CloudDiscoveryService Discover service interfaces consul-solon-plugin、nacos-solon-plugin、water-solon-plugin
CloudEventService Event bus interface water-solon-plugin、rabbitmq-solon-plugin、rocketmq-solon-plugin
CloudLogService Log bus interface water-solon-plugin

attach 2: Unified service configuration specification

notes : Specific configuration , Replace... With the frame name @@ operator

Attribute theory explain Framework availability Service address (ip:port) nacos、consul、water Link token consul Link user name nacos Link password nacos Police reception number water Configure service enable ( Default :true) nacos、consul、water Service address (ip:port) nacos、consul、water Configuration groups that need to be loaded at startup nacos、water It needs to be loaded at startup Key nacos、consul、wate Configure refresh interval consul The registration and discovery service is enabled ( Default :true) nacos、consul、water Service address (ip:port) nacos、consul、water Service Tag consul Service health check path consul、water Service health check interval consul Service health reporting indicators consul Service discovery refresh interval consul Event bus service ( Default :true) water、rabbitmq、rocketmq Service address (ip:port) water、rabbitmq、rocketmq Switch or relationship group rabbitmq、rocketmq Specify the queue rabbitmq、rocketmq Specify the receiving domain water Event signature water Log bus service ( Default :true) water Service address (ip:port) water Log default recorder water

attach 3: Project address

Project address :

Solon rpc 1.3.1 Release , Introduction Cloud Interface and configuration specification

  1. [SDK2.2]Windows Azure Cloud Service (35) Use VS2013 Release Azure Cloud Service

    <Windows Azure Platform List of articles > Not updated for a long time BLOG 了 , Today we go on Windows Azure Related content . The author recently put Visual Studio Upgrade to 20 ...

  2. Why RPC, Not simply HTTP Interface

    Reprinted from : There are a lot of Java Of RPC frame , It's based on J ...

  3. Follow me SpringCloud | Chapter 6 :Spring Cloud Config Github Configuration center

    SpringCloud Series of tutorials | Chapter 6 :Spring Cloud Config Github Configuration center Springboot: 2.1.6.RELEASE SpringCloud: Greenwic ...

  4. Spring Cloud Config Implementation configuration center , Just read this one

    Spring Cloud Config yes Spring Cloud The earliest configuration center in the family , Although it was later released Consul It can replace the function of configuration center , however Config It still applies to Spring Clou ...

  5. locomotive wordpress Free universal release module and interface

    locomotive wordpress Free universal release module and interface can be used

  6. IIS The server Remote Publishing (Web Deploy) To configure VS2010 development environment Windows Server 2008 Server system

    original text :IIS The server Remote Publishing (Web Deploy) To configure VS2010 development environment Windows Server 2008 Server system There are three common ways to publish a website : They are the ones released on the copy development machine ...

  7. Spring Cloud Config( Configuration center )

    Learn a little every day Programming PDF e-book . Video tutorial free download : One . brief introduction Spring Cloud Config Provide server and client for external configuration in distributed system ...

  8. 007-spring cloud gateway-GatewayAutoConfiguration The core configuration -RouteDefinition Initialize load

    One .RouteDefinitionLocator stay Spring-Cloud-Gateway Of GatewayAutoConfiguration It will be loaded during initialization loading RouteDefinitionLocat ...

  9. MVC Publish to IIS Configuration method in

    MVC Publish to IIS Configuration method in

  10. spring cloud Eureka client To configure (consumer adopt Eureka Initiate right provider Call to )

    Reference resources : springboot edition :2.0.3 ...

Random recommendation

  1. CAD The planning results are put into the database GIS_SDE The analysis of transformation

    problem : 1) In the application of the project, it is required that CAD Reasonable storage of planning results GIS SDE in , On the premise of establishing a set of relatively standardized standards , how “ Low tech . The fool ” Achieve planning data update management . Versioning is an urgent problem . 2) CAD As a data source , Different ...

  2. Android install BusyBox( samsung N7108)

    Recent company Android app test , Assign tasks to monitor APP Memory .CPU Occupancy rate . Because Android is based on linux Development , So it's easy to use Linux Monitoring related commands . Ideas are always good , The reality is always harsh , Use Samsung Galaxy Note ...

  3. L1 - Operating mechanism

    var name = 'kl'; function person(){ alert(name); var name = 'ko'; } person(); This code output ‘undefined’, This kind of appearance ...

  4. [SQL Basic course ] 1-5 Table deletion and update

    [SQL Basic course ] 1-5 Table deletion and update The deletion of the table grammar DROP TABLE < Table name >; The laws of 1-12 The deleted table cannot be recovered Update of table definition grammar ALTER TABLE< Table name > ...

  5. autoLayer: A basic layout

    I can't blog , If you don't write well, please forgive me , This autoLayer I'll go straight to the picture above : My environment :IDE(Xcode6)SDK(IOS8) preparation : Find a bar chart psd( Because I can't cut a picture , I'll just briefly describe the image processing ), ...

  6. Native JavaScript How to solve the problem that the parent element finds the child element of the specified class name

    problem : We know that the class name of an element is right And the class name of the ancestor element of this element is parent, Now I want to go through the original JavaScript Get this class named right The elements of . My thoughts : Recursion . First, identify the known ancestral elements ( In the question pa ...

  7. Use supervisor Management process

    Supervisor ( It's a use. Python Write process management tools , It's very convenient to start . restart . Close the process ( not only Python process ). Except for a single process ...

  8. centOS7 Compiled on hadoop-2.7.7

    One . Read the compiled documentation stay hadoop Source package root directory has a BUINDING.txt The file of , The file explains how to compile hadoop Some compilation needed hadoop Some compilation environment related things needed . Different hadoop Version requirements are ...

  9. The first 1 Chapter ssh Command and SSH Service details

    Basic services series : This paper deals with SSH The connection verification mechanism is analyzed in detail , It also introduces in detail ssh All kinds of client tools ...

  10. BZOJ3022 : [Balkan2012]The Best Teams

    Rank players and questions by age , To get rid of the age limit . After sorting all players horizontally, maintain the line tree , Obviously, the optimal solution must be greedy from big to small . Each node in the segment tree maintains : $g[0/1]:r+1$ No election / When I choose ,$l$ Choose or not . $ ...