Server-side GCM implementation (incomplete, untested)