Cixak95211's Posts
Nairaland Forum › Cixak95211's Profile › Cixak95211's Posts
1 2 3 4 5 6 7 8 9 10 11 12 13 (of 13 pages)
jaycpu:A server is a server . . and it doesn't matter what you host on it. |
@MetroBox Can you tell me what the delay is? If you were gonna be busy, then you could have at least informed me, and allowed me to make other choices You are not even messaging me but still come here to update your thread. You updated this thread 4 times today and yet not even a 'hello" to me on whatsapp, Nice !!!! The time taken to update your thread could be used to at least message me. It's starting to feel weird and I hope you give me an update today before it gets too late. |
BizBloke:I have sent u multiple links on whatsapp but you aint communicating. Cheers |
how does your aliexpress purchase and shipping work? plus delivery timeframes... |
EmptyGarden:Emergency 101 . . dont try to loosen the victim's belt . . .leave it as it is . . . the victim shouldn't even be moved . . except by professionals |
Karleb:Thanks for correcting him . . center was deprecated as afar back as HMTL4 in favor of text-align property . . Was very disappointed he even said "9ja devs" and even far disappointed, somebody would mention center and using standalone-tags in 2020 when we have flexbox and grids |
1. Create a parent container to hold a) niaraland div b)form div |
If it's just for verification e.g. OTP, then you can use FireBase . . else i wish you goodluck . . i am stuck with twilio just like you. at least, they allow me use Amazon Polly , so OTPs can go as phone calls instead of regular text messages |
We've seen it , thanks, dont worry, we'll try it out |
What manner of "fuckery" is this? ![]() |
Spot on at nairaland.js. How do you know song that was extremely good? Every artiste wants do to a remix or cover, right? How do you know a language that is good? Every tom d and harry, wants to write a framework for it; they want a piece of the cake. Thats your answer! |
Those are not projects, please !!!! If you tendered those during an interview, you would be flung from the highest storey in the building. Well it starts from somewhere . . .And congratulations on taking the very first bold step. |
crunchyDope:I'm flattered. Thank you. If you are referring to the node js' fs.watch, yeah that works fine . . i like to use webhooks generally cos they are "language & platform agnostic" I should prolly start a Youtube channel one of these days. |
crunchyDope:There is really no need to be checking the config every 15 mins, that is a cron job. Yes, crons have their use case but in this case, why dont you make whatever changes your config, send a webhook event. Saying "hello, config has been changed" Now the server will just sit idle and wait to receive that webhook event and when it does receive it, it knows the config has been changed and can then proceed according to your demands. Just in case you were wondering, during ci/cd, the server does not run a cron job every now and then to see if a new branch or pull request has been merged, Rather, it sits idle and wait for that message to come in; and when it does come in, it looks at the message details and handles the request accordingly. You save more server resources this way. I hope this comment has helped you. |
Babtunz:Not a problem, Any one works, sir ! |
crunchyDope:i dont understand, why would u be changing values in production? Or you mean change values of a sample config file? Give me on clear use case. |
Babtunz:Do you have an email I could mail 'em to ? |
I'm just here to see screenshots of the repos and nothing more. Please oblige me, the both of you! |
codeigniter:You arent a newbie ... are you? For a newbie . . ., I'll advise they try to rack up hours working in a production environment. Coding in your bedroom , doing a todo app is way drastic in change than when coding for production and enterprise uses cases .e.g ur custom tic-tac-toe app might not require custom domain or workspace implementation, but for productions, customers will require it. This single task alone will take you a to a whole new level of computing and it's gang of wahala that it comes with. Then when you must have racked up quite some experience, you start thinking as a product engineer and not a software engineer. A SE can write code, but a PE can deliver a fantastic product that has a market and passes customer validation. Building a product as a SE alone is a recipe for disaster, it takes a more than writing codes. At this stage, you should try do one of two things for yourself. The first few might fail, dont give up. The next one will be a banger !!! |
codeigniter:I work for a company; I don't freelance cos I have my own as well. |
codeigniter:In memory dbs like Redis and Memcached are up to 300% faster in i/o operations that disk-based db like mongodb, mysql; because they reside in volatile RAM. Although you could persist the data once in a while, if persistence matters to you . . That's why it is preferred and it also prevents you from making the call to the DB [round-trip calling]. Secondly, sessions dont scale well, at least, vertically. Imagine you have deployed your app to 10 database replicas ....This can be disastrous, cos the first login request could go to Database A and if you're doing a round-robin, the next request, for that same user could go to Database E Now E doesnt hold the login session, it's held in A. To beat this problem, you have to sync your session data across all 10 Databases each time a user logs in, that's 10 round-trip calls. And you might ask why 10 DBS. . Facebook saves as of 2019, 1.5 petabytes of storage, that is not gonna fit into one database, not even into 10,000 databases, if they want efficiency |
codeigniter:I just gave you a summary of how to invalidate tokens in node js . Creating tables to look up data will make the application stateful . . . That is called a session. Its fine if you want to go that way. Using jwts, doesnt require a session, in short, [using a session kills the original intention of JWTs] ,therefore keeping the application stateless. Its similar to using callbacks inside a try/catch blocks. which is an anti-pattern. It kills the need for that. There are myriads of myriads of web applications that use jwt for authentication and dont have issues. it might seem hard for you, perhaps cos u are new to nodejs, but like i said earlier, as your knowledge of nodejs grows, you will see it was pretty easy after all. |
codeigniter:Authentication, like you said, is one of the hardest things in Nodejs, especially if you want to do it properly. Most people just whip up a JWT -based token and thats' all. but it comes with a problem, e.g how to invalidate a token. The token does expire. But the problem is what if user permissions are changed before the token expires e..g downgrading a user. If the user has saved the token somehow, they can still use it access to former [now obsolete] permissions. So you must always 1.) get fresh user's tats from the DB at authenticated request and NOT RELY on what the jwt says, even if yes, you did sign it and it was not tampered i.e. the signature is intact and 2.) implement an in-memory store like Memcached and Redis to keep blacklisted tokens till they expire.,,, a very fast way to invalidate tokens. It doesn end there. You should 3.) implement refresh tokens + access token architecture, this way it's easy to mitigate an attack when somebody steals your token or logs in from another device and/or ip address, however you want it. Stages #2 and especially #3 is where it gets pretty difficult for newbies. But as with other things in life, perfections comes via practice. |
DanTheGeek:I'm there. |
and when cqeor goes to death, you'll say its your village people. @DanTheGeek . . . don't you know you're supposed to keep a professional image out there. Stuffs like these should be local/offline gist between you and friends. Imagine investors just doing a background check on you, and find this page. Professionalism just went to ashes! You have a brand, you should try to build and protect it, not yap online about abused substances. Good luck ! |
Lmao, i remember that dude. It was funny as hell. |
^^ Hell yea, no disputing of those facts. Which in turn has led to too many adulterated engineers . . .A former CTO once told me, Nodejs is the language of the future, invest in your future now. Maybe that an exaggeration, but we all know the "20k gang", as I like to call them, both within and outside Nairaland, all gained their founding in php and it's gang of companies e.g. wordpress. |
DanTheGeek:I was an early adopter of php, during the hay-days of Zend and Symfony . . . But have since hung my boots I wouldnt touch php with a 100-foot pole now. We have both gone our separate ways. |
DanTheGeek:Software Engineer . . . MEAN, PERN, but more of MERN Cloud Engineer [GCP, AWS] |
crunchyDope:You worry too much about the less important stuffs. There are more important stuffs to worry about e.g. how to scale up and down and keep costs low. Well to answer your questions. If you want your app to always stay online 24/7/365 even in the event of a terrorist attack or nuclear bomb blast, then you need to invest in "geo redundancy". Servers are divided into geographical location and zones. e.g. Eu-west-2 which stand for London in AWS [amazon] and Us-central-1 which stands for Iowa [Google] Those are now divided into zones, i.e. cities which are at least 100km apart from each other e.g. eu-west2-a, eu-west-2b, eu-west-3b . . repeat for us-central-1a u get the idea . . if you wanna make your app geo-redundant, you will need to deploy your app in multiple servers across different zones and countries. you might deploy it in 12 countries across the world . I hope you have money for that, cos the bill will be in hundreds of thousands of dollars each month. SO if Russia goes down, USA is stil online, ur app is still working. If CHina blows USA, the one is London is still workin . . London has fallen, then the one in South Africa is stil online . . if the whole 12 countries go down, then you know its the end of the world and nobody would be using the app anyways when we are all dead. Now the question is? Can yo afford it? So better stick to a single server, and when you make cash, like Jeff and Mark, you can even create your own server farms which is what they all did. Goodluck |
stanliwise:This right here, made my post my comment, because looking at it already tells you the POST [no pun intended] refers to Restful APIs, and [restless, which Dan pointed out you missed]. Maybe there was misunderstanding somewhere along the line, but I believe we all get it now, yeah? We're cool [in Dan's voice] ! |
Xperienx:True that, but his curiosity kept going deeper and i just had to oblige him, and even told him it would not make sense now but it will surely do, if he keeps on keeping on. |
