There are two advantages as far I know, here they are:
First: Snap packages can bring their own dependencies with them. So no dependency hell.
Second: Snap packages can be installed for one user only. So more control of who is running that software.
Some quotes (including source links):
Snaps are isolated from one ...
According to developer.ubuntu.com, there are basically two purposes:
- Declare hardware capabilities to the system
Quoting from Ubuntu Documentation:
The gadget snap is responsible for defining and manipulating the system properties which are specific to one or more devices that will usually look similar to one another from an implementation perspective. ...
From sensors you can register a listener to sensor events  and on every value you send it to a ByteArrayWriter/Listener pair over socket connection .
Socket needs only WLAN from the gateway, the rest of it is java code .
Complete solution needs some coding effort with the building blocks I gave.
Not sure if you found the answer you were looking for, but thought I'd actually sign up and give you some pointers since I've just been down this path myself.
The tool you need is 'dcc.cctk' which can be used to view and change the mode of each GPIO.
For example, the following command would show the current mode of GPIO0