QoS

The goal in this article is to validate the claim that Push Framework is able to provide different priorities and quotas for each broadcasting channel. This QoS feature is explained in the Developer Guide page (see the Broadcasting data paragraph).

For that goal, a new client-server application will be developed. The Push Framework – based server will setup a number of broadcasting channels having different priorities/quotas attributes and constantly fills them with packets. At the client side, we collect the received packets and try report statistics.

The protocol to use for the demo is really simple : we just need to record the broadcasting channel each incoming packet is belonging to. An extra payload of 8K is however added in order to put our selves in a realistic application protocol.

Broadcasting channels (broadcasting group) are setup before the call to Server::start :

server.getBroadcastManager()->createChannel(broadcastId, 100, false, uPriority, uQuota);
server.start();

For each broadcasting group, a new thread is spawn to push packets into it. You can examine the code details in the following package, let’s concentrate on results here.

There are 4 scenarios to be tested. You can activate each scenario by changing the particular subclass of Scenario to be used within the main function of the server project :

First scenario

Here we have two broadcasting groups, with same priority and same quotas. When we tape “q” in the client console in order to stop the connection, we report :


So this is about the same share of packets.

Second scenario

In this case, there are 4 broadcasting groups :

1 => { priority = 10, quota = 10 }

2 => { priority = 5, quota = 10 }

3 => { priority = 5, quota = 20}

4 => { priority = 5, quota = 5}

When a Send operation completes, Push Framework will look at the packets queue of the first broadcasting group in order to trigger another Send operation. And as expected, here’s the client-side report :

Third scenario

Each broadcasting channels has the same priority :

1 => { priority = 5, quota = 10 }

2 => { priority = 5, quota = 20}

3 => { priority = 5, quota = 5}

Hence, we can see the effect of the qota parameter in the following result :

Share
Create PDF    Send article as PDF