Blog

iTools® Groups Hub&Proxy

From version 3.5.2.2 iTools® implements two new components which are useful for the realization of distributed applications; with them it is possible to declare objects, such as Variables, and use them in other applications present on the network.

The two new components are:

With this system it’s clear it’s possible to create one or more server applications and several applications distributed on the network that share variables, but the purposes can be manifold; for example it is possible to declare iTools® variables in a 64bit application and use them in another 32bit application for compilation or compatibility needs. Another example is to create visual applications for Windows services that use iTools® variables, as a matter of fact it is quite complex to share data between services and visual applications.

GroupsHub

The GroupsHub component allows you to publish all the Groups and Variables collected by a Groups component and has the following properties:

If the configuration file is not used and the selected binding is NetTcp, the address of the service to connect to to obtain the groups, the variables and the information contained therein, could be:

net.tcp://localhost:17005/groupshub.svc/groupshubservice/

GroupsProxy

The GroupsProxy allows a network application to connect to a GroupsHub and receive information about the groups and variables that this application publishes, through this object it is therefore possible to request information about the variables, automatically declare them also in the network application and use them for the implementation of the required logic.

GroupsProxy has the following properties:

If the GroupsProxy is used in a WinForms application, a special editor is available that allows the component to request the list of groups and their variables at design-time, then declare them so that they can also be used at the design time.

Otherwise if the variables are imported through the WinForms editor it is important that the LoadVariables property is set to “false”, otherwise the GroupsProxy component would be requested again at the start of the GroupsProxy component with the consequent probable loss of synchronization between the hub and proxy variables.

As you can see from the image above, selecting the GroupsProxy component, a “Load groups” action appears in the properties window which allows the user to check the variables published by the GroupsHub and import them through a special window to which the user must affirm confirmation:

In this example we are going to create a variable publishing server:

Quindi implementiamo un’applicazione console (Proxy) che sfrutta le variabili definite nell’applicazione server (Hub):

IToolSGroupsProxy.zip

Leave a Reply

Your email address will not be published. Required fields are marked *

nine − three =