Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Set status to Completed

...

IDIEP-46
Author
Sponsor
Created

 

Status

Status
colourGreen
titleDRAFTCOMPLETED


Table of Contents

Motivation

...

Request
StringService name
byte

Flags:

0x01 Keep binary flag

0x02 "Has parameter types" flag (see "service name resolve logic")

longTimeout
intCount of nodes selected to invoke service. If this value is 0, no server nodes should be explicitly listed in the message, but all server cluster nodes should be selected. 
UUID * count

Node IDs

StringMethod name
int[]Argument count
(int? + Object) * countArgument type IDs to resolve method (optional, can be NULL, see "service name resolve logic")  
intArgument count
Object * countif "has parameter types" flag is set) + Arguments


Response
ObjectResult

...

There 20 benchmarks totally were made (10 with the one-operation approach and 10 with the two-operations approach).

Results:

tps 1, op/sec, AVGlatency 1, nsec, AVGtps 2, op/sec, AVGlatency 2, nsec, AVGdelta tpsdelta latency
390113262510339393026002880,98%-0,95%
38330726715313708312762661-3,25%3,41%
378431270638138254026787671,09%-1,02%
372316275031437788427113881,50%-1,42%
38325826729523807902689943-0,64%0,64%
381941268163939800625734714,21%-4,03%
378778270399937997126953590,31%-0,32%
374484273575838026026948531,54%-1,50%
37953526983153750982731863-1,17%1,24%
37419627370323730182746522-0,31%0,35%

Conclusion: there is almost no difference between the one-operation approach and the two-operations approach (about 1% on average), so there is no reason to implement two-operations approach. Single-operation approach should be implemented as more convenient from the user's point of view.

...

To solve this problem we can pass additional information (parameter types) optionally instead of just method name. If parameter types are passed - method should be resolved using this information, if NULL is passed as parameter types are not passed method should be resolved using argument values (the same way as PlatformServices.ServiceProxyHolder#getMethod).

Parameter types it's an array of binary type IDsTo pass parameter types "has parameter types" flag of the request should be set. In this case, each argument is prefixed by int value - argument's binary type ID.

Client-side API (java thin client)

...