Juggernaut/Faye vs. Pusher for a Heroku hosted web service? - push-notification

If I understand correctly, Juggernaut is built on top of socket.io, and Faye competes with Juggernaut layer and socket.io layer combined. Recently Ryan Bates came up with a Faye wrapper called PrivatePub which makes it very easy to run Faye.
But I already have a rails app that runs on Heroku, and all I want to do is build a simple chat feature on top of it.
While researching I found lots of people use Pusher. It seems like pusher is well supported on Heroku so I'm thinking about using Pusher.
Before I jump on, I just wanted to make sure I understand things correctly. Is Pusher like a Heroku for push requests? My option is to either host everything on Heroku (including Juggernaut or Faye module), or just host the static part of the site on Heroku and delegate push notification handling to pusher.
From what I know, this feels like a more efficient approach since:
1. If I use pusher, I don't have to jump through all the hoops in order to run juggernaut/faye modules on Heroku.
2. The realtime traffic will be delegated to Pusher, which means I won't waste my Heroku server's resource.
Now I'm just a beginner and may be wrong about lots of things, but please enlighten me. Are the two factors above correct? And is my understanding of Juggernaut/Faye/Pusher correct?

Thank you for asking about Faye/Socket.IO/Juggernaut/Pusher on Heroku. I will do my best to answer your questions. So you already have an App on Rails running on Heroku. And you need to learn more about which path to take for adding real-time updates via an always-on connection. All options you listed will work for this. Faye/Juggernaut will take a bit time to setup, yet provide same end-results. And Pusher is like it's own Heroku, separate from Heroku, and is readily simple to add to your app.
Your questions & answers:
Is Pusher like a Heroku for push requests?: Yes. Pusher is a separate service which has a separate pricing model, decoupled from your main Heroku bill. (though Heroku + Pusher are combined into a single monthly statement)
The real-time traffic will delegate to Pusher and not waste your Heroku Resources: Yes.
Are the two factors above correct?: Yes.
And is my understanding of Juggernaut/Faye/Pusher correct?: Yes.
If you want to learn more about Faye, Ryan Bates and Real-time here are some links:
Run Faye directly on Heroku: https://github.com/ntenisOT/Faye-Heroku-Cedar-RedisToGo
VIDEO: Faye Private Pub by Ryan Bates: http://railscasts.com/episodes/316-private-pub
GITHUB: https://github.com/ryanb/private_pub

You can run juggernaut node.js server on heroku.
You might need to share a redis database between your original heroku application, and the juggernaut application, if you are using the juggernaut gem.

Related

Best hosting option to start with for both dynamic website and WordPress

As a frontend engineer and where the freelance market seems to be, I'd like to dig into some WordPress stuff and build one for myself to at least know how to play around with it. And soon later I'll dig into backend and probably would deploy a dynamic website.
I'd like to find an option for a way that could host both, and also I can learn and develop more in such hosting method.
I tried heroku but its policy changed so the current way I forked on GitHub wouldn't be available soon. I cancelled bluehost subscription cause I believe it's not gonna be suitable for future deployment with dynamic website.
I've seen aws but its services are too many that I have no where to start with.
I'm so confused with all hosting options and iaas paas saas even tho I tired to read articles to understand them. Plus information online is like crazy a lot so that I have no idea which should I start with.
I am fine with paid service,
Could anyone share some experience with me?
If you are just getting started with web hosting you should use firebase hosting (You can't host Wordpress sites in firebase). It is completely free for hosting and also has a free database. You can deploy react.js apps or basic html,css,js websites in firebase. If you are using next.js you can check out Vercel. After exploring all of these you should try to get into the fun stuff such as Hostinger, WP Engine, DigitalOcean which support wordpress, static sites and dynamic sites.
I am not an experienced engineer like you are, but I have used these and trust me they are worth it. I hope this answer helps you

Backend and DB with NextJS

I started to create my project with NextJs, but I have some issues with the Backend of next js.
As Next is mostly the frontend part, how can I set up backend for next js?
I am looking for some tutorials to install BE, also I am interested to investigate some hostings. As I know, I can setup BE with Azure, some Express etc.
I will be happy if you share some knowledge about it.
Thanks!

Python QT on Azure

I'm using Python and QT (PySide) in a local application (which connect to a database on cloud Azure).
Now, my objective is moving this app on the web, in particular on Azure (I have an Azure subscription), simply transfering it on Azure, it's possible in some manner? I have not found examples on the web.
The important question is: is Python QT (app web) compatible with Azure?
Thanks
UPDATED ANSWER!
Yes, now you can. Well sort of. The mad mads at Digia have created something called "QT for Web Assembly" that can compile your whole app into something that runs embedded into a web page.
https://doc.qt.io/qtcreator/creator-setup-webassembly.html
You might have to rethink connecting directly to the database however, as thats simply not gonna fly with web-sockets (And honestly direct app to remote RDBMS has never been a smart move. Theres a LOT of things that can go wrong letting the internet connnect to your databaes). But you could at least keep the UI and rewrite the databaes layer to interogate something like a GraphQL (or whatever) front end to the data.
OLD ANSWER
I'm afraid your up for a nearly complete rewrite. QT is a desktop/mobile platform. It doesn't go anywhere near HTML/CSS except perhaps for displaying them in a webview component. Azure or AWS won't magically make it into a web application for you.
Your code as it stands needd to be rewritten in a web-first transactional manner. That is it takes a request, processes it, produces a result. To some extent websockets has changed this dynamic for a limited subset of use cases where interaction needs to be non transactional, and modern web app design hides much of the transactionality behind a web-services model, but 90% of web work is still very much transactional.
Database <---> Web server/Web app stack <--- Internet! --> Web browser
My suggestion is to pick up Django (or one of the other systems. If its just simple, Flask is another good alternative. Flask for simple apps, Django for the big stuff. Or use something else, you have choices here!, and start from scratch. Analyse your products function and start mapping out how to make this work as a database driven transactional system.
Theres no shortcuts here, I'm afraid.

Do I still need a backend like RoR or Django if I use Firebase?

I am a Front-end developer with limited backend knowledge.
My question is do I need other backend frameworks like Django or Ruby on Rails if I use Firebase as a backend? In other words, can I solely depend on Firebase as a backend and build a single page web application or Mobile application without writing a single line of backend code?
Thanks for your time viewing the question.
I was also looking for a platform to minimize server code and I found that firebase can help a lot.
You will get plenty of docs on net. You can start at angular fire + firebase doc
https://www.firebase.com/docs/web/libraries/angular/quickstart.html
Following document was helpful for me to design my app, which requires some amount of off-line processing too.
https://firebase.googleblog.com/2013/03/where-does-firebase-fit-in-your-app.html

Is there any solution for make my own Meteor cloud server?

meteor deploy myapp.meteor.com
When I run this command line, my meteor app upload to meteor cloud server.
Is there any solution or repository for make my own meteor cloud server?
meteor deploy mycloud.server.com myapp.mydomain.com
I know I can use my own domain use this command.
meteor deploy myapp.mydomain.com
But I want to make my own cloud service like meteor do.
I know https://github.com/arunoda/meteor-up. But this is single service solution.
This is not for one or more server (clustered server) with many services.
If there are no solution for this, I'll make this solutions.
For now galaxy is still not released, this one should do exactly what you are looking for i.e. using deploy on your own server.
An alternative might be modulus.io but it is still not the easy deployment we would like.
The simplest I found yet is still using meteor-up. You can use it for deploying on several server too. The point is meteor-up expect to have a running ubuntu (or debian), and you deploy to those machines. You still need to setup an oplog for mongodb and a high availability proxy (with sticky session) to forward on the right virtual machines….
If only the performances matter, you can build micro services and integrated them through a service discovery as provided through meteorhacks:cluster, as this will help load balance your app it does not (yet?) provide a way to route the client according to the domain name (meaning you still need a reverse proxy for accessing the right service discovery from a domain) Also this packages does not provide any way to deploy you app, this is just a convenient way to help manage and scale your service.
If you need a reliable solution right now, docking meteor, deploying it on clusters and managing them, I would strongly advise looking at: https://bulletproofmeteor.com It is a very good source for building reliable meteor app with high availability. Note that all the chapters are not free, but there is a whole chapter covering "Deploying Meteor Apps into a Kubernetes Cluster" which goes step by step on the process of setting up your server(s) for running your meteor app in a PaaS way.

Resources