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
In my current project I need to optimize socket.io. It can handle 500-600 Connections but I need 2300 at Least. Is there a way to optimize?
Only being allowed to support 500-600 connections is a very broad issue. You need to distinguish what's bottlenecking your code and analyze it to see if there's any way to fix it. This issue may not be socket.io specific and can be caused by some other module in your application. First profile your code and see if there's anything that is is really heavy and can use optimization. NodeJS has a built in profiling tool that can be used which you can find >HERE<. Once you've narrowed down your issue, it'll be easier for you to figure out what needs to be optimized and easier for us in the community to help aid you.
Another option you can do is completely scrap socket.io all together and write your own custom websocket protocol. Requires a bit more work, but it'll strip away a lot of overhead you may not need.
https://codeburst.io/why-you-don-t-need-socket-io-6848f1c871cd
If you do want to keep using socket.io and you find that there's nothing that sticks out while profiling your application, your machine probably needs more resources to support the number of connections. Only thing you can do for this is to upgrade whatever hardware your application is sitting on.
Related
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 2 years ago.
Improve this question
I ma looking to do a course and a a tutorial form youtube.
This project more specifically as it has a lot of features I would like to learn and my back-end knowledge is very basic currently.
[Project][1]
https://www.youtube.com/watch?v=m_u6P5k0vP0&t=584s
Since the video was released firebase plans have changed and you read tales of huge bills.
Is there a way to avoid this? and if anyone knows the project will I be safe from billing whilst building it? The project will never be published anywhere, just used by me for practise and testing which seems fine as the limits for free users are quite big. I just have some fear from reading horror stories of accidental loops and the like!
Any help or advice on this is welcome
I don't think you should be worried about racking up huge bills if you're not going to publish the project anywhere and if you're on the free plan they literally can't bill you. even if you decide the project is really cool and you want to publish it you won't have to use their other plans unless for specific reasons (like cloud functions for example). So basically don't worry it's a really good platform to help with your development. I myself have done tons of projects where I used firebase in the backend and it's been great.
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
Recently I started learning web development. I tried to read the HTML and CSS codes of some famous websites in my web browser. But I observed that they intentionally mess everything such as changing the real names of the bootstrap classes, while looking at the design architecture and page layout anyone could guess what kinds of technologies are used.
What would be the possible reasons?
I think it's not about security because any average programmer can still know everything about their front-end technologies if he puts some efforts.
There are multiple reasons.
Some companies, indeed, try to obfuscate some of all of the code to hinder some of the attacks. That is not 100% proof, of course, because a sophisticated actor can still reverse engineer almost any code that's out in the open.
However, most of the times it's simply how modern frontend development is done nowadays. The trend has been moving more and more towards using various build, bundle, code-minification and packaging tools. Like Webpack, for example.
What you see simply is a result of source code being processed packaged for optimal delivery and running in the browser.
The days when we could view web-page source and inspect pure HTML/JS/CSS, as it was written by the original developer, are long gone.
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 4 years ago.
Improve this question
I'm currently studying about web development, I still don't know about jquery, but I've a little knowledge about javascript, html and css (basic).
I've been looking at some examples in github to improve my skills, and I've found this content;
https://github.com/stewilondanga/editables
I perfectly understand the theory, but I do not know how to put it into practice, I would like for any similar examples (simplified alternatives) and how to convert the exported code generated by javascript into a html5 table?
Any example would be appreciated! thanks for your attention!
First of all, jQuery does not generate code. It's a framework, you load it into a web page, and then you can use it from within Javascript code in that page.
I suggest you start by looking at the source of https://stewilondanga.github.io/editables/, if an editable tables is what you need. There are more general frameworks to do this, e.g. Aloha
To try it yourself, I'd suggest you bite the bullet equip yourself with some kind of web server, be it on a server somewhere, or on your local machine, so you can easily try out things like this, copy the sources, alter the code etc.., and quickly hit reload on your browser.
While it may seem easier to run a local server and point your browser at http://localhost/something, IMHO it also takes more tinkering to get browsers to embrace that fully. You don't need the extra grief while already learning all those new concepts. If you want to tackle this seriously, consider getting a hosting service or small VPS somewhere. If you don't know how to do that, get help for that first, but get it out of the way. It'll save you much grief.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I want to insert a piece of javascript in the clients websites to track various statistics (like crazyegg, intercom.io), but traffic related.
I was thinking of using IronMQ but I don't know how to call it from Javascript directly and I am affraid that making a request to my server (3Gb Ram) from sites that have tens of thousands of visitors / days can cripple the server when making too many javascript requests in the same time.
You can call the IronMQ thru the HTTPS API.
See IronMQ REST/HTTPS API for more information.
Of course, you will need to provide Project ID and Token to JavaScript code. I suggest to encrypt Token before you place it into JS/HTML and decrypt on page load or before using the API.
Welcome Iron.io Live Chat even you will need more information.
Upd: For now it seems does not work. Because of Cross-Origin restrictions. But we're working on it, so, stay in touch.
You'll need to optimise as you go. If you find CPU is a problem, optimise for that. If you find memory is a problem, optimise for that, if bandwidth, etc etc etc. It all depends on
your requirements
your resources.
Optimisation is almost always the last step in the development process.
You might just have people include a 1x1 pixel image, you might have them include an iframe, or you might have them include a javascript file running off your server. Or you might have them include a javascript file on their server. More questions you need to ask yourself might be what information you want, what security issues are there, etc. If it's information for their purposes, then you don't need to worry about them forging it. Otherwise, you do.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I've been writing a few tools as standalone webapps that have no server side code and it strikes me that I'm not sure what people call such things.
I like them because they can be distributed as a single file that anybody with a web browser can run. Typically all the funky stuff is done by calling AJAX web APIs like those provided by Stack Exchange, MediaWiki, Google, etc.
The following terms all seem plausible but might also cover other things or not tell the whole story:
client-only
pure JavaScript
standalone webapp
web script
web tool
browser app
Is one of these terms or something else in common use for such apps / tools?
Here's links to some of my little tools on GitHub: travel-se-airport-tags.html, travel-se-1-or-2-answers.html, travel-se-stats.html
There are some much more app-ish examples in the 10k Challenge...
In the fantastic 10K Challenge, they are generally referred to as:
Client-side apps
or
Purely-client apps
But I think your first 3 titles are pretty self-explanatory too.