REST API speed improvement [closed] - node.js

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
We have a REST Api that we are using on the frontend. It transfers a lot of data around 200 object in a JSON. The REST API we are using load rather quickly in the postman and jmeter. But when displaying data in the frontend it slows down. It takes around 3-5 secs before the data is fully displayed.
Is this a frontend or backend issue? Can I really trust the results from postman and jmeter calls? What can I do to improve this timings? thanks!

Thanks for all the response! I have confirmed that the issue is from the frontend. It seems our frontend is not yet that optimized in handling large amount of data.

Related

Can i write all of my serverside inside nextjs? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 months ago.
The community reviewed whether to reopen this question 9 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
In nextjs u can write API routes using the api named directory inside the pages directory, thus i was wondering if i can write all of my server code(api endpoint,database queries...ect) inside of NextJS instead of having an actual nodejs app running elsewhere?
The short answer: Yes. Nextjs is in fact an Nodejs app itself.
The long answer:
Depending on your apps usage and scale and the size of your team there are some nuances to consider.
If you use Nextjs for both Server-side Rendering (SSR) and handling api calls, it will effectively have two responsibilities.
This is perfect for small teams because the stack is relatively uncomplicated and all in the same repository (and module).
At a certain scale you might want to optimise deployments to gear towards either rendering or handling api calls. It might become difficult to keep both extremely highly performing - at which point a separate, specialised, backend might become relevant.

“Error loading documents” in Firebase Firestore [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
My recently launched app has 385 users and suddenly I'm seeing this error in the Firebase console (note that refreshing the Firebase Database should display a list of all user documents). It seems to be something different from what other SO developers have posted. I haven't had any problem displaying user records in the Firebase console until today. I tried refreshing the page; didn't help.
It turns out the problem was that my daily document read quota (50K reads) was reached due to the way I designed the app. I redesigned it to minimize reads and that solved the problem.

I keep getting errors when I try to make a multiplayer game in python [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have been running into problems recently where the client-side of a networking game never read/recognizes the server. When I tried to use the socket module the client never accepts the socket. I used a module called NetworkZero, but that never returned more than None when I used .discover(). I have no idea what the problem is. Any ideas are appreciated
There are many ways to set up an interface between clients and servers.
The easiest is probably to start with HTTP especially in Python where you can just use requests and poll for your data.
This will get you to prototyping quickly and then you can put your focus into optimizing when you start running into issues.
Of course this may be a less than optimal solution depending upon the nature of your game. Without context I would recommend using simple client/server communication systems you understand.

Which load testing method is better? API testing or full website testing [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I have an application that we implemented kind of a microservices type architecture. The application contains 6 services (6 Docker containers). I need to load test this application. As I don't have much experience in the testing field, I'm not sure which method to use.
Right now, I have used the Gatling Load testing application for the load test. Here, I record the testing script by start the recorder and wander around my application to record all routes. I have gone through most of the routes in that single recording in order to mimic a practical user. I thought, normally users use an application like this and I can load test with its 1000 times by editing the number of threads/users.
Later I read about API testing which we will focus on APIs. Loading each APIs with a heavy load. So, I'm confused that which testing method should I use? If we go for API testing, it will provide only how much we can scale for that particular API right? (Not sure)
Is there any issue with my method of load testing?
It depends entirely on what you hope to achieve...
If you're looking to validate that your entire application (code + production infrastructure) can handle a given load, then driving as though going through the full website is the right path.
However, if you're looking to see how a particular api scales or want to help developers explore the ramifications of changes, then you will probably want to just drive that API directly to avoid other limitations your system may have.

How to develop a simple webpage for a CLI Node.js script [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I have a Node.js script running locally through command line (I haven't developed it so not very familiar with the code) which takes an email address as a parameter and looks up some data and spits out results in a command line table.
I wanted to make a "front-end" for this, like a simple local Webpage where I could punch in an email address and see the response right on the browser itself.
I am not very familiar where to get started without complicating this into a bigger problem than it is. Any guidance would be very helpful here. I haven't really done any web development using Node or JS before but I am familiar with basic web development (and willing to learn) new ways of doing things.
If I can provide any additional information please let me know.
Thank you!
The most prominent framework for developing node apps is express.js. You can't go wrong if you invest some effort into learning express. It will help you with routing and templates, and can generate a skeleton application for you. Read through the guide, and learn:
http://expressjs.com/guide.html
Also you may study the answer to the most popular node question on this site:
How do I get started with Node.js

Resources