適用於 Apache Geode 和 VMware GemFire 的 Spring Boot 1.4.0-M2 和 1.3.3.RELEASE 已釋出

釋出版本 | John Blum | 2020年8月22日 | ...

我代表 Spring、Apache Geode 和 VMware Tanzu GemFire 社群,很高興宣佈釋出 Spring Boot for Apache Geode & VMware GemFire (SBDG) 的 1.4.0-M21.3.3.RELEASE 版本。

SBDG 1.4.0-M2 基於

  • Spring Boot 2.4.0-M2

  • Spring Framework 5.3.0-M2

  • 適用於 Apache Geode 和 VMware GemFire 的 Spring Data (SDG) 2020.0.0-M2 (Ockham-M2/2.4.0-M2)

  • 適用於 Apache Geode 和 VMware GemFire 的 Spring Session (SSDG) 2020.0.0-M1 (2.4.0-M1)

  • 適用於 Apache Geode 和 VMware GemFire 的 Spring Test (STDG) 0.0.18.RELEASE

SBDG 1.3.3.RELEASE 基於

  • Spring Boot 2.3.3.RELEASE

  • Spring Framework 5.2.8.RELEASE

  • 適用於 Apache Geode 和 VMware GemFire 的 Spring Data (SDG) Neumann-SR3 (2.3.3.RELEASE)

  • 適用於 Apache Geode 和 VMware GemFire 的 Spring Session (SSDG) Dragonfruit-RELEASE (2.3.0.RELEASE)

  • 適用於 Apache Geode 和 VMware GemFire 的 Spring Test (STDG) 0.0.18.RELEASE

您可以檢視版本相容性矩陣獲取完整詳細資訊(向右滾動表格可檢視所有依賴項)。

開始使用 Apache Geode 構建 Spring Boot 應用程式的最佳方式是使用 Spring Initializer,網址是 start.spring.io。只需點選此 連結即可開始。

新特性

SBDG 1.4 M2 添加了對非同步(Write-Behind)、內聯快取的專門支援!

透過將*內聯快取*模式應用於您的 Spring Boot 應用程式,Apache Geode 將在快取未命中時自動進行*讀穿*(Read-Through),在快取更新時自動進行*寫穿*(Write-Through)(同步)或*寫回*(Write-Behind)(非同步),無需您在應用程式中進行任何特殊操作。

如果不需要強一致性且您希望獲得更好的吞吐量,則應使用非同步、*寫回*內聯快取。

提示

SBDG 已經支援同步(讀/寫穿)內聯快取。另請參閱相關的示例指南示例程式碼

提示

SBDG 還支援旁路快取(Look-Aside)、近端快取(Near Caching)和多站點快取(Multi-Site)模式。

注意

當大多數人想到快取時,他們實際上是指*旁路快取*模式。但是,您知道嗎,快取有幾種模式:*旁路快取*、*近端快取*、*內聯快取*(同步和非同步)和*多站點快取*。不要混淆快取的“模式”(如何應用)與快取的“用例”(用於什麼),例如(HTTP)會話狀態快取。是的,快取還有許多其他“用途”,但有非常具體的模式,它們具有各自的架構優缺點,適用於某些用例而不適用於其他用例。“你知道得越多越好…​

SBDG 1.4 M2 和 1.3.3.RELEASE 都包含了新的 spring-geode-bom 模組。鑑於 SBDG 包含以下模組

  • spring-geode-starter

  • spring-geode-starter-actuator

  • spring-geode-starter-session

  • spring-geode-starter-test

透過使用新的 Maven BOM 檔案,您只需在 Spring Boot Gradle 或 Maven POM 專案構建檔案中宣告依賴管理,即可集中且一致地管理應用程式所需的 SBDG 模組版本。

例如

<properties>
    <spring-geode.version>1.4.0-M2</spring-geode.version>
</properties>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.geode</groupId>
            <artifactId>spring-geode-bom</artifactId>
            <version>${spring-geode.version}</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
    </dependencies>
</dependencyManagement>

<dependencies>
    <dependency>
        <groupId>org.springframework.geode</groupId>
        <artifactId>spring-geode-starter</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.geode</groupId>
        <artifactId>spring-geode-starter-actuator</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.geode</groupId>
        <artifactId>spring-geode-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
</dependencies>

我們將向 Spring Initializer 提出更改請求,使其在使用 Apache Geode 生成 Spring Boot Gradle/Maven 專案時宣告新的 spring-geode-bom Maven BOM。

本次釋出版本中包含的其他值得注意的變更

  • 更新了“*入門*”示例指南,在“在雲平臺環境中執行應用程式”下添加了名為“*匹配客戶端/伺服器版本*”的部分,以幫助使用者瞭解 Spring Boot、Apache Geode、VMware/Pivotal GemFire 和 Pivotal Cloud Cache(現稱為 VMware Tanzu GemFire for VMs - BOSH)的版本相容性要求……呼!

  • 包含了一個新的關於安全的示例指南示例程式碼,即如何在本地和託管(例如雲平臺)環境中執行時使用 Spring Boot 保護您的 GemFire/Geode 客戶端和伺服器。

請參閱更新日誌以獲取完整詳細資訊。

後續計劃

我們可能會在達到 GA 版本之前,為 SBDG 1.4 版本系列再提供一份關於非同步(寫回)內聯快取的示例指南和程式碼,並加倍努力使現有功能更加健壯和可靠。

該專案的其他總體目標之一是讓使用者難以做錯事。我們還有一段路要走,但每一步我都更加確信事情正朝著正確的方向發展。

結論

一如既往,歡迎並感謝您的反饋和貢獻。

問題 | PR | StackOverflow

獲取 Spring 資訊

訂閱 Spring 資訊,保持連線

訂閱

先行一步

VMware 提供培訓和認證,助力您加速發展。

瞭解更多

獲取支援

Tanzu Spring 透過一份簡單的訂閱,為 OpenJDK™、Spring 和 Apache Tomcat® 提供支援和二進位制檔案。

瞭解更多

即將舉辦的活動

檢視 Spring 社群的所有即將舉辦的活動。

檢視全部