Nodejs, RabbitMQ and RestAPI - node.js

I have been breaking my head over this for over 2 weeks now and I don't seem to understand if what I'm doing is considered right or good practice. So I have been trying to implement a simple todolist of sorts with 2 services, the task service and the user service. I have created a few AMQP connections by reading through the documentation and was able to implement a request/reply pattern. What I don't get is, Am i doing this the right way? or is there a better way to do this? I'm pretty new to rabbitMQ and have plans of using this in my upcoming project with microservices. I understand the concept behind it but the implementation aspects of it seem bleak and I'm tired of going through very simple demo explanations.
Heres the application. Hope I get some help with this.
RabbitMQ and Nodejs with RestAPI
I have posted it in rabbitmq groups but I have no luck yet. Any help will be nice.

Related

What’s the best way to architect a MQTT broker and display data on a web page?

I’m not pretty sure if It's appropriate to post this question here, but I couldn’t find anyone or any article that could clarify that to me.
Anyway, the doubt is the following: I'm currently working on a project which intends to monitor a bunch of data that is streaming over the CAN protocol, this data is sent by some devices. Well, I came up with the idea to monitor and display this data using the MQTT protocol along with NodeJS.
I managed to develop a broker using mosquito running in a docker container, I can receive the messages and print them on my terminal, In addition, I found out on the internet that I could use Express Ws to create a WebSocket, so I could send the data to my Web page, so far it seems to be working as expected. The problem is I don’t know if that's the right way to do that. I've got this concept in mind but seems to be too simple.
The questions are:
How should I manage many publishers taking into consideration just one broker?
Should I have a MQTT broker for the server and another one for client?
Is it right to consume the data through a websocket?
I apologize in advance for this whole question, I just want some guidance.

Is there a way to use ShareDB with AWS API Gateway WebSocket?

I'm developing a collaborative text editor, and the great ShareDB library was the best option I can find, very simple to use and accessible!
But now I'm figuring out where and how can I host a scalable backend handling ShareDB.
In the beginning, I was thinking of AWS Elastic Beanstalk, but I have some trouble making the WebSockets working on it. And then I discover AWS API Gateway Websocket, which seems to be very versatile and useful for what I am searching for.
I was wondering if some of you ever tried to make these two interesting technologies work together?
Thanks a lot for your answers :)

ReactJS and a backend

I am new to React. I created a simple login form and sign up form.
I am a little confused about using a backend. I've Googled it (lol) and I've seen a large variety of answers from using AWS to creating another project with NodeJS/Express.
For a beginner, what is the best approach? What confuses me is that I am handling all the routing in my React app. The tutorials that I've seen appear to handle routing in the NodeJS/Express portion.
Like Chris mentioned your question is to broad to answer, but I'll try to propose some general directions which may help you to pursue building a back-end.
There is not really a best approach. I suggest you look into several courses and tutorials on what web technologies suits best for the type of application you want to build. Start first by selecting which framework would provide the most productive and scale-able workflow for you. This is depended on various factors of your envisioned application and your current skill-set. Then follow along tutorials and read documentation of each separate technology first to get a good understanding of each building block. When grasping how everything functions individually, looked in complete full stack tutorials to see how everything works together and how you connect your front-end to your back-end.
I chose for a Nodejs RESTfull API myself using the MERN stack (MongoDB, Express, Reactjs and Nodejs), but you can also look into python (django, flask) or PHP back-ends as well.
Some good Youtubers to get you started:
https://www.youtube.com/academind
https://www.youtube.com/traversymedia
They provide many up to date tutorials for different web-technologies so you can make an informed decision yourself of what you want to adapt to.
Keep in mind there is a lot to work with when you just getting started, but at some point things will become familiar after using it over and over again and it becomes less overwhelming.

firebase custom user signup

I'm still a newbie in firebase so i might not have the right understanding of this excellent service.
I'm building a blogging mobile app in a client-server architecture in which most if not all the logic are done server-side. all the client does is request and display the result. the client-server communication will be in REST API. and post-processing data then will be pushed to firebase.
keep in mind that this is all still a work in progress and i still don't have an actual working setup yet.
my questions are:
1. is this possible?
2. is this good practice?
a 2nd architecture I'm thinking is to have the client talks with firebase directly and have the nodejs process any events coming from firebase.
same 2 questions as above3. which is better?
mind you i'm also a newbie in nodejs and just start to learn nodejs for this purpose.
Many Thanks in Advance

Chat App with Monaca

i am a beginner at developing hybrid apps. And i came across of this magnificent cloud-based framework named Monaca. Now the issue is this, the Backend it provides is not useable for my chat application(well if there is a miss from my side feel free to comment), so my question is how can i approach this issue? i have heard of Backend as Service(BaaS), PubNub, Jabber and more but its really expensive on the long run. There is a solution with node.js and websockets. But i don´t know how to use them with Monaca. Help would be much appreciated.
You should not have any issue to integrate any backend service to your Monaca project, as long as the service provides a JS API. You just need to follow the API integration docs and integrate it in Monaca. Did you already took a look at Azure? There is already a tutorial on Onsen UI & Monaca Blog:
https://onsen.io/blog/tutorial-todo-app-with-onsen-ui-and-azure/
Hope it helps!

Resources