Code Monkey home page Code Monkey logo

boot-dubbo's Introduction

##Spring-Boot With Dubbox ##

该项目整合了最新的Spring Boot和功能强大的RPC框架Dubbox
两者都有优点,也都有缺点
最新版本的Spring Boot包含了Metrics模块

Dubbox官方地址:

Dubboxhttps://github.com/dangdangdotcom/dubbox

Spring Boot:

1、微内核
2、配置简单
3、模块化
4、开箱即用
5、完全兼容Spring
6、设计理念极其先进,很多**来自OSGi,但是在现有技术的实现

缺点:

二次改造定制难
缺少成熟的SOA或者RPC框架


Dubbox:

1、完全兼容Dubbo
2、功能强大
3、性能强悍
4、运行稳定
5、可扩展性较好, Api和Spi分离

缺点:

1、官方停止维护已经两年之久了
2、依赖较为陈旧
3、运行时较重,应该微内核和模块化这个框架
4、配置较为复杂,学习成本较高

建议:

大家有机会一起维护Dubbox 模块化和微内核这个框架

使用:

1、安装Maven
2、下载dubbox,在${dubbox-home}执行mvn clean install -Dmaven.test.skip=true
(执行该命令会从**仓库下载依赖,若一次安装不成功,多执行几次,一般都是网络问题或依赖问题造成的),最终肯定会成功安装到本地仓库中
3、使用Eclipse/IDEA导入boot-dubbo基本上的结构你就可以看懂了,下述也有简单的描述


boot-dubbo-normal-client

  • 这个项目我想以一个第三方的项目使用dubbox
  • 这个项目跟spring boot没有一点关系。

如果仅仅测试dubbo:

  • boot-dubbo-simple-client
  • boot-dubbo-simple

上述两个项目就够用了

boot-dubbo-infrastructure
这个模块项目只与数据库相关,其中集成了Spring-Data-Jpa以及Mybatis

  • Spring-Data-Jpa一般负责增删改,这个及其简单
  • Mybatis负责较为复杂的查询

boot-dubbo-service
该项目依赖api和boot-dubbo-infrastructure
它要实现api约定的接口,另外依赖boot-dubbo-infrastructure对不同数据表的操作以及对事务的操作

boot-dubbo-web
该项目依赖api,它是dubbo的客户端,它通过调用api等于invoke到serice的服务上,从而实现了rpc的调用和服务治理。

说明:

  • service:一般我们的service瓶颈在IO或者数据库上,部署无需太多
  • web:一般的压力在web上,如果很多用户并发,session以及转换都在web上,web建议多部署几台

注释:

  • 在实际项目的架构中,Service和Infrastrature(DAO)之间应该还需要一层,就是ProxyDao那么这一层应该在Infrastrature这个当中

JPA:

最后我想说一下JPA这个事情,无论大家最终是否使用JPA,即便使用MyBatis中间件,也会有Entity概念,当然MyBatis理论会有很多的VO对象,我想表达的就是既然这样还不如使用JPA的自动生成表结构这个特性来达到开箱即用(不用再维护数据库表结构),直接安装就可以使用项目,减少了维护工作量。如果真的不需要JPA在项目的运行时阶段(生成表以后)可以删除该配置模块。Spring Boot所带来的一切真的就是这么简单容易。

boot-dubbo's People

Contributors

percy0601 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.