Jon

To keep the app alive, in your "Long Life Service object", have it do 1 XML "Are you alive request" to itself (same web site, some ashx link) every "x" minutes, that should work?

Shawn


On 5/13/2011 12:13 PM, Jon Dick wrote:
The only reason the long lived ASP.NET <http://ASP.NET> application is important is if you are sending a lot of notifications frequently, you need to maintain the same TCP connection to apple's push notification servers. You wouldn't want to be creating a new connection for each message.

In practice, you would probably be fine with creating a global instance of the library's NotificationService object in your Global.asax... Realistically that instance should be ok until the app pool is restarted, which I don't think would happen terribly often if there is a lot of activity.

I'm not familiar with Manos de Mono... The only reason I would suggest you could rig up asp.net <http://asp.net> to be long lived and make this work, is if you wanted to do hosting really cheaply (eg: a shared hosting provider where you can't run custom executables). There's of course nothing stopping you from making a nice .net service using this library directly (which is exactly what I do).

It would be interesting though to see if you could make a similar application work over ASP.NET <http://ASP.NET>. In my case, my server application has to monitor a bunch of IMAP connections, without the users necessarily contacting the web service subsequent times. So for me the challenge would be making sure my asp.net <http://asp.net> app stays alive with nobody hitting pages on it.

---
Jon (aka Redth)
http://redth.info



On Fri, May 13, 2011 at 11:38 AM, ChrisNTR <[email protected] <mailto:[email protected]>> wrote:

    Would you be able to use something like Manos de Mono to do this
    sort of thing - if the long lived ASP.NET <http://ASP.NET>
    application was the important part? http://manosdemono.org/

    ChrisNTR


    On Fri, May 13, 2011 at 2:55 PM, Jon Dick <[email protected]
    <mailto:[email protected]>> wrote:

        I run my own server using my APNS-Sharp library.

        There should technically even be a way to get it working via
        asp.net <http://asp.net>, but that involves some techniques to
        keep the asp.net <http://asp.net> application long lived.

        Depending on your situation, a service like Urban Airship may
        be preferable (if you don't send out a lot of messages).
         Basically I look at pricing.  I can easily run my own VPS for
        $20/month.  That equates to 8000 push notifications with urban
        airship.  My one app sends out about 10,000 notifications per
        day, so price wise, Urban Airship is way too expensive for me.

        ---
        Jon (aka Redth)



        On Fri, May 13, 2011 at 9:01 AM, atmuc <[email protected]
        <mailto:[email protected]>> wrote:

            what server do you use except urban airship?

            --
            View this message in context:
            
http://monotouch.2284126.n4.nabble.com/Push-notifications-with-mono-touch-tp3519905p3520141.html
            Sent from the MonoTouch mailing list archive at Nabble.com.
            _______________________________________________
            MonoTouch mailing list
            [email protected] <mailto:[email protected]>
            http://lists.ximian.com/mailman/listinfo/monotouch



        _______________________________________________
        MonoTouch mailing list
        [email protected] <mailto:[email protected]>
        http://lists.ximian.com/mailman/listinfo/monotouch




-- ChrisNTR
    Microsoft ASPInsider
    http://weblogs.asp.net/chrishardy
    http://twitter.com/chrisntr



_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to