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/README.md b/server/README.md index 8a81b54..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://developer.swim.ai/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 @@ -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..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://developer.swim.ai/concepts/agents/) 获得更多网络代理(Web Agents)详情。 +浏览 [参考文献](https://www.swimos.org/swimos-concepts/web-agents-intro/) 获得更多网络代理(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 9c783de..b7c4363 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -16,17 +16,15 @@ 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' -//def moduleName = 'swim.tutorial' def jvmVersion = System.getProperty('java.version').split('\\.')[0] as Integer def useModules = jvmVersion >= 9 && !project.hasProperty('no-modules') repositories { mavenCentral() - jcenter() } dependencies { @@ -37,7 +35,7 @@ dependencies { afterEvaluate { sourceSets { - main.output.resourcesDir = main.java.outputDir + main.output.resourcesDir = main.java.classesDirectory } compileJava { @@ -60,7 +58,7 @@ afterEvaluate { manifest { attributes( 'Implementation-Title': moduleName, - 'Implementation-Version': version, + 'Implementation-Version': archiveVersion, 'Main-Class': mainClassName) } } @@ -92,7 +90,7 @@ afterEvaluate { '-Xms3g', '-Xmx3g', '--module-path', 'APP_HOME_LIBS', - '--module', "${moduleName}/${mainClassName}" + '--module', "${moduleName}/${mainClass}" ] } doLast { @@ -112,7 +110,7 @@ afterEvaluate { } task packageDeb(type: Deb) { - maintainer = 'developer@swim.ai' + maintainer = 'developers@swimos.org' configurationFile("/etc/sysconfig/${project.name}") preInstall "addgroup --quiet --system ${project.name}" diff --git a/server/gradle.properties b/server/gradle.properties index c83847b..2d13805 100644 --- a/server/gradle.properties +++ b/server/gradle.properties @@ -1 +1 @@ -swim.version=3.10.2 +swim.version=4.1.0.12 diff --git a/server/gradle/wrapper/gradle-wrapper.properties b/server/gradle/wrapper/gradle-wrapper.properties index 1477228..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-6.4.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists 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; } 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) { 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 - + - -
-
- + + + - + 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