Skip to content

Add InMemory DAO package to turbo-core; document InMemory vs Spring-backed DAO differences - #88

Draft
liangchenhui with Copilot wants to merge 9 commits into
masterfrom
copilot/decouple-turbo-spring-dependencies
Draft

Add InMemory DAO package to turbo-core; document InMemory vs Spring-backed DAO differences#88
liangchenhui with Copilot wants to merge 9 commits into
masterfrom
copilot/decouple-turbo-spring-dependencies

Conversation

Copilot AI commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

The 7 in-memory DAO implementations existed only as private inner classes inside TurboEngineStandaloneTest, making them unreusable. Users encountering InMemoryFlowDefinitionDAO also had no explanation of what it is or how it differs from the Spring/MyBatis-backed version.

Changes

  • New turbo-core/.../dao/memory/ package — extracts all 7 InMemoryXxxDAO classes into proper production code; each class carries Javadoc with per-method SQL equivalents and a comparison table vs. the Spring counterpart; package-info.java provides a package-level overview
// Zero-dependency bootstrap — no Spring, no DB config
ProcessEngine engine = TurboEngineBuilder.create()
    .flowDefinitionDAO(new InMemoryFlowDefinitionDAO())
    .nodeInstanceDAO(new InMemoryNodeInstanceDAO())
    // ...
    .build();
  • TurboEngineStandaloneTest — replaces ~260 lines of inline inner-class DAO stubs with imports from the new package

  • docs/standalone-usage.md — adds a dedicated section answering "what is InMemoryDAO and how does it differ from the Spring version": 7-dimension comparison table, side-by-side insert/update/select code, and a decision guide (Spring / InMemory / custom JDBC)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits March 3, 2026 09:50
- Create BeanUtil utility class to replace org.springframework.beans.BeanUtils
- Create TurboBeanFactory interface to replace DefaultListableBeanFactory
- Remove @service, @component, @repository stereotypes from all engine business classes
- Replace Spring BeanUtils.copyProperties() with BeanUtil.copyProperties() throughout
- Replace ApplicationContext + InitializingBean in ExclusiveGatewayExecutor with @resource List<HookService> + @PostConstruct
- Replace org.springframework.util.StringUtils with commons-lang3 in PluginSqlExecutorUtil
- Remove unused org.springframework.util.Assert import from CallActivityValidator
- Update AbstractPluginManager, DefaultPluginManager, BasePlugin to use TurboBeanFactory
- Update PluginConfig with Spring adapter (TurboBeanFactory lambda over DefaultListableBeanFactory)
- Add explicit @bean definitions in TurboEngineConfig for all decoupled beans
- Fix parallel-plugin: remove Spring stereotypes from executors/validators/services
- Replace AsynTaskExecutor Spring ThreadPoolTaskExecutor with standard ThreadPoolExecutor
- Add explicit @bean definitions in ParallelPluginConfig for all decoupled beans
- Remove redundant @MapperScan from test application classes

Co-authored-by: liangchenhui <30490037+liangchenhui@users.noreply.github.com>
- AsynTaskExecutor: use field values in initialize(), add Javadoc to queueCapacity setter,
  fix thread naming, implement virtual thread support via reflection
- PluginConfig: try TurboBeanFactory constructor first, fall back to no-arg constructor
  for backwards compatibility with custom PluginManager implementations

Co-authored-by: liangchenhui <30490037+liangchenhui@users.noreply.github.com>
Copilot AI changed the title [WIP] Decouple turbo process engine from Spring framework Decouple Turbo flow engine from Spring framework Mar 3, 2026
Copilot stopped work on behalf of liangchenhui due to an error March 3, 2026 10:09
…ing deps as optional, remove Spring imports from non-config classes

Co-authored-by: liangchenhui <30490037+liangchenhui@users.noreply.github.com>
Copilot AI changed the title Decouple Turbo flow engine from Spring framework Complete Spring decoupling: remove BOM import and make Spring deps optional Mar 3, 2026
Copilot AI and others added 2 commits March 4, 2026 11:58
…plement DAO interfaces

Co-authored-by: liangchenhui <30490037+liangchenhui@users.noreply.github.com>
…, and impact docs

Co-authored-by: liangchenhui <30490037+liangchenhui@users.noreply.github.com>
Copilot AI changed the title Complete Spring decoupling: remove BOM import and make Spring deps optional Decouple Turbo engine from Spring — introduce turbo-core, turbo-spring, turbo-spring-boot-starter Mar 4, 2026
…guide

Co-authored-by: liangchenhui <30490037+liangchenhui@users.noreply.github.com>
Copilot AI changed the title Decouple Turbo engine from Spring — introduce turbo-core, turbo-spring, turbo-spring-boot-starter Decouple Turbo engine from Spring; add turbo-core standalone module + BeanUtil primitive/boxed fix Mar 4, 2026
…y vs Spring in docs

Co-authored-by: liangchenhui <30490037+liangchenhui@users.noreply.github.com>
Copilot AI changed the title Decouple Turbo engine from Spring; add turbo-core standalone module + BeanUtil primitive/boxed fix turbo-core: non-Spring standalone engine usage with InMemory DAOs + BeanUtil primitive/boxed fix Mar 5, 2026
…session-record.md)

Co-authored-by: liangchenhui <30490037+liangchenhui@users.noreply.github.com>
Copilot AI changed the title turbo-core: non-Spring standalone engine usage with InMemory DAOs + BeanUtil primitive/boxed fix Add InMemory DAO implementations to turbo-core; document InMemory vs Spring-backed DAO differences Mar 6, 2026
Copilot AI changed the title Add InMemory DAO implementations to turbo-core; document InMemory vs Spring-backed DAO differences Add InMemory DAO package to turbo-core; document InMemory vs Spring-backed DAO differences Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants