You need to be thinking in terms of endpoints for the channels. The endpoint is a UDP unicast socket or a multicast group. If unicast then you need to look at the source identity and respond if you do not already know the topology. For multicast you can have conventions on addresses and ports.
Your example is failing because you are using the same channel for both directions. You need one channel for each direction and optionally have multiple streams go down each channel. Try something like: -Daeron.sample.ping.channel=aeron:udp?endpoint=localhost:40123 \ -Daeron.sample.pong.channel=aeron:udp?endpoint=localhost:40124 \ Note the ports are different to give a different endpoint to which the each channel is going. IPC works because it is all the same SHM endpoint. On Wednesday, 29 June 2016 07:44:59 UTC+1, Gazit Gu wrote: > > to confirm the way, i did below test (both udp and ipc works fine): > > java -cp samples.jar \ > -XX:+UnlockDiagnosticVMOptions \ > -XX:GuaranteedSafepointInterval=300000 \ > -XX:BiasedLockingStartupDelay=0 \ > -Dagrona.disable.bounds.checks=true \ > io.aeron.samples.LowLatencyMediaDriver > --With UDP > java -cp samples.jar \ > -XX:+UnlockDiagnosticVMOptions \ > -XX:GuaranteedSafepointInterval=300000 \ > -Dagrona.disable.bounds.checks=true \ > -Daeron.sample.ping.streamId=10 \ > -Daeron.sample.pong.streamId=11 \ > -Daeron.sample.ping.channel=aeron:udp?endpoint=localhost:40123 \ > -Daeron.sample.pong.channel=aeron:udp?endpoint=localhost:40123 \ > io.aeron.samples.Pong > java -cp samples.jar \ > -XX:+UnlockDiagnosticVMOptions \ > -XX:GuaranteedSafepointInterval=300000 \ > -Daeron.sample.messages=100000 \ > -Daeron.sample.messageLength=100 \ > -Dagrona.disable.bounds.checks=true \ > -Daeron.sample.ping.streamId=10 \ > -Daeron.sample.pong.streamId=11 \ > -Daeron.sample.ping.channel=aeron:udp?endpoint=localhost:40123 \ > -Daeron.sample.pong.channel=aeron:udp?endpoint=localhost:40123 \ > io.aeron.samples.Ping > --With IPC > java -cp samples.jar \ > -XX:+UnlockDiagnosticVMOptions \ > -XX:GuaranteedSafepointInterval=300000 \ > -Dagrona.disable.bounds.checks=true \ > -Daeron.sample.ping.streamId=10 \ > -Daeron.sample.pong.streamId=11 \ > -Daeron.sample.ping.channel=aeron:ipc \ > -Daeron.sample.pong.channel=aeron:ipc \ > io.aeron.samples.Pong > java -cp samples.jar \ > -XX:+UnlockDiagnosticVMOptions \ > -XX:GuaranteedSafepointInterval=300000 \ > -Daeron.sample.messages=100000 \ > -Daeron.sample.messageLength=100 \ > -Dagrona.disable.bounds.checks=true \ > -Daeron.sample.ping.streamId=10 \ > -Daeron.sample.pong.streamId=11 \ > -Daeron.sample.ping.channel=aeron:ipc \ > -Daeron.sample.pong.channel=aeron:ipc \ > io.aeron.samples.Ping > > and the IPC latency max 25us while 99.84%<5us (without any os parameter > trunig). > > but when i run two ping process with one pong using udp, seems two ping > processes cannot distinguish each other, any advise on this?(something > like more client want their own response) > > Thanks again. > > -Gazit > -- You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
