Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis CI fails with build errors #16

Open
kushalbabel opened this issue Feb 13, 2018 · 4 comments
Open

Travis CI fails with build errors #16

kushalbabel opened this issue Feb 13, 2018 · 4 comments

Comments

@kushalbabel
Copy link

No description provided.

@eskimor
Copy link
Owner

eskimor commented Feb 14, 2018

Thank you. Unfortunately I don't really know how to fix this, neither why it broke in the first place.

@kushalbabel
Copy link
Author

Hi @eskimor
Could you please briefly describe the feature set or the APIs supported?
The example linked in the README links to the purescript repo. I basically need to get started on using servant-subscriber

@eskimor
Copy link
Owner

eskimor commented Feb 15, 2018

Well the idea is you have a servant API, like here, where you mark certain endpoints as subscribable. Handlers modifying a resousource then have notify clients about changes the changes they made.

Clients in turn can subscribe with Subscriber.deploy to changes and will receive a message via websocket whenever the resource changed.

In general you can look into the above mentioned gonimo-front and gonimo-back repos for a full blown application, making use of servant-subscriber.

But I might also say, that I, in the end rewrote gonimo with a simple WebSocket API and a reflex frontend, which made things quite a bit easier than relying on a servant REST API, when your application does not really allow REST in the first place. You can find the WebSocket based API here. I ported subscriber to the WebSocket API here.

The downside of the ported subscriber version is that is very application specific at the moment. I might at some point clean things up and untangle it from the concrete protocol used. Especially if there are people interested.

So consider whether you really need a REST API or if you can simply have a WebSocket based protocol. If it is the later, feel free to get inspired by the above link. gonimo is AGPL, but if you just copy over and adopt the subscriber part, I won't sue you, if you do something proprietary with it. ;-)

@kushalbabel
Copy link
Author

This definitely helps! Thank you @eskimor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants