Skip to content

Commit

Permalink
Update to 3.3.0 and 3.4.0-SNAPSHOT.
Browse files Browse the repository at this point in the history
Signed-off-by: Achim Kraus <[email protected]>
  • Loading branch information
Achim Kraus committed Feb 24, 2022
1 parent 26e9277 commit bb6adaa
Show file tree
Hide file tree
Showing 14 changed files with 64 additions and 63 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $ mvn clean install -DcreateJavadoc=true
## Build earlier release

## !!! Since 29. October 2021 !!!
**The hostname "non-existing.host" is now existing and all builds of version and tags before that date will fail.**
**The hostname "non-existing.host" is now existing and all builds of version and tags before that date will fail the tests. Therefore use -DskipTests**

To (re-)build versions before that date the unit tests must therefore be skipped.

Expand Down Expand Up @@ -120,7 +120,7 @@ With that, it gets very time consuming to test all combinations. Therefore, if y

# Using Californium in Maven Projects

We are publishing Californium's artifacts for milestones and releases to [Maven Central](https://search.maven.org/search?q=g:org.eclipse.californium%20a:parent%20v:3.2.0).
We are publishing Californium's artifacts for milestones and releases to [Maven Central](https://search.maven.org/search?q=g:org.eclipse.californium%20a:parent%20v:3.3.0).
To use the latest released version as a library in your projects, add the following dependency
to your `pom.xml` (without the dots):

Expand All @@ -130,7 +130,7 @@ to your `pom.xml` (without the dots):
<dependency>
<groupId>org.eclipse.californium</groupId>
<artifactId>californium-core</artifactId>
<version>3.2.0</version>
<version>3.3.0</version>
</dependency>
...
</dependencies>
Expand All @@ -154,7 +154,7 @@ You will therefore need to add the Eclipse Repository to your `pom.xml` first:
...
</repositories>
```
You can then simply depend on `3.3.0-SNAPSHOT`.
You can then simply depend on `3.4.0-SNAPSHOT`.

# Eclipse

Expand All @@ -177,7 +177,7 @@ In IntelliJ, choose *[File.. &raquo; Open]* then select the location of the clon

A test server is running at <a href="coap://californium.eclipseprojects.io:5683/">coap://californium.eclipseprojects.io:5683/</a>

It is an instance of the [cf-plugtest-server](https://repo.eclipse.org/content/repositories/californium-releases/org/eclipse/californium/cf-plugtest-server/3.2.0/cf-plugtest-server-3.2.0.jar) from the demo-apps.
It is an instance of the [cf-plugtest-server](https://repo.eclipse.org/content/repositories/californium-releases/org/eclipse/californium/cf-plugtest-server/3.3.0/cf-plugtest-server-3.3.0.jar) from the demo-apps.
The root resource responds with its current version.

More information can be found at [http://www.eclipse.org/californium](http://www.eclipse.org/californium) and technical details at [https://projects.eclipse.org/projects/iot.californium](https://projects.eclipse.org/projects/iot.californium).
Expand All @@ -191,7 +191,7 @@ More information can be found at [http://coap.me/](http://coap.me/).
For some systems (particularly when multicasting), it may be necessary to specify/restrict californium to a particular network interface, or interfaces. This can be
achieved by setting the `COAP_NETWORK_INTERFACES` JVM parameter to a suitable regex, for example:

`java -DCOAP_NETWORK_INTERFACES='.*wpan0' -jar target/cf-helloworld-server-3.2.0.jar MulticastTestServer`
`java -DCOAP_NETWORK_INTERFACES='.*wpan0' -jar target/cf-helloworld-server-3.3.0.jar MulticastTestServer`

# Contact

Expand Down
5 changes: 3 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ For more details, please look at https://www.eclipse.org/security/.

| Version | Supported |
| ------- | ------------------ |
| 3.3.0-SNAPSHOT (master) | :heavy_check_mark: |
| 3.2.0 | :heavy_check_mark: |
| 3.4.0-SNAPSHOT (master) | :heavy_check_mark: |
| 3.3.0 | :heavy_check_mark: |
| 3.2.0 | :question: |
| 3.1.0 | :question: |
| 3.0.0 | :question: |
| 2.7.0 | :question: |
Expand Down
2 changes: 1 addition & 1 deletion cf-utils/cf-nat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ In order to test NAT and LoadBalancer specific situations, this module contains

# Download

[Eclipse Release Repository](https://repo.eclipse.org/content/repositories/californium-releases/org/eclipse/californium/cf-nat/3.2.0/cf-nat-3.2.0.jar)
[Eclipse Release Repository](https://repo.eclipse.org/content/repositories/californium-releases/org/eclipse/californium/cf-nat/3.3.0/cf-nat-3.3.0.jar)

#Usage

Expand Down
2 changes: 1 addition & 1 deletion demo-apps/cf-android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ android {


dependencies {
def californiumVersion = '3.2.0'
def californiumVersion = '3.3.0'

implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'org.eclipse.californium:californium-core:' + californiumVersion
Expand Down
6 changes: 3 additions & 3 deletions demo-apps/cf-extplugtest-client/benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ echo "adjust the \"-Xmx6g\" argument in \"CF_OPT\" to about 50% of the available
echo "For newer JVMs the \"-XX:MaxRAMPercentage=50\" argument in \"CF_OPT\" may be used instead."
echo
echo "The required server may be started using:"
echo "java -Xmx6g -XX:+UseG1GC -jar cf-extplugtest-server-3.2.0.jar --no-external --no-plugtest"
echo "java -Xmx6g -XX:+UseG1GC -jar cf-extplugtest-server-3.3.0.jar --no-external --no-plugtest"
echo "Adjust the \"-Xmx6g\" argument also to about 50% of the available RAM."
echo "For newer JVMs the \"-XX:MaxRAMPercentage=50\" argument in \"CF_OPT\" may also be used instead."
echo "If the benchmark is mainly used with the loopback interface (localhost), use the --no-external as above."
Expand Down Expand Up @@ -84,13 +84,13 @@ echo
# cat /proc/sys/vm/max_map_count
# prlimit

CF_JAR=cf-extplugtest-client-3.2.0.jar
CF_JAR=cf-extplugtest-client-3.3.0.jar
CF_JAR_FIND='cf-extplugtest-client-*.jar'
CF_EXEC="org.eclipse.californium.extplugtests.BenchmarkClient"
#CF_OPT="-XX:+UseG1GC -Xmx6g -Xverify:none"
CF_OPT="-XX:MaxRAMPercentage=50"

export CALIFORNIUM_STATISTIC="3.2.0"
export CALIFORNIUM_STATISTIC="3.3.0"

if [ -z "$1" ] ; then
CF_HOST=localhost
Expand Down
4 changes: 2 additions & 2 deletions demo-apps/cf-extplugtest-client/hono-benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ echo
# cat /proc/sys/vm/max_map_count
# prlimit

CF_JAR=cf-extplugtest-client-3.1.0-SNAPSHOT.jar
CF_JAR=cf-extplugtest-client-3.3.0.jar
CF_JAR_FIND='cf-extplugtest-client-*.jar'
CF_EXEC="org.eclipse.californium.extplugtests.BenchmarkClient"
CF_OPT="-XX:+UseG1GC -Xmx6g -Xverify:none"

export CALIFORNIUM_STATISTIC="3.1.0-hono"
export CALIFORNIUM_STATISTIC="3.3.0-hono"

# store psk credentials in "hono.psk"
# format:
Expand Down
46 changes: 23 additions & 23 deletions demo-apps/cf-extplugtest-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ To see the set of options and arguments.
Requires to start the server with
```sh
java -Xmx6g -XX:+UseG1GC -jar cf-extplugtest-server-3.2.0.jar --benchmark --no-plugtest
java -Xmx6g -XX:+UseG1GC -jar cf-extplugtest-server-3.3.0.jar --benchmark --no-plugtest
```
The performance with enabled deduplication for CON requests depends a lot on heap management. Especially, if the performance goes down after a while, that is frequently caused by an exhausted heap. Therefore using explicit heap-options is recommended. Use the benchmark client from "cf-extplugtest-client", normally started with the shell script "benchmark.sh" there.
Expand Down Expand Up @@ -301,7 +301,7 @@ See [cf-cluster README.md](../../cf-utils/cf-cluster/README.md) for more details
A service, which uses requests with a device UUID to record these requests along with the source-ip and report them in a response. A client then analyze, if requests or responses may get lost. Used for long term communication tests. An example client is contained in "cf-extplugtest-client".
```sh
java -jar target/cf-extplugtest-client-3.2.0.jar ReceivetestClient --cbor -v
java -jar target/cf-extplugtest-client-3.3.0.jar ReceivetestClient --cbor -v
Response: Payload: 491 bytes
RTT: 1107ms
Expand Down Expand Up @@ -425,21 +425,21 @@ The current build-in cluster comes with three modes:
Start node 1 on port 15784, using `localhost:15884` as own cluster-management-interface. Provide `localhost:25884` as static cluster-management-interface for node 2:
```sh
java -jar target/cf-extplugtest-server-3.2.0.jar --dtls-cluster ":15784;localhost:15884;1,---;localhost:25884;2"
java -jar target/cf-extplugtest-server-3.3.0.jar --dtls-cluster ":15784;localhost:15884;1,---;localhost:25884;2"
```
Start node 2 on port 25784, using `localhost:25884` as own cluster-management-interface. Provide `localhost:15884` as static cluster-management-interface for node 1:
```sh
java -jar target/cf-extplugtest-server-3.2.0.jar --dtls-cluster "---;localhost:15884;1,:25784;localhost:25884;2"
java -jar target/cf-extplugtest-server-3.3.0.jar --dtls-cluster "---;localhost:15884;1,:25784;localhost:25884;2"
```
In that mode, the `address:cid` pairs of the other/foreign nodes are static.
To use that setup, a basic udp-load-balancer may be used in front. The [Cf-NAT](https://github.com/eclipse/californium/tree/master/cf-utils/cf-nat) offers such a function:
```sh
java -jar cf-nat-3.2.0.jar :5784 <host>:15784 <host>:25784
java -jar cf-nat-3.3.0.jar :5784 <host>:15784 <host>:25784
```
Replace `<host>` by the host the `cf-extplugtest-server` has been started.
Expand All @@ -449,19 +449,19 @@ Replace `<host>` by the host the `cf-extplugtest-server` has been started.
Start node 1 on port 15784, using `localhost:15884` as own cluster-management-interface. Provide `localhost:25884,localhost:35884` as cluster-management-interfaces for the other nodes of this cluster group:
```sh
java -jar target/cf-extplugtest-server-3.2.0.jar --dtls-cluster ":15784;localhost:15884;1" --dtls-cluster-group="localhost:25884,localhost:35884"
java -jar target/cf-extplugtest-server-3.3.0.jar --dtls-cluster ":15784;localhost:15884;1" --dtls-cluster-group="localhost:25884,localhost:35884"
```
Start node 2 on port 25784, using `localhost:25884` as own cluster-management-interface. Provide `localhost:15884,localhost:35884` as cluster-management-interfaces for the other nodes of this cluster group:
```sh
java -jar target/cf-extplugtest-server-3.2.0.jar --dtls-cluster ":25784;localhost:25884;2" --dtls-cluster-group="localhost:15884,localhost:35884"
java -jar target/cf-extplugtest-server-3.3.0.jar --dtls-cluster ":25784;localhost:25884;2" --dtls-cluster-group="localhost:15884,localhost:35884"
```
Start node 3 on port 35784, using `localhost:35884` as own cluster-management-interface. Provide `localhost:15884,localhost:25884` as cluster-management-interfaces for the other nodes of this cluster group:
```sh
java -jar target/cf-extplugtest-server-3.2.0.jar --dtls-cluster ":35784;localhost:35884;3" --dtls-cluster-group="localhost:15884,localhost:25884"
java -jar target/cf-extplugtest-server-3.3.0.jar --dtls-cluster ":35784;localhost:35884;3" --dtls-cluster-group="localhost:15884,localhost:25884"
```
In that mode, the `address:cid` pairs of the other/foreign nodes are dynamically created using additional messages of the cluster-management-protocol.
Expand All @@ -476,13 +476,13 @@ In that mode, the `address:cid` pairs of the other/foreign nodes are dynamically
This cluster internal management traffic could be optionally encrypted using DTLS with PSK (all nodes share the same identity and secret).
```sh
java -jar target/cf-extplugtest-server-3.2.0.jar --dtls-cluster ":25784;localhost:25884;2" --dtls-cluster-group="localhost:15884,localhost:35884 --dtls-cluster-group-security=topSecret!"
java -jar target/cf-extplugtest-server-3.3.0.jar --dtls-cluster ":25784;localhost:25884;2" --dtls-cluster-group="localhost:15884,localhost:35884 --dtls-cluster-group-security=topSecret!"
```
To use that setup, a basic udp-load-balancer may be used in front as for the mode before. Just add the new third destination.
```sh
java -jar cf-nat-3.1.0.jar :5784 <host>:15784 <host>:25784 <host>:35784
java -jar cf-nat-3.3.0.jar :5784 <host>:15784 <host>:25784 <host>:35784
```
### k8s Nodes
Expand All @@ -493,7 +493,7 @@ java -jar cf-nat-3.1.0.jar :5784 <host>:15784 <host>:25784 <host>:35784
Start nodes in a container using port `5784`, and `<any>:5884` as own cluster-management-interface. Additionally provide the external port of the cluster-management-interface also with `5884`.
```
CMD ["java", "-XX:+UseContainerSupport", "-XX:MaxRAMPercentage=75", "-jar", "/opt/app/cf-extplugtest-server-3.2.0.jar", "--no-plugtest", "--no-tcp", "--benchmark", "--k8s-dtls-cluster", ":5784;:5884;5884"]
CMD ["java", "-XX:+UseContainerSupport", "-XX:MaxRAMPercentage=75", "-jar", "/opt/app/cf-extplugtest-server-3.3.0.jar", "--no-plugtest", "--no-tcp", "--diagnose", "--benchmark", "--k8s-dtls-cluster", ":5784;:5884;5884"]
```
Example `CMD` statement for docker (":5884" for "<any>:5884", "5884" for just port 5884, see [Dockerfile](service/Dockerfile)).
Expand Down Expand Up @@ -538,7 +538,7 @@ Using a k8s local-setup, the "StatefulSet" comes with a "in-cluster load balanci
To test the dtls-cid-cluster a coap-client can be used. For the k8s approach, start it with
```sh
java -jar cf-client-3.1.0.jar --method GET coaps://<host>:30784/mycontext
java -jar cf-client-3.3.0.jar --method GET coaps://<host>:30784/mycontext
==[ CoAP Request ]=============================================
MID : 12635
Expand Down Expand Up @@ -574,7 +574,7 @@ write-cid:
ext-master-secret: true
newest-record: true
message-size-limit: 1367
server: Cf 3.2.0
server: Cf 3.3.0
===============================================================
```
Expand All @@ -587,15 +587,15 @@ If you execute the client multiple times, you will see different `node-id`s, whe
For the other two variants above, `Static Nodes` or `Dynamic Nodes`, the `cf-nat` may be used as load-balancer. In that cases, just use the address of the `cf-nat` as destination, e.g.
```sh
java -jar cf-client-3.2.0.jar --method GET coaps://<nat>:5784/mycontext
java -jar cf-client-3.3.0.jar --method GET coaps://<nat>:5784/mycontext
```
### Test the dtls-cid-cluster with Cf-NAT
To test, that the dtls-cid-cluster even works, if the client's address is changed, such a address change can be simulated using [Cf-NAT](https://github.com/eclipse/californium/tree/master/cf-utils/cf-nat) (download available in the [Eclipse Release Repository](https://repo.eclipse.org/content/repositories/californium-releases/org/eclipse/californium/cf-nat/3.2.0/cf-nat-3.2.0.jar)).
To test, that the dtls-cid-cluster even works, if the client's address is changed, such a address change can be simulated using [Cf-NAT](https://github.com/eclipse/californium/tree/master/cf-utils/cf-nat) (download available in the [Eclipse Release Repository](https://repo.eclipse.org/content/repositories/californium-releases/org/eclipse/californium/cf-nat/3.3.0/cf-nat-3.3.0.jar)).
```sh
java -jar cf-nat-3.2.0.jar :5784 <host>:30784
java -jar cf-nat-3.3.0.jar :5784 <host>:30784
```
Starts a NAT at port `5784`, forwarding the traffic to `<host>:30784`.
Expand All @@ -613,7 +613,7 @@ remove <host:port> - remove destination from load balancer
reverse (on|off) - enable/disable reverse address updates.
```
Start two [cf-browser-3.2.0](https://repo.eclipse.org/content/repositories/californium-releases/org/eclipse/californium/cf-browser/3.2.0/cf-browser-3.2.0.jar) instances. Enter as destination `coaps://<nat-host>:5784/mycontext` and execute a `GET` in both clients. Do they show different `node-ids`? If not, restart one as long as you get two different `node-id`s. Also check, if the line with `read-cid` is missing. If so, the DTLS Connection ID support is not enabled. Check, if `DTLS_CONNECTION_ID_LENGTH` is set in "Californium3.properties" to a number. Even `0` will enable it. But a empty value disables the DTLS Connection ID support!
Start two [cf-browser-3.3.0](https://repo.eclipse.org/content/repositories/californium-releases/org/eclipse/californium/cf-browser/3.3.0/cf-browser-3.3.0.jar) instances. Enter as destination `coaps://<nat-host>:5784/mycontext` and execute a `GET` in both clients. Do they show different `node-ids`? If not, restart one as long as you get two different `node-id`s. Also check, if the line with `read-cid` is missing. If so, the DTLS Connection ID support is not enabled. Check, if `DTLS_CONNECTION_ID_LENGTH` is set in "Californium3.properties" to a number. Even `0` will enable it. But a empty value disables the DTLS Connection ID support!
```
ip: ?.?.?.?
Expand All @@ -627,7 +627,7 @@ write-cid:
ext-master-secret: true
newest-record: true
message-size-limit: 1399
server: Cf 3.1.0
server: Cf 3.3.0
```
Now, press `<enter>` on the console of the NAT.
Expand Down Expand Up @@ -659,7 +659,7 @@ write-cid:
ext-master-secret: true
newest-record: true
message-size-limit: 1399
server: Cf 3.2.0
server: Cf 3.3.0
```
You may retry that, you should see the same ip-address/port (5-tuple), if you retry it within the NATs timeout (30s).
Expand All @@ -681,7 +681,7 @@ write-cid:
ext-master-secret: true
newest-record: true
message-size-limit: 1399
server: Cf 3.2.0
server: Cf 3.3.0
```
You may even restart the NAT, the coaps communication will still work.
Expand Down Expand Up @@ -801,7 +801,7 @@ An idea to improve that, is not to backward the records and instead send them di
The communication is routed through NATs/LoadBalancer. A entry for `IPa => IPb` can usually not be used to send a record back from `IPc`. The simple load-balancer `cf-nat` offers therefore the "reverse address update feature". With that, sending back a message with `IPc => IPa` is not only possible, it updates the load-balancer destination to the right `IPc` node for this client's traffic. This works for the first two setups `Static Notes` and `Dynamic Notes`, if the `cf-nat`is used as load-balancer and started with
```sh
java -jar cf-nat-3.2.0.jar :5784 <host>:15784 <host>:25784 -r
java -jar cf-nat-3.3.0.jar :5784 <host>:15784 <host>:25784 -r
```
To check, if reverse address update is enabled, press `<enter>` on the console of the NAT.
Expand All @@ -818,13 +818,13 @@ When starting the nodes, add `--no-dtls-cluster-backward`.
Node 1
```sh
java -jar target/cf-extplugtest-server-3.2.0.jar --dtls-cluster ":15784;localhost:15884;1" --dtls-cluster-group="localhost:25884" --no-dtls-cluster-backward
java -jar target/cf-extplugtest-server-3.3.0.jar --dtls-cluster ":15784;localhost:15884;1" --dtls-cluster-group="localhost:25884" --no-dtls-cluster-backward
```
Node 2
```sh
java -jar target/cf-extplugtest-server-3.2.0.jar --dtls-cluster ":25784;localhost:15884;2" --dtls-cluster-group="localhost:15884" --no-dtls-cluster-backward
java -jar target/cf-extplugtest-server-3.3.0.jar --dtls-cluster ":25784;localhost:15884;2" --dtls-cluster-group="localhost:15884" --no-dtls-cluster-backward
```
You may try out the benchmark above and `clear` the NAT during execution. The 20% penalty is gone! The cluster adjusts very fast the load-balancers NAT entries with the right address.
Expand Down
10 changes: 5 additions & 5 deletions demo-apps/cf-proxy2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ The ExampleCrossProxy2 demonstrates the functions of the [californium-proxy2](..
Start the proxy:

```sh
java -jar cf-proxy2-3.2.0.jar ExampleCrossProxy2 coap http
java -jar cf-proxy2-3.3.0.jar ExampleCrossProxy2 coap http
```

This starts the example cross-proxy and a co-located coap- and http-destination-server.

Start a example coap-client (same host as proxy):

```sh
java -jar cf-proxy2-3.2.0.jar ExampleProxy2CoapClient
java -jar cf-proxy2-3.3.0.jar ExampleProxy2CoapClient
```

Start a example http-client (same host as proxy):

```sh
java -jar cf-proxy2-3.2.0.jar ExampleProxy2HttpClient
java -jar cf-proxy2-3.3.0.jar ExampleProxy2HttpClient
```

To test other setups requires to edit the examples and build them on your own.
Expand All @@ -33,14 +33,14 @@ To test other setups requires to edit the examples and build them on your own.
Start the proxy:

```sh
java -jar cf-proxy2-3.2.0.jar ExampleSecureProxy2 coaps
java -jar cf-proxy2-3.3.0.jar ExampleSecureProxy2 coaps
```

This starts the example cross-proxy and a co-located coaps-destination-server.

Start a example coaps-client (same host as proxy):

```sh
java -jar cf-proxy2-3.2.0.jar ExampleSecureProxy2CoapClient
java -jar cf-proxy2-3.3.0.jar ExampleSecureProxy2CoapClient
```

Loading

0 comments on commit bb6adaa

Please sign in to comment.