Electronic
Electronic
KPCKevin Powell - Community
Created by Electronic on 7/19/2024 in #back-end
Consistent Hashing
What's the best way to implement consistent hashing in a database that doesn't have this feature by default, in my setup I have a bunch of nodes in a zookeeper path and when I retrieve all the nodes i hash a key and decide which node to place a user own, should my consistent hashing algorithm exist in my application code? And how I go about remapping the keys in the db
5 replies
KPCKevin Powell - Community
Created by Electronic on 7/12/2024 in #back-end
Java NIO
I've been learning about network programming and tho I understand thread per connection so easily I'm having trouble with java selector and register event loop way in NIO, particular reading when I key file descriptor that is ready to read do I just read till I get my protocol termination line e.g. /r/n/r/n in http, but I'm reading it might not always be available how do you read then pause and come back for a post request for example that has a large binary after the request how is this achieved
2 replies
KPCKevin Powell - Community
Created by Electronic on 4/1/2024 in #back-end
Micro Service Load Balancer
Been working on building micro services and I understand how scaling is aided through load balancers, the question is how can load balancers themselves be scaled, let's say a billion users for example they can't all go through same load balancer, so where can load balancers be scaled for users to connect to different load balancers per say, is that doable, or is the solution just a bigger load balancer
7 replies
KPCKevin Powell - Community
Created by Electronic on 1/14/2024 in #back-end
Django
I started out with Django recently coming from node and I've searched for Django listening architecture and haven't found any, I would just like to know how Django listens to requests and if it's blocking, cause i read somewhere that WSGI deploys workers to interface with the python code but to this threads just wait to return responses even if it's io bound and if we have 4 workers and 4 io operations holding each, does the server reject incoming requests or store them in a queue
2 replies
KPCKevin Powell - Community
Created by Electronic on 7/9/2023 in #back-end
Http Requests
Is the number of threads used to listen to http requests controlled by the developer I've been using node and I know that's single threaded, is that always the case where a single threads listens for requests or do some languages allow different threads listen to requests before handing over to handlers
14 replies
KPCKevin Powell - Community
Created by Electronic on 4/23/2023 in #back-end
image
Procedure to send an image (download) via a node API, do I create read stream and pipe it to the front and if yes what gets sent from that binary, base64 string, array buffers?
6 replies
KPCKevin Powell - Community
Created by Electronic on 3/25/2023 in #front-end
fetch
I'm aware fetch has a getReader within it's response for handling streams but can I append chunks of mp3 data into some html audio file to achieve Audio buffering before play (so I can play the audio before it's fully loaded) kind of like SoundCloud and what YouTube does with video... I tried with Audio type didn't work any other web audio things to achieve this?
1 replies
KPCKevin Powell - Community
Created by Electronic on 3/13/2023 in #front-end
React and JWT
I'm used to the normal vanilla way of having a cookie go with every request and authenticated and a page is sent back...am using react how can this be achieved, if after a login I use Context API, even though my token is still in cookie the auth state defaults back to false after refresh, storing in local storage isn't advisable..my question is how can I achieve protected routes with react even after page refresh
1 replies
KPCKevin Powell - Community
Created by Electronic on 3/5/2023 in #back-end
paginated
This a simple one just confused, in making paginated APIs how do I know where to add the next property so the frontend developer knows it has a next page...how do I check where the next is going to be a + 1 or it's going to be null, in a database,
10 replies
KPCKevin Powell - Community
Created by Electronic on 3/2/2023 in #back-end
Streams
Am using express I want to read a file using readStream in express and send to the frontend each time a buffer is ready...I want to know how to get the data on the frontend for each buffer, not waiting till all is fetched and combined into one response, it's music data with each response can I add to audio src html type to create some sort of streaming experience, is this possible? A good resources (video preferably) would be nice I've searched
13 replies
KPCKevin Powell - Community
Created by Electronic on 1/14/2023 in #ui-ux
Remarks
Am not a UI/UX designer, I've been working and don't have a portfolio decided to make one at least 50% is done so this is more of a template any things to change before I even go deep in it
13 replies
KPCKevin Powell - Community
Created by Electronic on 11/17/2022 in #back-end
Fingerprint
Has anyone worked on a web based fingerprint authentication and what languages (excluding the C brothers) were used and how does the implementation go about
1 replies