Pharo for PWAs and Web Push Notifications

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Pharo for PWAs and Web Push Notifications

Rafael Luque
Hi all,

I'm interested in developing progressive web applications (PWA) [1] in Pharo, so I'd like to know if anyone has been involved in such kind of task before and could share his experiences.

At first sight, I was thinking in trying PharoJS [2] to build abstractions in Pharo for each PWA's client-side concept like Service Workers, Cache API, IndexedDB API, appshell architecture, etc.

By the other hand, one of the more appealing features of PWAs is the web push notifications capability. To be able to send push notifications from a Pharo server I will also need an implementation of the Web Push Protocol [3] and the VAPID spec [4]. Do you know any previous related work in Pharo or should I think in my own implementation?

Thank you!

Reply | Threaded
Open this post in threaded view
|

Re: Pharo for PWAs and Web Push Notifications

Tim Mackinnon
Have you also looked at Willow - https://link.medium.com/Iyj4qo2BfR?

It has spa ‘s in mind - although I’m not sure of the pro’s/cons vs Pharo js which also looks good too.

Would be interested in what you decide.

Tim

Sent from my iPhone

On 23 Oct 2018, at 19:02, Rafael Luque <[hidden email]> wrote:

Hi all,

I'm interested in developing progressive web applications (PWA) [1] in Pharo, so I'd like to know if anyone has been involved in such kind of task before and could share his experiences.

At first sight, I was thinking in trying PharoJS [2] to build abstractions in Pharo for each PWA's client-side concept like Service Workers, Cache API, IndexedDB API, appshell architecture, etc.

By the other hand, one of the more appealing features of PWAs is the web push notifications capability. To be able to send push notifications from a Pharo server I will also need an implementation of the Web Push Protocol [3] and the VAPID spec [4]. Do you know any previous related work in Pharo or should I think in my own implementation?

Thank you!

Reply | Threaded
Open this post in threaded view
|

Re: Pharo for PWAs and Web Push Notifications

Sven Van Caekenberghe-2
In reply to this post by Rafael Luque
Rafael,

> On 23 Oct 2018, at 11:32, Rafael Luque <[hidden email]> wrote:
>
> By the other hand, one of the more appealing features of PWAs is the web push notifications capability. To be able to send push notifications from a Pharo server I will also need an implementation of the Web Push Protocol [3] and the VAPID spec [4]. Do you know any previous related work in Pharo or should I think in my own implementation?

The two protocols you mention are based on HTTP/2, which we do not (yet) have.
We do have WebSockets in Zinc, which might help in understanding the issues at hand.

Sven
Reply | Threaded
Open this post in threaded view
|

Re: Pharo for PWAs and Web Push Notifications

philippeback
In reply to this post by Rafael Luque


On Tue, Oct 23, 2018 at 11:32 AM Rafael Luque <[hidden email]> wrote:
Hi all,

I'm interested in developing progressive web applications (PWA) [1] in Pharo, so I'd like to know if anyone has been involved in such kind of task before and could share his experiences.

The best thing I used for such stuff in terms of effort/results is using Firebase.


Why? Because it provides a ton of the mechanisms for what you ask below, works well, handles a ton of periphrenalia that I really do not want to deal with directly.

The good bit is that the frontend piece (the actual PWA) can be written in any way you want provided that at the end there is some JS code handling the UI.

Services can be provided as cloud functions of Google Cloud and nothing prevents them from being in Pharo.

In the Firebase SDK, there is a command line tool that provides for local execution of the generated JS and one can then push that code to the server side.
Integration with Google general push notification system is easy to implement as well.

Costs of operation are quite low, even for pushing to large user bases.

There is of course the "database" component (the actual "Firebase") that is key/value pair system, along with read/write policies (which can be quite complexand support quite a number of situations very well, provided the schema is well done) and if what one needs is a relational DB, this is not really the same thing.

So, that's how I would do PWAs, they work nicely using that very stack.

Phil


At first sight, I was thinking in trying PharoJS [2] to build abstractions in Pharo for each PWA's client-side concept like Service Workers, Cache API, IndexedDB API, appshell architecture, etc.

By the other hand, one of the more appealing features of PWAs is the web push notifications capability. To be able to send push notifications from a Pharo server I will also need an implementation of the Web Push Protocol [3] and the VAPID spec [4]. Do you know any previous related work in Pharo or should I think in my own implementation?

Thank you!

Reply | Threaded
Open this post in threaded view
|

Re: Pharo for PWAs and Web Push Notifications

philippeback
In reply to this post by Rafael Luque

On Tue, Oct 23, 2018 at 11:32 AM Rafael Luque <[hidden email]> wrote:
Hi all,

I'm interested in developing progressive web applications (PWA) [1] in Pharo, so I'd like to know if anyone has been involved in such kind of task before and could share his experiences.

At first sight, I was thinking in trying PharoJS [2] to build abstractions in Pharo for each PWA's client-side concept like Service Workers, Cache API, IndexedDB API, appshell architecture, etc.

By the other hand, one of the more appealing features of PWAs is the web push notifications capability. To be able to send push notifications from a Pharo server I will also need an implementation of the Web Push Protocol [3] and the VAPID spec [4]. Do you know any previous related work in Pharo or should I think in my own implementation?

Thank you!

Reply | Threaded
Open this post in threaded view
|

Re: Pharo for PWAs and Web Push Notifications

philippeback
In reply to this post by Rafael Luque

On Tue, Oct 23, 2018 at 11:32 AM Rafael Luque <[hidden email]> wrote:
Hi all,

I'm interested in developing progressive web applications (PWA) [1] in Pharo, so I'd like to know if anyone has been involved in such kind of task before and could share his experiences.

At first sight, I was thinking in trying PharoJS [2] to build abstractions in Pharo for each PWA's client-side concept like Service Workers, Cache API, IndexedDB API, appshell architecture, etc.

By the other hand, one of the more appealing features of PWAs is the web push notifications capability. To be able to send push notifications from a Pharo server I will also need an implementation of the Web Push Protocol [3] and the VAPID spec [4]. Do you know any previous related work in Pharo or should I think in my own implementation?

Thank you!

Reply | Threaded
Open this post in threaded view
|

Re: Pharo for PWAs and Web Push Notifications

Rafael Luque
In reply to this post by Tim Mackinnon
Hi Tim!

I will also check Willow following your suggestion.

Thank you!

El mar., 23 oct. 2018 a las 14:18, Tim Mackinnon (<[hidden email]>) escribió:
Have you also looked at Willow - https://link.medium.com/Iyj4qo2BfR?

It has spa ‘s in mind - although I’m not sure of the pro’s/cons vs Pharo js which also looks good too.

Would be interested in what you decide.

Tim

Sent from my iPhone

On 23 Oct 2018, at 19:02, Rafael Luque <[hidden email]> wrote:

Hi all,

I'm interested in developing progressive web applications (PWA) [1] in Pharo, so I'd like to know if anyone has been involved in such kind of task before and could share his experiences.

At first sight, I was thinking in trying PharoJS [2] to build abstractions in Pharo for each PWA's client-side concept like Service Workers, Cache API, IndexedDB API, appshell architecture, etc.

By the other hand, one of the more appealing features of PWAs is the web push notifications capability. To be able to send push notifications from a Pharo server I will also need an implementation of the Web Push Protocol [3] and the VAPID spec [4]. Do you know any previous related work in Pharo or should I think in my own implementation?

Thank you!

Reply | Threaded
Open this post in threaded view
|

Re: Pharo for PWAs and Web Push Notifications

Rafael Luque
In reply to this post by Sven Van Caekenberghe-2
Hi Sven!

As I understand, the HTTP/2 protocol is only required by the following 3 operations:
  - Receiving Push Messages for a Subscription.
  - Receiving Push Messages for a Subscription Set.
  - Receiving Push Message Receipts.

The first two use cases are communications between the user agent (browser) and the Push Service (provided by the different browser companies).

The operations I need to implement will be those which involve the application server, in our case implemented in Pharo. As far as I read these operations are sent over HTTP/1.1.

Thank you!

El mar., 23 oct. 2018 a las 14:30, Sven Van Caekenberghe (<[hidden email]>) escribió:

>
> Rafael,
>
> > On 23 Oct 2018, at 11:32, Rafael Luque <[hidden email]> wrote:
> >
> > By the other hand, one of the more appealing features of PWAs is the web push notifications capability. To be able to send push notifications from a Pharo server I will also need an implementation of the Web Push Protocol [3] and the VAPID spec [4]. Do you know any previous related work in Pharo or should I think in my own implementation?
>
> The two protocols you mention are based on HTTP/2, which we do not (yet) have.
> We do have WebSockets in Zinc, which might help in understanding the issues at hand.
>
> Sven
Reply | Threaded
Open this post in threaded view
|

Re: Pharo for PWAs and Web Push Notifications

Rafael Luque
In reply to this post by philippeback
Hi Phil,

I have a general knowledge about these kind of cloud-powered PaaS and serverless solutions, though I have much more experience with the AWS portfolio: AWS Lambdas, Cloudformation, AWS Amplify, etc. I suppose they are more or less comparable with GCP's options.

For sure, I will go in depth in the study of Firebase, and I don't dismiss it as an option for critical projects. However, in order to learn PWA and Pharo, I prefer to implement an agnostic solution without any vendor dependencies.

In other words, when I think in Pharo not always think in terms of effort/results, or at least not the most immediate and pragmatic results. An acceptable tradeoff for me could be effort/learning that can be transformed to effort/results in the mid-term.

Thank you!


El mar., 23 oct. 2018 a las 15:41, [hidden email] (<[hidden email]>) escribió:


On Tue, Oct 23, 2018 at 11:32 AM Rafael Luque <[hidden email]> wrote:
Hi all,

I'm interested in developing progressive web applications (PWA) [1] in Pharo, so I'd like to know if anyone has been involved in such kind of task before and could share his experiences.

The best thing I used for such stuff in terms of effort/results is using Firebase.


Why? Because it provides a ton of the mechanisms for what you ask below, works well, handles a ton of periphrenalia that I really do not want to deal with directly.

The good bit is that the frontend piece (the actual PWA) can be written in any way you want provided that at the end there is some JS code handling the UI.

Services can be provided as cloud functions of Google Cloud and nothing prevents them from being in Pharo.

In the Firebase SDK, there is a command line tool that provides for local execution of the generated JS and one can then push that code to the server side.
Integration with Google general push notification system is easy to implement as well.

Costs of operation are quite low, even for pushing to large user bases.

There is of course the "database" component (the actual "Firebase") that is key/value pair system, along with read/write policies (which can be quite complexand support quite a number of situations very well, provided the schema is well done) and if what one needs is a relational DB, this is not really the same thing.

So, that's how I would do PWAs, they work nicely using that very stack.

Phil


At first sight, I was thinking in trying PharoJS [2] to build abstractions in Pharo for each PWA's client-side concept like Service Workers, Cache API, IndexedDB API, appshell architecture, etc.

By the other hand, one of the more appealing features of PWAs is the web push notifications capability. To be able to send push notifications from a Pharo server I will also need an implementation of the Web Push Protocol [3] and the VAPID spec [4]. Do you know any previous related work in Pharo or should I think in my own implementation?

Thank you!