From 9c83a242e447e6f165dfe879970c319c279a9aa3 Mon Sep 17 00:00:00 2001 From: ajay-gov Date: Tue, 17 Aug 2021 13:04:54 -0700 Subject: [PATCH 1/8] - Update to 3.11.0 for swim core java libs - Update to 3.11.1 for swim js libs- fix chart, gauge and pie code to work with the new js version - Use gradle 7.0 --- server/build.gradle | 1 - server/gradle.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- ui/chart.html | 71 +++++++++++++------ ui/gauge.html | 62 +++++++++------- ui/pie.html | 54 ++++++++------ 6 files changed, 118 insertions(+), 74 deletions(-) diff --git a/server/build.gradle b/server/build.gradle index 9c783de..65f34fe 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -26,7 +26,6 @@ def useModules = jvmVersion >= 9 && !project.hasProperty('no-modules') repositories { mavenCentral() - jcenter() } dependencies { diff --git a/server/gradle.properties b/server/gradle.properties index c83847b..5083425 100644 --- a/server/gradle.properties +++ b/server/gradle.properties @@ -1 +1 @@ -swim.version=3.10.2 +swim.version=3.11.0 diff --git a/server/gradle/wrapper/gradle-wrapper.properties b/server/gradle/wrapper/gradle-wrapper.properties index 1477228..2c6bd1e 100644 --- a/server/gradle/wrapper/gradle-wrapper.properties +++ b/server/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ #Thu Dec 05 14:19:49 GMT 2019 -distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists diff --git a/ui/chart.html b/ui/chart.html index 0ae92c6..3b4aaf3 100644 --- a/ui/chart.html +++ b/ui/chart.html @@ -2,44 +2,68 @@ Swim Chart - + - -
-
- + + + - + diff --git a/ui/gauge.html b/ui/gauge.html index a4d18bd..e44dd00 100644 --- a/ui/gauge.html +++ b/ui/gauge.html @@ -2,51 +2,57 @@ Swim Gauge - + - -
-
- + + + diff --git a/ui/pie.html b/ui/pie.html index 479a235..b8713bb 100644 --- a/ui/pie.html +++ b/ui/pie.html @@ -2,47 +2,55 @@ Swim Pie - + - -
-
- + + + - + From f6e189c4c37bfe34f3805be470cdd525176f7cb0 Mon Sep 17 00:00:00 2001 From: ajay-gov Date: Mon, 25 Jul 2022 19:28:45 -0700 Subject: [PATCH 2/8] Use 4.0.1 version of the swim backend --- README.md | 2 +- README.zh-cn.md | 4 ++-- server/build.gradle | 2 +- server/gradle.properties | 2 +- server/src/main/java/swim/tutorial/DataSource.java | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b3fa0f2..5558b55 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Swim is a completely integrated solution for building scalable, end-to-end strea ## Run -* [Install JDK 9+](https://www.oracle.com/technetwork/java/javase/downloads/index.html). +* [Install JDK 11+](https://www.oracle.com/technetwork/java/javase/downloads/index.html). * Ensure that your `JAVA_HOME` environment variable is pointed to your Java installation location. * Ensure that your `PATH` includes `$JAVA_HOME`. diff --git a/README.zh-cn.md b/README.zh-cn.md index eb89f2f..a13ae03 100644 --- a/README.zh-cn.md +++ b/README.zh-cn.md @@ -11,7 +11,7 @@ Swim 是建造可规模化扩展的,终端到终端的流式(streaming)应 ## Run -* [安装 JDK 9+](https://www.oracle.com/technetwork/java/javase/downloads/index.html). +* [安装 JDK 11+](https://www.oracle.com/technetwork/java/javase/downloads/index.html). * 确保您的`JAVA_HOME`环境变量设置指向您的Java安装地址。 * 确保您的`PATH`包含`$JAVA_HOME`。 @@ -23,4 +23,4 @@ Swim 是建造可规模化扩展的,终端到终端的流式(streaming)应 浏览 [伺服器(server)](https://github.com/swimos/tutorial/tree/master/server)学习如何建立和处理在Swim伺服器(server)上的数据。 -接着,浏览 [操作界面(ui)](https://github.com/swimos/tutorial/tree/master/ui) 来学习与众不同的Swim视觉化数据处理。 \ No newline at end of file +接着,浏览 [操作界面(ui)](https://github.com/swimos/tutorial/tree/master/ui) 来学习与众不同的Swim视觉化数据处理。 diff --git a/server/build.gradle b/server/build.gradle index 65f34fe..b4d440d 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -16,7 +16,7 @@ plugins { group = 'org.swimos' description = 'Tutorial- Web Agents' ext.moduleName = 'swim.tutorial' -sourceCompatibility = 1.9 +sourceCompatibility = 11 version = project.property('swim.version') mainClassName = 'swim.tutorial.TutorialPlane' diff --git a/server/gradle.properties b/server/gradle.properties index 5083425..aae8442 100644 --- a/server/gradle.properties +++ b/server/gradle.properties @@ -1 +1 @@ -swim.version=3.11.0 +swim.version=4.0.1 diff --git a/server/src/main/java/swim/tutorial/DataSource.java b/server/src/main/java/swim/tutorial/DataSource.java index 1f23965..824855b 100644 --- a/server/src/main/java/swim/tutorial/DataSource.java +++ b/server/src/main/java/swim/tutorial/DataSource.java @@ -1,6 +1,6 @@ package swim.tutorial; -import swim.api.ref.SwimRef; +import swim.api.ref.WarpRef; import swim.structure.Record; /** @@ -9,10 +9,10 @@ */ class DataSource { - private final SwimRef ref; + private final WarpRef ref; private final String hostUri; - DataSource(SwimRef ref, String hostUri) { + DataSource(WarpRef ref, String hostUri) { this.ref = ref; this.hostUri = hostUri; } From 0d7d689048f0dd692d45b594c5dea39de35ca251 Mon Sep 17 00:00:00 2001 From: ajay-gov Date: Mon, 21 Nov 2022 16:40:10 -0800 Subject: [PATCH 3/8] Bump gradle version to 7.5 to support jdk 17 and 18 --- server/gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/gradle/wrapper/gradle-wrapper.properties b/server/gradle/wrapper/gradle-wrapper.properties index 2c6bd1e..d4939ed 100644 --- a/server/gradle/wrapper/gradle-wrapper.properties +++ b/server/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ #Thu Dec 05 14:19:49 GMT 2019 -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists From 3a85a97b2c44d8c2c54bfa7520e472cc30954e5e Mon Sep 17 00:00:00 2001 From: ajay-gov Date: Sun, 26 Feb 2023 23:04:56 -0800 Subject: [PATCH 4/8] Replace swim.ai references with swim.inc --- server/README.md | 10 +++++----- server/README.zh-cn.md | 10 +++++----- server/build.gradle | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/server/README.md b/server/README.md index 8a81b54..b75bb76 100644 --- a/server/README.md +++ b/server/README.md @@ -10,7 +10,7 @@ Swim implements a general purpose distributed object model. The "objects" in thi [Creating a class](http://github.com/swimos/tutorial/tree/master/server/src/main/java/swim/tutorial/UnitAgent.java#L13) that extends `swim.api.agent.AbstractAgent` defines a *template* for Web Agents (though not a useful one until we add some [lanes](#lanes)). -Visit the [documentation](https://developer.swim.ai/concepts/agents/) for further details about Web Agents. +Visit the [documentation](https://swimos.org/concepts/agents/) for further details about Web Agents. ## Lanes @@ -20,7 +20,7 @@ Continuing our analogy, *lane callback* functions serve as the "methods" of Web Each lane type defines a set of overridable (default no-op) lifecycle callbacks. For example, [sending a command message](#sending-data-do-swim) to any command lane will trigger its [`onCommand` callback](http://github.com/swimos/tutorial/tree/master/server/src/main/java/swim/tutorial/UnitAgent.java#L51-L54). On the other hand, [setting a value lane](http://github.com/swimos/tutorial/tree/master/server/src/main/java/swim/tutorial/UnitAgent.java#L53) will trigger its `willSet` callback, then update its value, then trigger its [`didSet` callback](http://github.com/swimos/tutorial/tree/master/server/src/main/java/swim/tutorial/UnitAgent.java#L40-L47). -Visit the [documentation](https://developer.swim.ai/concepts/lanes/) for further details about lanes. +Visit the [documentation](https://swimos.org/concepts/lanes/) for further details about lanes. ## Standing a Swim Server @@ -30,16 +30,16 @@ A plane must [declare a `SwimRoute` field](http://github.com/swimos/tutorial/tre Use the `ServerLoader` utility class to [load the default kernel modules](http://github.com/swimos/tutorial/tree/master/server/src/main/java/swim/tutorial/TutorialPlane.java#L17). -Visit the [documentation](https://developer.swim.ai/concepts) for further details about these concepts. +Visit the [documentation](https://swimos.org/concepts) for further details about these concepts. ## Populating a Swim Server With Your Data Every Swim server can be written to and read from by external processes using the Swim API. The simplest way to utilize this API is to use a **Swim client** instance to [send commands to command lanes](http://github.com/swimos/tutorial/blob/master/server/src/main/java/swim/tutorial/DataSource.java#L42). -Visit the [documentation](https://developer.swim.ai/concepts) for further details about these concepts. +Visit the [documentation](https://swimos.org/concepts) for further details about these concepts. ## Subscribing to Swim Server Data Swim client instances use Swim **links** to pull data from a Swim lanes. Like their corresponding lanes, links have overridable callback functions that can be used to [populate UIs](http://github.com/swimos/tutorial/tree/master/ui/index.html#L116-L141). -Visit the [documentation](https://developer.swim.ai/concepts/links/) for further details about links. +Visit the [documentation](https://swimos.org/concepts/links/) for further details about links. diff --git a/server/README.zh-cn.md b/server/README.zh-cn.md index 130bed7..914df25 100644 --- a/server/README.zh-cn.md +++ b/server/README.zh-cn.md @@ -10,7 +10,7 @@ Swim 实现了通用目的的分布式对象模型。这些在模型中的“对 [新建一个 class](http://github.com/swimos/tutorial/tree/master/server/src/main/java/swim/tutorial/UnitAgent.java#L13) 继承`swim.api.agent.AbstractAgent` 定义了一个网络代理的 *样板* (虽然在加入[lanes](#lanes)之前不可用)。 -浏览 [参考文献](https://developer.swim.ai/concepts/agents/) 获得更多网络代理(Web Agents)详情。 +浏览 [参考文献](https://swimos.org/concepts/agents/) 获得更多网络代理(Web Agents)详情。 ## Lanes @@ -20,7 +20,7 @@ Swim 实现了通用目的的分布式对象模型。这些在模型中的“对 每种 lane 的类型定义了一套可重写的(默认 no-op)生命周期回调。例如:[发送一条命令消息](#sending-data-do-swim) 到任意的 command lane 会触发 command lane [`onCommand` 回调](http://github.com/swimos/tutorial/tree/master/server/src/main/java/swim/tutorial/UnitAgent.java#L51-L54). 在另一方面, [设置一个 value lane](http://github.com/swimos/tutorial/tree/master/server/src/main/java/swim/tutorial/UnitAgent.java#L53) 会触发 value lane的 `willSet` 回调, 然后更新value lane的值,接着触发value lane 的 [`didSet` 回调](http://github.com/swimos/tutorial/tree/master/server/src/main/java/swim/tutorial/UnitAgent.java#L40-L47)。 -浏览 [参考文献](https://developer.swim.ai/concepts/lanes/) 获得更多lanes的更多详情。 +浏览 [参考文献](https://swimos.org/concepts/lanes/) 获得更多lanes的更多详情。 ## 设置 Swim 伺服器(Server) @@ -30,16 +30,16 @@ Plane 必须在每一种Web Agent 类别上都分别[宣告一个`AgentType`域 使用 `ServerLoader` 公用程序 class 来[在 Swim Server 上加载 plane](http://github.com/swimos/tutorial/tree/master/server/src/main/java/swim/tutorial/TutorialPlane.java#L18)。请注意模型必须[`提供` `swim.api.plane.Plane` 与自定义的plane class](http://github.com/swimos/tutorial/tree/master/server/src/main/java/module-info.java#L8)。 -浏览 [参考文献](https://developer.swim.ai/concepts) 获得更多详情。 +浏览 [参考文献](https://swimos.org/concepts) 获得更多详情。 ## 将数据填入 Swim Server 每一个Swim 伺服器(Server)都可以从外部程序使用 Swim API 写入和读取。最简单地利用这个API的方式是使用一个**Swim Client** 实例来[发送指令到command lanes](http://github.com/swimos/tutorial/blob/master/server/src/main/java/swim/tutorial/DataSource.java#L40)。 -浏览 [参考文献](https://developer.swim.ai/concepts) 获得更多详情。 +浏览 [参考文献](https://swimos.org/concepts) 获得更多详情。 ## 订阅 Swim Server 数据 Swim Client 实例使用 Swim **links** 从 Swim lanes 中获取数据。与links相对应的lanes一样,links也有可重写的回调函数,并且这个函数可以被用来[建造 UI](http://github.com/swimos/tutorial/tree/master/ui/index.html#L111-L133)。 -浏览 [参考文献](https://developer.swim.ai/concepts/links/) 获取更多详情。 \ No newline at end of file +浏览 [参考文献](https://swimos.org/concepts/links/) 获取更多详情。 diff --git a/server/build.gradle b/server/build.gradle index b4d440d..4394137 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -111,7 +111,7 @@ afterEvaluate { } task packageDeb(type: Deb) { - maintainer = 'developer@swim.ai' + maintainer = 'developer@swim.inc' configurationFile("/etc/sysconfig/${project.name}") preInstall "addgroup --quiet --system ${project.name}" From 0154a5b1ba4c0c092f4d2d954686b659e5537709 Mon Sep 17 00:00:00 2001 From: ajay-gov Date: Tue, 29 Aug 2023 16:24:18 -0700 Subject: [PATCH 5/8] Replace AgentRoute annotations with node paths in the server.recon file --- server/src/main/java/swim/tutorial/TutorialPlane.java | 5 ----- server/src/main/resources/server.recon | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/src/main/java/swim/tutorial/TutorialPlane.java b/server/src/main/java/swim/tutorial/TutorialPlane.java index 46988e8..2d2fefd 100644 --- a/server/src/main/java/swim/tutorial/TutorialPlane.java +++ b/server/src/main/java/swim/tutorial/TutorialPlane.java @@ -1,7 +1,5 @@ package swim.tutorial; -import swim.api.SwimRoute; -import swim.api.agent.AgentRoute; import swim.api.plane.AbstractPlane; import swim.client.ClientRuntime; import swim.kernel.Kernel; @@ -9,9 +7,6 @@ public class TutorialPlane extends AbstractPlane { - @SwimRoute("/unit/:id") - private AgentRoute unitAgent; - public static void main(String[] args) throws InterruptedException { final Kernel kernel = ServerLoader.loadServer(); diff --git a/server/src/main/resources/server.recon b/server/src/main/resources/server.recon index 82eb142..b10741a 100644 --- a/server/src/main/resources/server.recon +++ b/server/src/main/resources/server.recon @@ -1,5 +1,10 @@ tutorial: @fabric { @plane(class: "swim.tutorial.TutorialPlane") + + @node { + pattern: "/unit/:id" + @agent(class: "swim.tutorial.UnitAgent") + } } @web(port: 9001) { From 7c43178387753b66da9906f8b0b0fd3c85984088 Mon Sep 17 00:00:00 2001 From: ajay-gov Date: Tue, 29 Aug 2023 18:05:07 -0700 Subject: [PATCH 6/8] Replace deprecated APIs --- server/build.gradle | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/server/build.gradle b/server/build.gradle index 4394137..b7c4363 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -20,7 +20,6 @@ sourceCompatibility = 11 version = project.property('swim.version') mainClassName = 'swim.tutorial.TutorialPlane' -//def moduleName = 'swim.tutorial' def jvmVersion = System.getProperty('java.version').split('\\.')[0] as Integer def useModules = jvmVersion >= 9 && !project.hasProperty('no-modules') @@ -36,7 +35,7 @@ dependencies { afterEvaluate { sourceSets { - main.output.resourcesDir = main.java.outputDir + main.output.resourcesDir = main.java.classesDirectory } compileJava { @@ -59,7 +58,7 @@ afterEvaluate { manifest { attributes( 'Implementation-Title': moduleName, - 'Implementation-Version': version, + 'Implementation-Version': archiveVersion, 'Main-Class': mainClassName) } } @@ -91,7 +90,7 @@ afterEvaluate { '-Xms3g', '-Xmx3g', '--module-path', 'APP_HOME_LIBS', - '--module', "${moduleName}/${mainClassName}" + '--module', "${moduleName}/${mainClass}" ] } doLast { @@ -111,7 +110,7 @@ afterEvaluate { } task packageDeb(type: Deb) { - maintainer = 'developer@swim.inc' + maintainer = 'developers@swimos.org' configurationFile("/etc/sysconfig/${project.name}") preInstall "addgroup --quiet --system ${project.name}" From 6e6a22b8f086b94f9b5a25d7df3419fae64e5faf Mon Sep 17 00:00:00 2001 From: ajay-gov Date: Mon, 2 Oct 2023 22:20:18 -0700 Subject: [PATCH 7/8] Use the latest release version of swim libraries- 4.1.0.12 --- server/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/gradle.properties b/server/gradle.properties index aae8442..2d13805 100644 --- a/server/gradle.properties +++ b/server/gradle.properties @@ -1 +1 @@ -swim.version=4.0.1 +swim.version=4.1.0.12 From 5fad9a40eecb98a5ed39d95788a344a0d2b1a753 Mon Sep 17 00:00:00 2001 From: AdityaRandive Date: Tue, 16 Apr 2024 23:59:34 -0700 Subject: [PATCH 8/8] Fix documentation reference link for web agents --- server/README.md | 2 +- server/README.zh-cn.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/README.md b/server/README.md index b75bb76..ae04d8e 100644 --- a/server/README.md +++ b/server/README.md @@ -10,7 +10,7 @@ Swim implements a general purpose distributed object model. The "objects" in thi [Creating a class](http://github.com/swimos/tutorial/tree/master/server/src/main/java/swim/tutorial/UnitAgent.java#L13) that extends `swim.api.agent.AbstractAgent` defines a *template* for Web Agents (though not a useful one until we add some [lanes](#lanes)). -Visit the [documentation](https://swimos.org/concepts/agents/) for further details about Web Agents. +Visit the [documentation](https://www.swimos.org/swimos-concepts/web-agents-intro/) for further details about Web Agents. ## Lanes diff --git a/server/README.zh-cn.md b/server/README.zh-cn.md index 914df25..8eee547 100644 --- a/server/README.zh-cn.md +++ b/server/README.zh-cn.md @@ -10,7 +10,7 @@ Swim 实现了通用目的的分布式对象模型。这些在模型中的“对 [新建一个 class](http://github.com/swimos/tutorial/tree/master/server/src/main/java/swim/tutorial/UnitAgent.java#L13) 继承`swim.api.agent.AbstractAgent` 定义了一个网络代理的 *样板* (虽然在加入[lanes](#lanes)之前不可用)。 -浏览 [参考文献](https://swimos.org/concepts/agents/) 获得更多网络代理(Web Agents)详情。 +浏览 [参考文献](https://www.swimos.org/swimos-concepts/web-agents-intro/) 获得更多网络代理(Web Agents)详情。 ## Lanes pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy