layotto icon indicating copy to clipboard operation
layotto copied to clipboard

[OSPP 2022] improve layotto-java-sdk and layotto-spring-boot

Open seeflood opened this issue 2 years ago • 11 comments

Since OSPP is for chinese community, this issue is written in chinese

Detail

https://summer-ospp.ac.cn/#/org/prodetail/2295a0213

增强layotto-java-sdk和layotto-spring-boot

你需要做什么?

  1. 增强layotto的java-sdk的功能,使其与go-sdk对齐。现在的java-sdk有file、lock、pubsub、sequencer、state 的API,缺少secret、config等API。
  2. 完善 layotto-sdk-springboot, 将layotto的更多功能集成进spring-boot。layotto-sdk-springboot的设计目标是帮助 spring-boot 的用户低成本接入 Layotto,比如用户在代码中添加一个java注解后,就能方便的进行消息监听、收到新消息后自动调用方法。
  3. 在 layotto-sdk-springboot 的基础上,开发 layotto-sdk-sofaboot, 方便 sofaboot 用户使用 layotto。

你可以收获什么? 你既可以了解到运行时框架的诸多优势与基本原理,又可以学习到spring-boot插件的开发过程,快来吧。

seeflood avatar Jun 04 '22 05:06 seeflood

This issue has been automatically marked as stale because it has not had recent activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue or help wanted) or other activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jul 05 '22 03:07 github-actions[bot]

进展: 在看 java-sdk,下周提 pr 还没搞spring-boot 集成

seeflood avatar Jul 09 '22 12:07 seeflood

我看到一个有趣的项目,或许可以参考一下:

quarkus和dapr sdk的集成:https://github.com/quarkiverse/quarkus-dapr/issues/5

kevinten10 avatar Jul 12 '22 02:07 kevinten10

进展:

  • CRUD 开发中
  • configuration API 订阅的功能在参考 pubsub API 订阅

seeflood avatar Jul 16 '22 13:07 seeflood

configuration API 订阅的功能在参考 pubsub API 订阅

Hi,我有个疑问点。为什么不把pubsub的订阅放入runtime API定义中呢。而是放到appcallback API中。

就像configuration的订阅API:

  rpc SubscribeConfiguration(stream SubscribeConfigurationRequest) returns (stream SubscribeConfigurationResponse) {}

完全可以在runtime API去定义pubsub的subscribeEvent API啊。

kevinten10 avatar Jul 18 '22 08:07 kevinten10

like this: https://github.com/capa-cloud/cloud-runtimes-jvm/blob/master/cloud-runtimes-api/src/main/java/group/rxcloud/cloudruntimes/domain/core/PubSubRuntimes.java

在SDK模型中,似乎无法很好的定义appcallback API,所以我们采用的是类似configuration的subscribe方式。

Server streamingBidirectional streaming风格的runtime API。

kevinten10 avatar Jul 19 '22 03:07 kevinten10

为什么不把pubsub的订阅放入runtime API定义中呢。而是放到appcallback API中。

就像configuration的订阅API

That's a long story :) I totally agree with u. But dapr sub API chose this callback style. Since we are trying to be compatible with Dapr API, we have to support it.

seeflood avatar Jul 19 '22 06:07 seeflood

本周进展: 1、Config的CRUD核心代码基本完成,在写测试。 2、Sub功能在开发中

fft0518 avatar Jul 23 '22 11:07 fft0518

我看到一个有趣的项目,或许可以参考一下:

quarkus和dapr sdk的集成:quarkiverse/quarkus-dapr#5

@kevinten10 看起来我们可以试试把layotto的client直接注入到spring-boot中? 现在的做法是单功能注解

ZLBer avatar Jul 27 '22 09:07 ZLBer

@kevinten10 看起来我们可以试试把layotto的client直接注入到spring-boot中? 现在的做法是单功能注解

我觉得可以,用户可以直接从spring ioc中获取到一个client(带有默认参数),直接使用这个client即可。

kevinten10 avatar Jul 27 '22 14:07 kevinten10

action:

  • [ ] 提个 issue,say hello 报错
  • [ ] 和 @ZLBer 投屏对下遇到的问题

seeflood avatar Aug 06 '22 12:08 seeflood