[Haskell-cafe] GSoC Push Notifications project - communicating with mobile devices

Kristopher Micinski krismicinski at gmail.com
Mon Apr 29 23:45:08 CEST 2013


On Mon, Apr 29, 2013 at 4:46 PM, Marcos Pividori
<marcospividori at 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



More information about the Haskell-Cafe mailing list