We have received a lot of feedback about using p4app. The theme of most of the feedback is having more control over running a p4app. People are used to using Mininet, and expect the same flexibility from p4app. This was difficult with p4app's previous design, which only exposed a JSON configuration file to the user. If you wanted more functionality, you would have to hack the p4app scripts.
The new version of p4app gives you more control. Instead of writing a JSON manifest file, you write your p4app using a python script, just the way you would use mininet. p4app is now a python library that wraps-up mininet, providing helpers for compiling your P4 program and setting up the topology.
We have received a lot of feedback about using p4app. The theme of most of the feedback is having more control over running a p4app. People are used to using Mininet, and expect the same flexibility from p4app. This was difficult with p4app's previous design, which only exposed a JSON configuration file to the user. If you wanted more functionality, you would have to hack the p4app scripts.
The new version of p4app gives you more control. Instead of writing a JSON manifest file, you write your p4app using a python script, just the way you would use mininet. p4app is now a python library that wraps-up mininet, providing helpers for compiling your P4 program and setting up the topology.
The simplest example is a switch that behaves like a wire: https://github.com/theojepsen/p4app/blob/tj/v2/examples/wire.p4app/main.py
p4app also uses P4Runtime for configuring the switch: https://github.com/theojepsen/p4app/blob/tj/v2/examples/ring.p4app/main.py#L32
Both P4-14 and P4-16 are supported: https://github.com/theojepsen/p4app/blob/tj/v2/examples/compile-only.p4app/main.py
You can run different P4 programs on different switches: https://github.com/theojepsen/p4app/blob/tj/v2/examples/two-programs.p4app/main.py#L24
You can also use P4Runtime to read counters and setup multicast groups: https://github.com/theojepsen/p4app/blob/tj/v2/examples/counter.p4app/main.py#L13 https://github.com/theojepsen/p4app/blob/tj/v2/examples/multicast.p4app/main.py#L44