Quantcast
Channel:
Viewing all articles
Browse latest Browse all 43849

Wiki Page: How to run the basic VisiNotify example in a multi-homed environment with remote consumers and suppliers?

$
0
0
Problem: How to run the basic VisiNotify example in a multi-homed environment with remote consumers and suppliers? Resolution: Product Name BES VBE Product Version 6.5 Product Component VisiNotify Platform/OS version JDK/Compiler version: JDK 1.4.2 and above This article is not platform specific. However, the sample commands shown in this article is based on an AIX platform. This article provide details specific to the setting up of VisiNotify in a multihomed environment with remote consumers and suppliers. This article is, in a way, an extension to the Readme file in the /examples/vbe/notify/basic_cpp folder. The last section of this article depicts some test scenarios where VisiNotify is started differently and we capture the different reactions in remote consumers.   Existing solution for VisiNotify Currently, all the available VBE examples for customers to try are based on a single host with the clients/servers residing on the same machine. In this article, we call the clients and servers more aptly as consumers and suppliers. What do we do if we want to start VisiNotify in a multi-homed environment with remote consumers and suppliers in another machine? Starting VisiNotify in a multi-homed environment The way to start VisiNotify on a singly-homed host (i.e. with only one network card) is: $ visinotify & notification service is ready In the singly-homed environment, VisiNotify will bind itself to the IP address of the host. While in a multi-homed environment, there can be more then one network cards, resulting in multiple IP addresses. In this case, if we start VisiNotify without specifying an IP address, VisiNotify will bind itself to the default IP address. The defualt IP address can be found by executing the ifconfig -a command  $ ifconfig -a The first IP address shown in the output of the above command will be the default IP address for VisiNotify. Note that Windows Systems, the command ipconfig -a is used instead. To start VisiNotify on a particular IP address, we have to specify the IP address we want: $ visinotify -Dvbroker.se.iiop_tp.host=100.111.222.333 & This command will start VisiNotify at IP address 100.111.222.333 with 14100 as its default listener port. With this done, we can connect the consumers and suppliers remotely to this VisiNotify service. Connecting remote consumers and suppliers to VisiNotify We can connect consumers and suppliers to a VisiNotify service on a remote machine by entering the IP address on which VisiNotify has been bound to and its port number: $ structPushConsumer -ORBDefaultInitRef corbaloc::100.111.222.333:14100 $ structPushSupplier -ORBDefaultInitRef corbaloc::100.111.222.333:14100 Note that running the consumer and supplier executables on a remote machine does not require additional BES license. The following section will describe the various options available to start VisiNotify and the behavior of the consumers for those scenarios. Special Test Scenarios Say, for example, the multi-homed machine has 2 IP addresses ? IP address A (default) and IP address B. We can start VisiNotify using a default IP address, or specifying an IP address -- either A or B. With this, we come up with the following 3 test scenarios. Test Scenario 1: VisiNotify is started without specifying an IP address $ visinotify & notification service is ready We can connect the consumers and suppliers remotely by specifying either IP address A or B, for example: $ structPushConsumer -ORBDefaultInitRef corbaloc::IP_Address_A:14100 structured push consumer is ready OR $ structPushConsumer -ORBDefaultInitRef corbaloc::IP_Address_B:14100 structured push consumer is ready However, if the VisiNotify service has been explicitly bound to the default IP address A, the remote consumers must also explicitly bind to IP address A in order for the connection to be successful, this is shown in Test Scenario 2. Test Scenario 2: VisiNotify is started using IP address A $ visinotify -Dvbroker.se.iiop_tp.host=IP_Address_A & notification service is ready $ structPushConsumer -ORBDefaultInitRef corbaloc::IP_Address_A:14100 structured push consumer is ready If IP address B is specified for the consumer, a CORBA exception will be thrown: $ structPushConsumer -ORBDefaultInitRef corbaloc::IP_Address_B:14100 caught exception: Exception: CORBA::OBJECT_NOT_EXIST Minor: 1447165953 Completion Status: NO (Test Scenario 3 has a similar behavior with Test Scenario 2. A CORBA exception will be thrown if the consumer has bound to IP address A.) Test Scenario 3: VisiNotify is started using IP address B $ visinotify -Dvbroker.se.iiop_tp.host=IP_Address_B & notification service is ready $ structPushConsumer -ORBDefaultInitRef corbaloc::IP_Address_A:14100 caught exception: Exception: CORBA::OBJECT_NOT_EXIST Minor: 1447165953 Completion Status: NO With the above test scenarios, we can conclude that using the command " VisiNotify & " (without specifying the IP address explicitly) on a multi-homed environment is the most flexible solution for remote consumers and suppliers.   Old KB# 26356

Viewing all articles
Browse latest Browse all 43849

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>