"Push notifications" backend in Lift?

102 views
Skip to first unread message

Michał Rus

unread,
Oct 10, 2013, 10:45:33 PM10/10/13
to lif...@googlegroups.com
Hi again,

what will be the most Lifty way of implementing backend for so called "push notifications" for iOS/Android? Generally this is long polling, as in Comet. The mobile device keeps a connection to the server in a background task/service.

Also: should I implement some sort of a "ping" message to check if the link is still up at a time when there's no data being sent?

Great thanks for all suggestions,
m.

Diego Medina

unread,
Oct 10, 2013, 11:01:49 PM10/10/13
to Lift
Hi,

Yes, you would use long pool hitting a rest api on the Lift side, and there you can use the async response, so that the http thread can serve other requests while there is no data coming in. You would have to also have logic to reconnect after a timeout, pretty much what the js code fro the client side does for comet requests.

Thanks

  Diego 


--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Diego Medina
Lift/Scala consultant
di...@fmpwizard.com
http://fmpwizard.telegr.am

Michał Rus

unread,
Oct 13, 2013, 5:21:52 AM10/13/13
to lif...@googlegroups.com
Diego,

thank you, just as I though. :)

Greetings,
m.

Franz Bettag

unread,
Oct 13, 2013, 10:45:25 AM10/13/13
to lif...@googlegroups.com
Hey Michal,

if you need a scala-only APN client, just ours from wasted.io (based on netty4)
https://github.com/wasted/scala-util/blob/master/src/main/scala/io/wasted/util/apn/APN.scala

GCM to follow quite soon. :)

best regards

Franz

Lift Committer and Director of R&D

Michał Rus

unread,
Oct 13, 2013, 10:53:00 AM10/13/13
to lif...@googlegroups.com
Hi, Franz,

thanks a lot! I've bookmarked the code. (Still, whether APN/GCM are to be used at all is not yet decided).

Thanks,
m.
Reply all
Reply to author
Forward
0 new messages