Code Monkey home page Code Monkey logo

trydofor / professional-wings Goto Github PK

View Code? Open in Web Editor NEW
86.0 3.0 10.0 6.78 MB

WingsBoot=BKB+BoT+SpringBoot: ①quickly achieve business goals; ②timely repay technical debt; ③safely refactor programs and business. We advocate defensive programming, May The `false` Be With You !

Home Page: https://wings.fessional.pro

License: Apache License 2.0

Java 91.81% HTML 0.01% Kotlin 6.37% Shell 1.82% CSS 0.01%
spring-boot jooq refactoring hazelcast startup

professional-wings's Introduction

I try .. do .. for ..

follow views

trophy

professional-wings's People

Contributors

gyf9835 avatar trydofor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

professional-wings's Issues

TinyTask和TinyMail已系统时间替换UTC时间

UTC时间的好处为,不受tweak的影响,但database的可读性差,需要转换。
Sys时间,会受tweak影响,若单个tweak,则存在clock和timezone不一致的情况。
最终,选择可读性优先

FUN✨ replace Caffeine with Cache2k in MemoryCache

Is your feature request related to a problem? Please describe.

boot-2.7 support Cache2k, may use this as MemoryCache solution

Describe the solution you'd like

Slardar project use Caffeine as MemoryCache

Additional context

  • Caffeine remove
  • Cache naming rule

tiny-task微型任务,延时队列

Is your feature request related to a problem? Please describe.

可插拔的微型批处理模块,应用场景为10秒结束的异步任务,如消息通知,邮件等

Describe the solution you'd like

基于spring @schedule,Event,缓存和数据库,最小化实现。

  • 单一优先任务队列,可直接插入或Db加载
  • 非强事务,允许丢失,重试
  • 调度周期内最多成功一次
  • 自动清理过期任务,保留n-days记录

Describe alternatives you've considered

Additional context

统一wings的spring配置层日志输出

  • 声明@Bean - {ModuleName} spring-bean {BeanName}
  • 立即执行@Autowired - {ModuleName} spring-auto {MethodName}
  • 后置执行CommandLineRunner - {ModuleName} spring-runs {BeanName}
  • 处理器Bean*PostProcessor - {ModuleName} spring-proc {BeanName}
  • 过程日志 - {ModuleName} conf

FUN✨滚动升级Jooq3.16的QOM

Is your feature request related to a problem? Please describe.

目前稳定在boot=2.6的jooq=3.14。像2.7滚动,兼容3.16

Describe the solution you'd like

在wings2.6版本,首先升级jooq到3.16

Additional context

目前已知不兼容内容包括,

  • org.jooq.Condition 不兼容
  • TableCudListener visitor类型
  • codegen格式
  • Java EE到Jakarta EE的兼容性

为jooq的record增加变更记录

flywave的commitId体系并非为了记录为用户显示的变更日志。
需要通过pojo或update语句,自动差分出变更字段

数据结构为json二维数组:Tuple3[]
Tuple3=[filed:string, oldvs:string|number, newvs:string|number]

提高安全性,统一管理密码项

涉及安全性的配置,分散于各模块,不利于集中管理。

增加 wings.safety.配置项,统一修改安全性设置

  • wings.safety.app-hash
  • wings.safety.app-salt

仅在文档中说明

Redis7 for caching/event

First, replace Redis with Hazelcast in the following situation

Driving

  • Simplicity - redis needs to be deployed, while hazelcast is embedded
  • Serialization compatibility - redis has no nearcache, there is some serialization compatibility

Restraining

  • Widely used - redis is much more widely used than Hazelcast
  • Cloud services - redis is used as a basic service.

Scenarios

  • spring session - spring integration
  • Distributed caching - major business scenario
  • Global lock - global business lock, not required to be distributed, can be centralized locking
  • Pub/Sub - simple messaging service
  • flakeId - non-essential feature

History

JMX管理Cache

hazelcast, cache2k 提供了jmx功能
wingscache endpoint can evict by id

RolesByUid只put,在集群环境下失效

  • 集群环境下,分布式Session,因此需要regLoader。否则集群内session有效,不需要等待,就没有put操作。
  • 因不同登录方式Perm和Role不同,所以不能仅通过UserId获取正取的权限,需要借助其他Context

业务Context明确NotNull或fail语义,避免误用

如TerminalContext,若在业务中,80%的场景确定为登录用户,则get时应该要么登录,要么Exception,避免误用。

约定如下,

  • 无参数get(),表示必须获得正向业务意义对象,否则异常
  • get(true) 等同于 get()
  • get(false) 可返回负向意义对象或null

springboot3 upgrade issues

  • shardingsphere #54
  • slf4j MDCAdapter
  • git-commit-id-plugin
  • mirana 移除jaxb的ee部分
  • springdoc
  • javax - jakarta
  • 检查文档及注释中的link

调整Configuration配置规范

在配置中使用@Autowired完成自动配置,显然属于小技巧,违反了设计意图,出现以下提示

Autowired annotation should only be used on methods with parameters

升级sql文件不支持多行注释

升级sql文件不支持多行注释
升级代码如下,运行成功但是未执行任何SQL

val sqls = scan(REVISION_PATH_MASTER, REVISION_PATH_BRANCH_3RD_ENU18N);
schemaRevisionManager.checkAndInitSql(sqls, 20210121, false);
// 升级
schemaRevisionManager.publishRevision(2021012101, 2021012101);

升级sql

/* Alter table in target */
ALTER TABLE `table`
    ADD COLUMN `column_a` bigint(20) NULL

Customizable IDs with biz segment

当前id均为LightId策略,无block的全序列布局。考虑在序列中区分前缀或后缀。
比如在多租户的场景,可以使用blockId作为tenant范围,但bits按位运算的可读性不好。

考虑的问题点包括,

  • 顺序行,是否可以满足排序要求
  • 范围定位,可以容易的按range select
  • 可读性,看到id,能够快速识别,比如按十进制划分

提供Jackson静态工具类,取代FastJson场景

fastjson 2.x 已经发布了18个小版本了,
其中有十多个版本是因为没有通过我厂的测试用例导致的。
虽说 2.x 的性能有所提升,但是目前来说稳定性还是个问题。

Wings user union login

Wings system can be associated with the login, similar to the SSO.

  • Ensure the independence of Wings account privilege system
  • Convenient SSO login
  • token recovery and kicking out of dangerous accounts.

Within a unified Hazelcast cluster, session sharing is possible.
Non-cluster, to consider on-demand network invocation.

  • OAuth2/Oidc is more complex, and the token cannot be invalidated
  • SAML/CAS http-based BS architecture

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.