Remote Space Invocation

With TIBCO ActiveSpaces 2.0.0, the Java API and the .NET API allow applications to remotely invoke code execution over the space to other members.

For a method in a class to be able to be invoked remotely, it needs to fulfill two criteria:

  • The method needs to implement one of the two invocable interfaces: Invocable or MemberInvocable
  • The class needs to be present in all of the members’ CLASSPATHs (or preregistered for C applications)

The remote invocation can then be triggered by any space member using either a single member invocation calls invoke, which will invoke the method on the node seeding the key passed as an argument); or invokeMember, which will invoke the method on the member listed in the argument.

In addition, a parallel distributed invocation of the method on multiple space members can be triggered using the calls invokeMembers (which invokes it on all of the space's members, regardless of role), and invokeSeeders (which invokes it on all of the space's seeders).

Note: You can very easily create distributed processing of data stored in ActiveSpaces leveraging in-process “data locality” by invoking a class on all the seeders of a space where the invoked class creates browsers of distribution scope “seeded.” This means that each seeding process can iterate at very high speed (in-process latency, memory bus bandwidth) through it's subset of the data, like a “map” in a map/reduce processing architecture, and either store the updated tuples back in the space (still a local operation) or return the results back to the invoker in the result tuple (or store them in another space) where they can be 'reduced'.

Remote invocation in ActiveSpaces is completely cross-platform. The class name is what is used to identify what is going to be invoked. This means that you could have applications in one platform invoke classes implemented in another platform. You could even have a mix and match of platforms implementing the same class on a space, as long as the class names match (and of course as long as they expect the same kind of tuples as context and return).

Related reference