Fog computing is a promising architecture to
provide economical and low latency data services for future
Internet of Things (IoT)-based network systems. Fog computing
relies on a set of low-power fog nodes (FNs) that are located
close to the end users to offload the services originally targeting
at cloud data centers. In this paper, we consider a specific
fog computing network consisting of a set of data service operators
(DSOs) each of which controls a set of FNs to provide the
required data service to a set of data service subscribers (DSSs).
How to allocate the limited computing resources of FNs to all
the DSSs to achieve an optimal and stable performance is an
important problem. Therefore, we propose a joint optimization
framework for all FNs, DSOs, and DSSs to achieve the optimal
resource allocation schemes in a distributed fashion. In the
framework, we first formulate a Stackelberg game to analyze
the pricing problem for the DSOs as well as the resource allocation
problem for the DSSs. Under the scenarios that the DSOs
can know the expected amount of resource purchased by the
DSSs, a many-to-many matching game is applied to investigate
the pairing problem between DSOs and FNs. Finally, within the
same DSO, we apply another layer of many-to-many matching
between each of the paired FNs and serving DSSs to solve
the FN-DSS pairing problem. Simulation results show that our
proposed framework can significantly improve the performance
of the IoT-based network systems