Fine Granularity Multiplexing

In this case study, we built a proof-of-concept scenario to demonstrate the benefit of BeeCluster's flexibile virtual drone API.

We create three fake applications with different drone-binding relationships.

The first application mimics the package delivery task. It needs to pick up a package at location A and drop it at location F. The task requires the same drone to do the pickup and dropoff but the task is interruptible.

The second application takes two photos at two locations B and E. The two photos can be taken in any order (implemented with the newTask primitive).

The third application task record a video from location C to D. The task requires the same drone to record and the task is not interruptible.

We show the code of these three applications below. We highlight the code which determines the virtual drone to physical drone mappings.

Application-1

import beecluster
def foo(bc):
bc.act("flyto", locA)
bc.act("pickup_package")
bc.act("flyto", locB)
bc.act("drop_package")
bc.wait()
if __name__=="__main__":
with beecluster.Session(appID="app1") as bc:
bc.newTask(foo, bc, NonInterruptible = False, SameDrone = True).wait()

Application-2

import beecluster
def foo(bc, loc):
bc.act("flyto", loc)
photo = bc.act("take_photo").val
return photo
if __name__=="__main__":
with beecluster.Session(appID="app3") as bc:
h1 = bc.newTask(foo, bc, locB)
h2 = bc.newTask(foo, bc, locE)
photo_at_locB = h1.val
photo_at_locE = h2.val

Application-3

import beecluster
def foo(bc):
bc.act("flyto", locC)
bc.act("start_video_recording")
bc.act("flyto", locD)
bc.act("stop_video_recording")
bc.wait()
if __name__=="__main__":
with beecluster.Session(appID="app3") as bc:
bc.newTask(foo, bc, NonInterruptible = True, SameDrone = True).wait()

Fine Granularity Multiplexing

When the mappings between virtual drone and physical drone are defined in a precise way, the scheduler can use this detailed information to achieve action-level multiplexing.

In the experiment, We fix the locations A and F and randomly generate the other four locations.

We show the traces of the drone with and without BeeCluster' precise drone binding relationship definition below.

BeeCluster can multiplex application 1 with other tasks; once the drone picks up the package at location A, it doesn't need to send the package to location F immediately, instead, the drone can still conduct other tasks along the way to location F.