Re: [Haskell-cafe] GSoC Push Notifications project - communicating with mobile devices
I'm not sure if I understand what you want to do.. Am I correct in thinking that you are looking to provide a Haskell API to interface with these push notification services, so that (e.g.,) a Yesod app could send push notifications to a mobile device? I have a good amount of experience working with Android hacking and know stuff about GCM (formerly the now-deprecated C2DM): I would be willing to (informally) advise you of the details on that side for your project, should this be accepted. Most of the time power efficient means that there are as few things as possible on the device which retain a persistent connection to the server. This is why GCM wins: there's only one app which does the heavy lifting of maintaining frequent contact with the remote server. You might also look at Parse (recently acquired by Facebook), which provides a similar service with a little more flexibility. Unfortunately, I'm not sure how much work this involves, and I'm not certain it is enough to constitue a GSoC projecl. To give you some idea: the corresponding Ruby gem (http://rubygems.org/gems/gcm) is *extremely* small, though it uses metaprogramming on the Ruby side. The thing that makes these APIs simple to write is that implementing GCM is literally just as easy as writing think wrapper around a JSON API provided by Google. I've also never used APNS, but it's corresponding gem looks extremely similar and involves similar techniques. So I don't think this is a bad project, but I think the time estimates may be unrealistic: I would estimate that it should take you around 1 week to get an API for GCM (for example), most of that time would be studying how to do JSON communication with the server (presumably using conduit). One thing you haven't mentioned is this: once you send a push notification to a device, it sometimes calls you back by making a HTTP request to your server. I'm not sure if this code really constitutes as boilerplate or not: maybe it does. I would suggest also adding to your schedule writing up a Yesod app which has back and forth communication with a device, seeing what common problems pop up, and then writing an API for handling *that* as well. (That may broaden the scope of your project enough.) Kris On Sun, Apr 28, 2013 at 5:41 PM, Marcos Pividori marcospivid...@gmail.com wrote: Sorry, I am resending this email because I didn't write a correct title before. --- Greetings, I am a Computer Science student from Argentina. I am interested in working this summer in a project related to Haskell for the Google Summer of Code. I have been discussing my idea with Michael Snoyman in order to have a clearer idea. Now, I would like to know the community interest in this project. I want to develop a server-side library in Haskell for sending push notifications to devices running different OS, such as Android, iOS, Windows Phone, BlackBerry, and so on. To pass a subject, I have recently worked with Yesod (a Web Framework based in Haskell) developing a server to comunicate with Android-powered devices through Google Cloud Messaging. (It is available: https://github.com/MarcosPividori/Yesod-server-for-GCM ) To develop this project, I have read a lot about this service and Yesod libraries, and I developed two programs, a server written in Haskell and an Android application for mobile phones. Also, I developed an EDSL to write programs which exchange information with the devices. I would be grateful if you could give me your opinion about this project and the proposal I am starting to write. Proposal GSoC 2013: Abstract The aim of this project is to develop a server-side library in Haskell for sending push notifications to devices running different OS, such as Android, iOS, Windows Phone, BlackBerry, and so on. The fact is that every company is developing Push Notification services, and these are very similar. Then, I want to find the fundamental concepts to construct a library which enable to configure the options for the different services and send messages easily. When I say they are very similar, I refer to the fact that they all are asynchronous, best-effort services that offers third-party developers a channel to send data to apps from a cloud service in a power-efficient manner. The most popular are: - Google Cloud Messaging (Android) - Apple Push Notification Service (iPhone / iPad) - Microsoft Push Notification Service (Windows Phone) - BlackBerry Push Service (BlackBerry) - Windows Push Notification Services (Windows 8) - etc. Motivation and expected benefits I think my idea would be very useful because it will allow all Haskell developers to open to a new world of mobile devices and to build useful programs/services that interact with them. Pushing data to smartphones provides users with instant access to desired updates as they happen, such as news and weather, sports scores, stock prices and other time-sensitive
Re: [Haskell-cafe] GSoC Push Notifications project - communicating with mobile devices
On Mon, Apr 29, 2013 at 4:46 PM, Marcos Pividori marcospivid...@gmail.com wrote: Hi, thanks for your response! this really help me. * About the code in Spanish: I will replace it for an English version in the next weeks. As Michael said, I had to write it in Spanish because it was a project for my university. Sorry, I know it is not clear now. No worries, I don't think this makes it bad, just harder to read for English speakers * Kristopher, thanks for your comments and availability. Yes, I am looking to provide a Haskell API to interface with these different push notification services. I know that maybe it isn't enough to fill up a summer, so I will get into account this ideas you gave me. I am thinking about some useful tools I could provide to people programming for mobile devices. I would also be interested in hearing about what you come up with. I have a lot of experience with mobile hacking, and I'd be glad to help you validate ideas as they come to you, or point you at related material. I would suggest also adding to your schedule writing up a Yesod app which has back and forth communication with a device, seeing what common problems pop up, and then writing an API for handling *that* as well. (That may broaden the scope of your project enough.) I created this back and forth communication for the project I mentioned before. But, a lot of things could be improved. For example, about mantaining a state of the connection and being able to manage with a lot of devices at the same time. (As I implemented this, I think it wont work really well with a lot of devices). And I could develop a demo app for each OS (Android, iOS, Windows Phone, etc) to manage this communication. I 'll continue investigating, every contribution is welcome! The key aspects are to use Haskell to write as little as boilerplate code as possible. Then identify the common elements of the API for each and write a common API. That strikes me as the simple part. I'm not sure if it's sensible or not, but maybe it would be possible to formalize this back and forth computation using something similar to session types. Maybe next steps would be to automatically take the types in the program and generate a contract for the JSON sent between the device and server, which might give you some fun experience in type level programming. This is very hand wavy, so I'm not sure if that's realistic or not... Kris ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] GSoC Push Notifications project - communicating with mobile devices
Sorry, I am resending this email because I didn't write a correct title before. --- Greetings, I am a Computer Science student from Argentina. I am interested in working this summer in a project related to Haskell for the Google Summer of Code. I have been discussing my idea with Michael Snoyman in order to have a clearer idea. Now, I would like to know the community interest in this project. I want to develop a server-side library in Haskell for sending push notifications to devices running different OS, such as Android, iOS, Windows Phone, BlackBerry, and so on. To pass a subject, I have recently worked with Yesod (a Web Framework based in Haskell) developing a server to comunicate with Android-powered devices through Google Cloud Messaging. (It is available: https://github.com/MarcosPividori/Yesod-server-for-GCM ) To develop this project, I have read a lot about this service and Yesod libraries, and I developed two programs, a server written in Haskell and an Android application for mobile phones. Also, I developed an EDSL to write programs which exchange information with the devices. I would be grateful if you could give me your opinion about this project and the proposal I am starting to write. *Proposal GSoC 2013:* *Abstract* The aim of this project is to develop a server-side library in Haskell for sending push notifications to devices running different OS, such as Android, iOS, Windows Phone, BlackBerry, and so on. The fact is that every company is developing Push Notification services, and these are very similar. Then, I want to find the fundamental concepts to construct a library which enable to configure the options for the different services and send messages easily. When I say they are very similar, I refer to the fact that they all are asynchronous, best-effort services that offers third-party developers a channel to send data to apps from a cloud service in a power-efficient manner. The most popular are: - Google Cloud Messaging (Android) - Apple Push Notification Service (iPhone / iPad) - Microsoft Push Notification Service (Windows Phone) - BlackBerry Push Service (BlackBerry) - Windows Push Notification Services (Windows 8) - etc. *Motivation and expected benefits* I think my idea would be very useful because it will allow all Haskell developers to open to a new world of mobile devices and to build useful programs/services that interact with them. Pushing data to smartphones provides users with instant access to desired updates as they happen, such as news and weather, sports scores, stock prices and other time-sensitive content. The push services provide an efficient way to quickly push timely information updates to many smartphones at once, in a centrally managed and controlled manner. Generally, you can also be very selective in who you send information to, including individual customers or many customers (multicast). This services minimizes the impact on the smartphones battery life. Instead of actively checking for new data, the applications can remain closed. Once the data is delivered, the application can be launched in the background to process it as needed. This processes offer an alternative to other less efficient methods, such as polling, where a device regularly polls an application server to see if new content is available. The main differences between the services, refer to details as: the maxim payload length, the quality of service, queueing the messages or not, and the time limit for this, the way the messages are handled in the devices, etc. As all the libraries to access to these services are developed in Java, I thought that it would be a good idea to offer an option to Haskell programmers. Taking advantage of the similarity of these services, I could develop a very adaptable library which fits the necessities for each one and at the same time offer an abstraction to the user. *Deliverables.* * An API library to build and send messages including: - GCM and a demo Android app. - APN and a demo iOS app. - Microsoft Push Notification Service (Windows Phone) and a demo app. - Documentation for all the code developed. Including the explantation on how to use the server library and how to try the demo apps. * A demo server taking advantage of this libraries to communicate with the demo apps through push notifications. * Optionally: (Only in the case that I finalize the rest of the objectives before the deadline) - API for communication through BlackBerry Push Service (BlackBerry). - API for communication through Windows Push Notification Services (Windows 8). *Technical Considerations* I have to complete this *Timeline* May 27: (Accepted students announced) - 'Community Bonding Period' (~1 month) + Get to know mentor(s). + Refine this proposal with mentor(s). + Set up svn accounts. + Set up a wiki page or blog for this project. + Make sure that everything is ready for coding. + Try to