amount of data that is to be transferred through RPC
channels.
4.2 Experiment Results
For the first experiment, we measure the transac-
tion time of SayHello function which is a small re-
quest/small response operation. The total transaction
times of 1000 operations for gRPC and HPRPC are
305 ms and 279 ms, respectively. HPRPC performs
9.3% better than gRPC. This is due to the fact that
Protobuf tags the string parameter in HelloRequest
message while Kodosis does not use tags in serial-
ization. Therefore, total amount of data that is to
be transferred is increased in gRPC as opposed to
HPRPC. In this experiment, we only have a single pa-
rameter in the request and the response messages. We
also examine the performance of the two RPC mech-
anisms when we increase the number of parameters
in a single message. The results of this experiment is
presented in large data tests.
The second experiment measures the performance
of the two RPC mechanisms using Average function
which represents a big request/small response trans-
action. The results of Average operation tests are de-
picted in Figure 9a. In this experiment, clients call the
respective Average functions from RPC servers for
different number of 32-bit integers. When the number
of inputs is 10, HPRPC has 8.5% better performance
than gRPC. The difference between performances in-
crease and gets the highest value, when the input size
increased to 10000. At that point, gRPC’s total trans-
action time is 21.6% higher than HPRPC. The perfor-
mance difference gets even higher when the input size
is beyond 10000. This result gives us a hint about the
improvement of HPRPC when the amount of data is
increased.
In Average function experiments, we only increase
the size of the request message. For completeness,
we also measure performance for increased response
message size. The results of GetRandNums function
experiments are shown in Figure 9b. As expected,
the results of this experiment are similar to the pre-
vious experiment’ results. In this case, the perfor-
mance difference increases even more. When 10 ran-
dom numbers are requested from RPC server, HPRPC
performs 12.9% better than gRPC. The difference in-
creases up to 39.2% when requested random number
count is 10000.
In Average and GetRandNums experiments, Num-
bers message type is employed as request and re-
sponse type, respectively. Numbers data structure
models multiple numbers as a repeated member of
the same type. gRPC and HPRPC both have opti-
mizations on repeated members. In the next experi-
ment, we evaluate the performances of RPC mecha-
nisms when a message type consists of non-repeating
members. In this experiment, we employ different
versions of LargeData message type such as Large-
Data128, LargeData256, etc. The number concate-
nated to LargeData indicates the number of members
in message type. For example, LargeData128 mes-
sage type contains 128 different members of type in-
teger.
SendRcvLargeData experiments employ 7 differ-
ent versions of LargeData message types to evaluate
the performance of RPC mechanisms under the vary-
ing numbers of members in the message. In these
tests, clients call the respective SendRcvLargeData
function from RPC servers, and servers send the same
data back to the clients. The results of this exper-
iment are illustrated in Figure 9c. HPRPC perfor-
mance is nearly 2.7 times better than gRPC when
member count is 128. As the number of members
in message types is increased, the transaction times of
gRPC increase substantially as opposed to HPRPC. In
the extreme case of 8192 number of members, gRPC
consumes approximately 12.5 times more transcation
time than HPRPC. This result clearly indicates that
HPRPC outperforms gRPC with increasing number
of members in RPC messages.
In order to find out why gRPC needs so much
transaction time when the number of members are in-
creased in messages, we further analyze the results
of the SendRcvLargeData experiments. In this anal-
ysis, we compare the transferred data packet sizes of
gRPC and HPRPC. The results of this analysis are de-
picted in Figure 9d. This analysis reveals the fact that
gRPC tends to use more bytes than HPRPC when the
number of members is increased in messages. This is
because of that gRPC employs a unique tag for each
member in messages. The messages are serialized
with these tags, hence the RPC packet sizes are in-
creased. Moreover, as the number of members are
increased, the number of bytes that are used to repre-
sent tag values also increase. Tags are useful in some
cases such as enabling optional parameters, however
tagging each parameter brings extra communication
and processing overhead. Therefore, we conclude that
tagging parameters is not useful for high performance
systems.
HPRPC assumes all parameters in a message as
required, and the order of parameters do not change.
Therefore, RPC messages are serialized and deseri-
alized in the same order, which eliminates the need
for tagging parameters in HPRPC. This assumption
gives HPRPC advantage over other RPC implemen-
tations in high performance systems. This is due to
ICSOFT-EA 2016 - 11th International Conference on Software Engineering and Applications
122