Skip to content

Releases: capa-cloud/capa-java

Capa v1.0.0.RELEASE release

12 Sep 04:53

Choose a tag to compare

Capa(cloud application api): To be the high-level api layer for all application runtime.

Define a common set of APIs to make sure that code once and run anywhere!

This is the Capa SDK for Java, including the following features:

  • Service Invocation(RPC)
  • Configuration Centor(Configuration)
  • Application Metrics(Metrics)
  • Publish/Subscribe(Pub/Sub)
  • State Management(State)
  • ...

参考项目:

Introduction

使用与具体实现无关的统一的编程API,所以应用程序在编程时不需要依赖任何具体的基础设施和中间件,只需要依赖CAPA的抽象层SDK即可。

在部署到不同的环境时,装载抽象SDK的不同实现到应用程序中,当调用统一的编程API时,底层适配到不同的具体实现。

所以应用程序不管将来要运行在哪里,只需要依赖一套统一的SDK就可以了。

参考资料: dapr/dapr#3261

Why not DAPR

设计思想和Dapr等项目是相同的,但是Dapr等项目走的非常靠前,其逻辑依赖于独立部署的dapr-sidecar来实现。

这就要求从最底层的基础设施层进行支持,但很多时候,我们并不能一步到位的切换到sidecar的模式。

故Capa将sidecar中的逻辑移植到SDK中,应用无需依赖sidecar,引入SDK即可。

未来肯定是要发展向Dapr这种模式,但是在过渡期,Capa这种模式将一直存在。

参考资料: dapr/dapr#2817

API Design

API设计和社区保持同步,请参考Dapr/Layotto等开源项目的设计。

目前API定义在: cloud-runtimes

Get started

<dependency>
  <groupId>group.rxcloud</groupId>
  <artifactId>capa-sdk</artifactId>
  <version>1.0.0-RELEASE</version>
</dependency>