Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,170,611 members, 7,878,769 topics. Date: Wednesday, 03 July 2024 at 06:17 AM

CrunchyDope's Posts

Nairaland Forum / CrunchyDope's Profile / CrunchyDope's Posts

(1) (2) (3) (4) (5) (6) (7) (8) (9) (of 9 pages)

Programming / Re: Node Js Gurus @nswer This Biko by crunchyDope(m): 9:25pm On Sep 15, 2020
codeigniter:

that would work but it going to add more to d bill. the problem with node js jwt is that it doesn't create a table with the application/backend which makes it difficult to invalidate the token. anyways, I would prefer to use a table in my db.
cixak95211:


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:

that would work but it going to add more to d bill. the problem with node js jwt is that it doesn't create a table with the application/backend which makes it difficult to invalidate the token. anyways, I would prefer to use a table in my db.

mehn u guys are too good, how do i get there?

u guys make me feel stupid lolz, i feel like my personal project would be like crap if u guys were to look at it , like too many unnecessary codes!

one question bosses
like is it worth creating a table from a config file? m using the library "config" to get fields for a table or do i just write it in the code and update the code everytime i need to update a table . cos am writing a code to delete or alter a table field based on the config file and i feel the logic is flawed, bosses i need yo input
Politics / Re: Protesters Cook In Front Of Shell In Rivers As They Protest Sacking Of Kinsmen by crunchyDope(m): 8:12am On Sep 15, 2020
Lipscomb:
I will let you take water when you finally stop committing bluders.
I will advise you to buy better grammar that will help you.

bastard fool! <God forgive me> oga we don't care about English or Spanish or where dat language comes from as "lng @ss e x communicating" fvcking dummy, as if the whites can speak our language! u must still be a child . stupid!

3 Likes

Politics / Re: Obaseki: I Will Promote Private Sector Investment For Job Creation by crunchyDope(m): 10:02am On Sep 14, 2020
enolife2:

This is exactly what causes the fight between Obaseki and Oshomole. How can Oshomole left a lot of debt for Obaseki to pay and still want to be paying him hugh godfatherism fee. This same thing is what caused the fight between Tinubu and Ambode, But Ambode was not bold enough to stand his ground and reject the evil rather he step down. This same thing happened in Akwa Ibom state where Governor Udum Emmanuel fight and reject the Akpabio godfatherism evil and disgrace him in public.

well done , conspiracy theorists,

no proof, just words of payment
Programming / Re: Node Js Gurus @nswer This Biko by crunchyDope(m): 6:15pm On Sep 12, 2020
cixak95211:


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

Iolz!!!! noted boss.
Programming / Re: Node Js Gurus @nswer This Biko by crunchyDope(m): 12:52pm On Sep 12, 2020
DanTheGeek:


Xperienx:


you guys are still using the word rarely which means not "impossible".. so this is how i sleep knowing my crawlers might one day fail grin

Programming / Re: Can Android Apps Be Created With Android Phones? by crunchyDope(m): 11:54am On Sep 11, 2020
moriton:
I have two ideas for creating an app and I wonder if it's possible to create an android app with just and android phones.

App guru please help me out here.

yeah it is possible! i would even say "too possible" grin

1 Like

Programming / Re: The First Post In Nairaland Programming Section by crunchyDope(m): 11:52am On Sep 11, 2020
Talk24:
I found it, The first post was made more than a decade a ago��‍♂️��‍♂️
www.nairaland.com/1310/java-java-mobile-developers-house?iorg_service_id_internal=1646953538912597%3BAfpDQjaPDmMDemT8 by johnbosco :-D

how? how did you find it grin
Programming / Re: Node Js Gurus @nswer This Biko by crunchyDope(m): 1:39pm On Sep 10, 2020
cixak95211:


i think am going to use vs and just do the reload
thanks for the tutorial and the exposure.
Programming / Re: Node Js Gurus @nswer This Biko by crunchyDope(m): 1:37pm On Sep 10, 2020
cixak95211:


It not about being fast the users wont notice. It utilizes what we call 'graceful shutdown'. When you do a hot reload, imagine you have 10 users on yur platform, and 6 have sent a request to login at exactly when you did that reload. A cold reload will kill nginx, and they will recieve an error page.
For A hot reload [because nginx uses master => slave workers]., the master will see that there are 6 pending request, and it will fulfil those requests first. The requests are handled by slaves, Then it will command the slaves to shutdown. Any new request (remember the other 4) will be routed to the new updated application. So in summary, it waits to fulfil any pending request before killing the processes.
Read more on "worker thread and processes". its is very fundamental to building a performant application.
For your local dev, u dont need any hot reload, waste of time. If you cant type npm run this, npm run that all the time
just add shortcuts to ur terminal or console's profile e.g.

A few of mine, i have like hundreds of those literally,
git push origin HEAD --force-with-lease = gpf
npm run start:dev = dev
yarn install = yi

you get the idea, right?

Then use autocomplete for your terminals, so yo dont have to remember even the shortcuts, cos u wil forget after some time.




nice, thanks boss!!!
you re too good!!!
Programming / Re: Node Js Gurus @nswer This Biko by crunchyDope(m): 1:20pm On Sep 10, 2020
cixak95211:


Nah, far from that . . thats for when you're writing codes on ur laptop. As part of your learning, you will venture into something called CI/CD. Pls google the full meaning. simply put, its a workflow that allows for continuous integration. I'll give u a case study of our own flow.
We have 6 servers in AWS and they are always online. Once we make an update to github, it automatically pushes itself to AWS but code is not deployed yet, that's only a staging environment. It gives us a unque environment to test and test. When satisfied, we push to production. I like to do it manually, when am bored and here is what i do.
1. log into server via ssh
2. turn on bastion host, and update it to mirror staging environment, which as the latest update..
3. We use nginx as a reverse proxy server . . . google what a reverse proxy is for claririfcation, it might not make sense tho for now
4. Open nginx config and reroute all traffic to bastion host.
5. Do a hot reload. A hot reload will make sure connections are not dropped, cos users are online, but it will switch all users automatically to the new version. You wont even notice.
6. Update main application.
7. Open nginx config again and reroute all traffic to main app
8. Do a hot reload once more.
9. Shut down bastion host and exit out of ssh server.

For our API, its running under PM2 process manager, and we have a flag called "watching" . . which means when there is a change, it will auto build and deploy itself and do a hot reload. It will do exactly the same thing I listed above but this time automatically. Its a very long story and might not make sense now. But trust me, your time will come.
too rich for my blood..Lol.. u b truly guru!

so its like so {code} => {dummy app} <= {users} {main app}
code => {main app}
users => {main app} <so fast the users wont notice>

wow.. anyways for local host development , no hot reloading?
Programming / Re: Node Js Gurus @nswer This Biko by crunchyDope(m): 1:07pm On Sep 10, 2020
cixak95211:


last question for now boss, if major company like uber and co uses node, how do they handle the service when they want to push an update? like they just ^C twice and npm start?
just even in dev mode it is stressful, n easy solution?
Programming / Re: Node Js Gurus @nswer This Biko by crunchyDope(m): 1:01pm On Sep 10, 2020
cixak95211:


The url in this case, a url to where the application resides, usually localhost, if you are developing
but in production, localhost will bind to the server ip address, which can in turn be bound to a custom domain
so e.g . localhost:4000/api => 34.32.12.XX/api => nairaland.com/api
so using nairaland as an example, if its a microservice, its gonna have at least 2 urls . . it could even be 50 . . but lets stick to the minimum 2
nairaland.com, which is what you will see and type, and that inturn will make a request to e..g. api.nairaland.com or nairaland.co/api [the owner chooses the style they like] . . the 2nd url is the server which responds with required data, and the data is shown to you on your screen
or allows you to do something, eg. login.

thanks so much!!!!
Programming / Re: Node Js Gurus @nswer This Biko by crunchyDope(m): 10:22am On Sep 10, 2020
cixak95211:

which means the app instance is what handles all the url?
Programming / Re: Node Js Gurus @nswer This Biko by crunchyDope(m): 10:20am On Sep 10, 2020
cixak95211:


1. Nodejs is meant for server-side applications . . although you can write a bit of frontend too, using stuffs like hbs and pug. But its primary focus is server-side code. Server side applications dont have that www.example.com/something where it displays a page. Nope!
Yes, they might have a URL, but its more like api.example.com/v1
So you will need a frontend to marry the backend (node js) for a complete application . . Thats what is popularly referred to as a microservice architecture. as against Laravel for instance where both frontend and backend are sitting inside one application, Monolithic architecture.
You can still use Laravel to write APis only, story for another day!

2. This question is now damn funny. Show truly you just started out, No shame in it, brov! As a professional software engineer, you will learn stuffs like "fault tolerance" which means what happens if I'm asleep and my server crashes? who will restart it? A fault tolerant app will restart itself. You will learn stuffs like process management. One good example is PM2. Google it, You will learn a little bit of server adminstration and what it means to deamonize an app [make it a service]. A service will always restart itself as long as it was enabled. Servers in production dont reboot.
They can be online for 1000000 years without rebooting. Even your PC can be online for so long too, but eventually nepa will "take light"
Servers are online 24/7. Google pictures of servers and see for yourself what they look like. And yes, you need to be very good with the terminal too.

One step at a time. Learn javascript first, then node
then a little bit of cloud engineering, which will teach you most stuffs in server administration
Then take a deep dive into building applications that scale, and mission-critical apps . .[app that shoudl nevr go down, even during updates for 1 second]. Good luck.

thanks boss, fully understood.

1 Like

Programming / Node Js Gurus @nswer This Biko by crunchyDope(m): 7:38am On Sep 10, 2020
am just learning node and d whole thing looks like building a car(server) from scratch

question 1

with php u just write your scripts and all link pointing at that direction just works!
like so =>www,example,com/test.php

but would dat work in json node? cos it seems all the coding is done in this app.js file only!

question 2

would i still go the terminal to start the app? in a live server?
is that reliable?
what if the system reboots? hw do i know? isn't dat too much work?

sorry but not sorry for any grammatical errors, English is not my mother's tongue
Politics / Re: Umar Danbatta: Nigerian Active GSM Subscribers Now 199.3 Million by crunchyDope(m): 6:34pm On Sep 01, 2020
nigeria has no data! lies my good sir! where did you get that data? did you remove ppl with up to 4 sims(like myself) . mtcheeew!

13 Likes

Programming / Re: What Is Data Science And Its Application by crunchyDope(m): 1:56pm On Aug 25, 2020
truthfully u just sparked my interest in data science buh i don't know maths, well m riding
Politics / Re: Buhari, Army Silent As US Exposes ISIS, Al-Qaeda Plans To Penetrate The South by crunchyDope(m): 9:04am On Aug 06, 2020
Simbrixton:
u get gun?
if I get i go say yes?
one thing we hate down here is Muslims! so make dem cum!

6 Likes

Politics / Re: Buhari, Army Silent As US Exposes ISIS, Al-Qaeda Plans To Penetrate The South by crunchyDope(m): 9:01am On Aug 06, 2020
the South is not the north!

3 Likes

TV/Movies / Re: Ka3na Stylishly Used Her Leg To Drag Her Shorts After Sex Romp With Praise by crunchyDope(m): 5:04pm On Aug 02, 2020
Jesse25:

Ashawo sad go marry since watching people sleep and have sex is now a full time job
Lol, it's my eyes, my TV, my job and my life! no one can dictate that! bye!
TV/Movies / Re: Ka3na Stylishly Used Her Leg To Drag Her Shorts After Sex Romp With Praise by crunchyDope(m): 6:36pm On Aug 01, 2020
awon hypocrites oya, over to you grin tell us how bbnaija is a waste of tym!


fvcking dictators in the making!

6 Likes 1 Share

Politics / Re: Ikpeazu Hands Over Official Vehicles To Abia State Judiciary Judges (Pics) by crunchyDope(m): 7:09pm On Jul 28, 2020
would these judges ever rule against this Governor?

in Nigeria the Executive = Legislative = Judiciary


even monarchy is better than our government

5 Likes 1 Share

TV/Movies / Re: Bbnaija 2020: Who Is Your Favourite Housemate? by crunchyDope(m): 4:14pm On Jul 22, 2020
neonbash0:


Because of yansh??
Silicon yansh things??
Lol! not just dat, she looks like the whole package (Good, caring, et al)

1 Like

TV/Movies / Re: Bbnaija 2020: Who Is Your Favourite Housemate? by crunchyDope(m): 3:55pm On Jul 22, 2020
Nnegi all d way

3 Likes

Programming / Re: Help On Apple Developer Account by crunchyDope(m): 10:48am On Jul 16, 2020
Sylvaxxl1:
Hi guys, please I need your help on how to purchase apple developer account as a Nigerian cos I've used two banks(access and zenith) but none seems to be work. They (apple) acknowledge my purchase saying they would respond within two working days and afterwards, I don't hear from them even the money remains in the bank. I've emailed them but they reply that there's no payment made by me. Please I need help. I've used those same accounts to purchase Google play developer account and it was successful.
use GT MasterCard
Programming / Re: First Vue Web App deployed to firebase by crunchyDope(m): 6:48pm On Jul 15, 2020
Donpre:
your link isn't clear
copy the link and remove the white spaces
Programming / Re: I Am Having Troubles With PHP by crunchyDope(m): 6:45pm On Jul 15, 2020
CenturyCoder:
Can I please get help, I want to grab all the records in a database, I have about 6 records and I want to grab them and place them in an array


what if it was 20,000 row sir?
Romance / Re: Guys Come In And Tell Us How You Found Out The Lady You Were Dating Was married by crunchyDope(m): 10:29pm On Jun 10, 2020
I called and her husband picked the call, somebody say gbas

Modified:
She can f...kgrin

3 Likes

Programming / Re: Quadratic Equations Calculator Made With Javascript, HTML And CSS by crunchyDope(m): 5:19pm On May 22, 2020
Iamsheye:
So I made this quadratic equations calculator few days ago.
Constructive criticism is always welcome.

Link to code :
https://codepen.io/iamsheye/full/dyYaWMY
nice wink
Programming / Re: Need Someone To Help With My Javascript Code by crunchyDope(m): 12:10am On May 13, 2020
Iamsheye:
Bro don't worry I've solved it already
This your English sef I no understand

Lol!
Programming / Re: Need Someone To Help With My Javascript Code by crunchyDope(m): 9:53pm On May 12, 2020
Iamsheye:
So I've got that code there..
Everything's fine except that when a wrong input(one that is not in the array) is inserted I want it to show what's on line 16 but it doesn't it's just empty

Can someone please help??

why is the line that outputs to the document inside the iteration?

you used the check as a trap and its bin used in every count?
Crime / Re: We Will Rape Your Mothers, Wives And Daughters - Soldiers To Warri Youths (video by crunchyDope(m): 7:30pm On Apr 04, 2020
Bigcowhorn:


Lol, I never thought it was all Igbo and i did tell you so earlier but you overlooked it. Remember I said when you go towards certain areas the language changes

Additionally, you do know Ijaw leaders claim to be Biafrans right?

What I am saying is Delta and Edo or parts of them is Biafa!

grin

Lol, I doubt it , we re Niger deltans

(1) (2) (3) (4) (5) (6) (7) (8) (9) (of 9 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 63
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.