funkygao / cp-ddd-framework Goto Github PK
View Code? Open in Web Editor NEW轻量级DDD正向/逆向业务建模框架,支撑复杂业务系统的架构演化!
Home Page: https://github.com/dddplus
License: Apache License 2.0
轻量级DDD正向/逆向业务建模框架,支撑复杂业务系统的架构演化!
Home Page: https://github.com/dddplus
License: Apache License 2.0
你好,cp-ddd-framework和DDDplus(已经是业务中台开发框架) 区别点有哪些(对比了代码架构什么的没看出太大的差别)。
$curl -d '{"source":"ISV","customerNo":"home","externalNo":"2020"}' -H 'Content-type: application/json' localhost:9090/order
HTTP/1.1 415 Unsupported Media Type
Date: Wed, 30 Sep 2020 08:10:55 GMT
Cache-Control: must-revalidate,no-cache,no-store
Content-Type: text/html;charset=iso-8859-1
Content-Length: 346
Server: Jetty(9.4.z-SNAPSHOT)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 415 Unsupported Media Type</title>
</head>
<body><h2>HTTP ERROR 415</h2>
<p>Problem accessing /order. Reason:
<pre> Unsupported Media Type</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/>
</body>
</html>
execute specified steps in async mode
ExtensionDef没有正确处理好SpringProxy场景
默认的demo profile下,没有把isv/ka的plugin jar打包进去
表象:OrderController演示时,curl localhost:9090/order?type=isv
没有触发ISV业务前台的扩展点执行
此时,可能会产生新的扩展点实现在新的plugin jar
https://en.wikipedia.org/wiki/Specification_pattern
if
判断类库、示例看起来有点复杂
示例如何启动?如何观察相关现象表示运行ok
有生产在使用吗?
under development
org.example.cp.oms.ExampleTest
@Test
public void dynamicLoadPlugins() throws Throwable {
ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring-test.xml");
applicationContext.start();
for (int i = 0; i < 1; i++) {
// 同一个jar,load多次
log.info("N:{}", i);
DDD.getContainer().loadPartnerPlugin(new URL("file:///Users/xxxx/github/ddd/cp-ddd-framework/doc/assets/jar/order-center-bp-isv-0.0.1.jar"), "org.example.bp");
}
DDD.getContainer().loadPartnerPlugin(new URL("file:///Users/xxx/github/ddd/cp-ddd-framework/doc/assets/jar/order-center-bp-ka-0.0.1.jar"), "org.example.bp");
DDD.getContainer().loadPatternPlugin(new URL("file:///Users/xxx/github/ddd/cp-ddd-framework/doc/assets/jar/order-center-pattern-0.0.1.jar"), "org.example.cp");
DDD.getContainer().unloadPatternPlugin("hair");
...
url改成 file:///Users/xxxx/github/ddd/cp-ddd-framework/doc/assets/jar/
更好一些,github网络不同
目前的扩展点执行,都要先封装到 BaseDomainAbility 里。
但有的控制点:
这些场景下,BaseDomainAbility 显得有些多此一举,可以考虑提供 DDD.firstExtension
方法
Thanks sincerely for constantly using and supporting DDDplus. We will try our best to keep DDDplus better, and keep growing community.
You can refer to the following sample answer for the format:
* Orgnizatioin: Your company name
* Contact: [email protected]
* Scenario: How DDDplus is used in your business
Thanks again for your participation !
DDDplus Team
诚挚地感谢每一位持续关注并使用 DDDplus 的朋友。我们会持续投入,把 DDDplus 变得更好,把 DDDplus 社区和生态变得更加繁荣。
您可以参考下面的样例来提供您的信息:
组织:贵公司名称
联系方式:[email protected]
业务场景:贵公司是如何使用 DDDplus 的
再次感谢你的参与!
DDDplus 团队
The purpose of this issue is to discuss what you think should be added in DDDplus 1.2.0, such as features, bugfixes for known problems, and code refactoring optimizations.
Plugin.java 123L. NPE
Object partnerOrPattern = this.pluginApplicationContext.getBean(irc);
可以通过code,把复用性高的、关键的业务约束管理起来
PluginApplicationContext作为containerApplicationContext的子容器,在plugin的component bean里面可以获取spring的任意bean,这样隔离性不太好,如果是plugin里面直接获取dao,调用dao的方法访问数据库,就可以绕过中台的保护
目前的IDecideStepsExt,需要使用者继续编写Ability,基本上是脚手架代码
框架是否可以直接提供好,直接使用
dddplus-visualizer这个打不开
例如,上层基于DDDplus构建配置中心、可视化控制台等,需要DDDplus输出内部元素
WIP
是否可以在DDDplus里解决它?
复杂业务场景下,经常会使用MQ进行异步的处理。
自己发,自己收的情况很常见。
但业务逻辑被切断了:正在处理一个业务,然后就produce一个message;后面的逻辑会在message consumer处看到,可consumer在哪里?需要找配置文件或其他手段才能找到。
异步方式将本来紧凑的代码都分成两部分:上半场(produce message之前的逻辑),下半场(message consumer里面的逻辑)
有点数据血缘的味道。
需要研发同学,可以在produce message(上半场)处不必切换快速定位下半场业务逻辑的实现。
完成类似如下的功能:
在SaaS平台下,要建立一套low-code平台,要实现类似salesforce Trigger机制:
@Extension(code=model_id)
面临的挑战:
步骤编排作为扩展点,只能有一个默认实现,那么两个聚合,比如用户和角色,创建用户的步骤编排和创建角色的步骤编排不能各自实现,如果两个默认的实现写在一起,pattern或partner重新编排创建用户和创建角色都需要重写
not done yet
Describe the bug
IDecideStepsException与rollback exception有点冲突,容易误用
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
没有注册进去,原因是:InternalIndexer内部使用的是sortedPatternMap,而patternDefMap只是临时使用
make run-plugin
curl localhost:9090/reload?plugin=isv
抛出异常:org.example.bp.oms.isv.IsvPartner 在spring里找不到该bean
https://github.com/dddplus/dddplus-demo
for i in `seq 1000`; do
echo "reload isv plugin jar and submit isv order"
curl localhost:9090/reload?plugin=isv
curl -XPOST localhost:9090/order?type=isv
sleep 5
done
对于Partner Plugin Jar,一个Partner业务身份可能有几十个Extension,如何保证这些扩展点对一个请求要么全是新jar的,要么全是旧jar的?
例子:
一个请求,针对某一个业务前台身份,有10个扩展点,现在这个请求执行了3个扩展点,由于热更新,后续的7个扩展点可能就变成了新的业务逻辑。This is the issue
绝大部分场景下,后面7个扩展点突然变成新的逻辑,是没有问题的。
但有些场景下,可能会有问题。
TODO 给出具体problematic scenarios
ExtensionInvocationHandler这个类的invokeExtensionMethodWithTimeout方法会捕获TimeoutException异常,那么之前执行的步骤没有回滚是否会有问题?
Failed to execute 'mvn test' with 1.1.0-RELEASE and current master branch, here is the output:
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] ArchitectureEnforcerTest.optionalInterfaceNameStartsWithI:55 expected:<... violated (5 times):[
simple name of io.github.dddplus.runtime.registry.mock.ability.AbilityTag does not start with 'I' in (AbilityTag.java:0)
simple name of io.github.dddplus.runtime.registry.mock.pattern.Patterns does not start with 'I' in (Patterns.java:0)
simple name of io.github.dddplus.runtime.registry.mock.step.Steps does not start with 'I' in (Steps.java:0)
simple name of io.github.dddplus.runtime.registry.mock.step.Steps$Cancel does not start with 'I' in (Steps.java:0)]
simple name of io.g...> but was:<... violated (5 times):[
simple name of io.github.dddplus.runtime.registry.mock.ability.AbilityTag does not start with 'I' in (AbilityTag.java:0)
simple name of io.github.dddplus.runtime.registry.mock.pattern.Patterns does not start with 'I' in (Patterns.java:0)
simple name of io.github.dddplus.runtime.registry.mock.step.Steps does not start with 'I' in (Steps.java:0)
]imple name of io.github.dddplus.runtime.registry.mock.step.Steps$Cancel does not start with 'I' in (Steps.java:0)
simple name of io.g...>
[INFO]
[ERROR] Tests run: 85, Failures: 1, Errors: 0, Skipped: 1
annotation is @interface
but under version 0.1.0, we can see dddplus-plugin jar in maven central repo!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.