This is a list of frequently asked questions about Vortex Cafe which should help you resolve any issues you may be having when using the product.
Vortex Cafe compatabilities
Which Java versions are supported by Vortex Cafe?
Vortex Café supports Java 5 and any further version.
Vortex Cafe Tuning
How should I configure Vortex Café for small devices (i.e. with constrained resources) ?
On devices with low memory and limited CPU, Vortex Café will give better results if configured to lower its memory usage and to use less number of threads. Here is an example of such configuration:
ddsi.network.receiver.udp.buffer.size=< size-of-biggestsample + 128 >
ddsi.network.receiver.anyMessageAsSPDP=true
ddsi.network.receiver.udp.threadPool.size=1
ddsi.network.receiver.tcp.threadPool.size=1
ddsi.discovery.participant.leaseDuration=
ddsi.discovery.participant.advertisePeriod=<leaseDuration/3>
Where:
- <size-of-biggestsample + 128 > is the serialized size of the biggest data your application could publish, plus 128 bytes. The serialized size of your data is usually a few bigger than the size of your data in memory, because of padding.
- <maximum acceptable duration> is the maximum period during which your application might not publish any data. If your application doesn’t send any message during this period, the remote Participant will consider your application as terminated.
- <leaseDuration/3> is the same value than above (maximum acceptable duration) divided by 3. Thus, 3 messages will be send during this duration, avoiding remote Participant to consider your application as terminated.
You should also configure your JVM to lower its memory usage. For instance on a Raspberry Pi 2 (1GB RAM) with the Oracle’s Java, use the following options:
-Xms256m -Xmx512m
On a Raspberry Pi model B (512MB RAM) rather use:
-Xms256m -Xmx256m
Vortex Cafe Connectivity
How should I configure Vortex Café in a multihomed environment (several network interfaces) ?
Vortex Café can only use a single network interface at a time. It will, by default automatically select a network interface among available ones. But it is often useful to explicitely select the interface out of which you want Café to communicate. This can be done easily with the following option:
ddsi.network.interface=<iface|ip-address>
Below are some examples:
ddsi.network.interface=en1
ddsi.network.interface=192.168.1.101
How to increase TCP/IP Connection Migration reactivity ?
Café automatically migrates connections across available interface when network connectivity changes. For instance, if a mobile applications is communicating via WiFi and then loses WiFi having as only option a 3G network, then Café will automatically switch to 3G. The reactivity of the switch depends on the following settings:
ddsi.discovery.participant.advertisePeriod=
ddsi.discovery.participant.leaseDuration=
The duration is expressed in seconds, as shown below:
ddsi.discovery.participant.advertisePeriod=2.5
ddsi.discovery.participant.leaseDuration=10
Why do I have UDP communication problems on an Android device ?
If you experience communication issues with Vortex Café configured with UDP on an Android device, such as DataReader not receiving data, or duration leases expiration despite no Participant has been stopped, those are probably caused by loss of UDP multicast packets. Loosing packets could lead to false lease expiration of the duration lease for a remote participant, and to the un-matching of Readers/Writers (and thus to loss of DDS communications). The cause of packets loss are usually a bad support of UDP multicast by the Android device or by the WiFi router. In such case, you should configure Vortex Café on Android to limit it’s UDP multicast usage with such option:
ddsi.discovery.udp.allowMulticast=minimal
Why do I have UDP communication problems on WiFi ?
As described in https://tools.ietf.org/id/draft-mcbride-mboned-wifi-mcast-problem-statement-00.html there are known issues with IP multicast in a WiFi 802.11 environment, leading to UDP multicast packets loss. The same document advises to use 802.11n (minimum) to help providing a more reliable and higher level of signal-to-noise ratio in a wifi environment over which multicast packets can be sent. However, if you still experience communication issues (DataReader not receiving data, or duration leases expiration despite no Participant has been stopped), you should configure Vortex Café on Android to limit it’s UDP multicast usage with such option:
ddsi.discovery.udp.allowMulticast=minimal
Vortex Cafe Android
Which Android API versions are supported by Vortex Café ?
Vortex Café is a pure Java library, independent of any Android API. Consequently, it can be used with any level of Android API.
How can I get verbose logs in LogCat of Android monitor ?
The default level of tags is INFO. You can change the default level by setting a system property: setprop log.tag. Where level is either VERBOSE, DEBUG, INFO, WARN, ERROR, ASSERT, or SUPPRESS. SUPPRESS will turn off all logging for your tag.
Example: adb shell setprop log.tag DEBUG