<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: vivian mukhongo (Avivo)</title>
    <description>The latest articles on DEV Community by vivian mukhongo (Avivo) (@vivian23).</description>
    <link>https://dev.to/vivian23</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1863593%2F18938bef-b213-4bfa-9a86-3c1482a62dc0.jpeg</url>
      <title>DEV Community: vivian mukhongo (Avivo)</title>
      <link>https://dev.to/vivian23</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vivian23"/>
    <language>en</language>
    <item>
      <title>Sessions or JWTs? Why I picked server-side sessions for a 1,000-member platform</title>
      <dc:creator>vivian mukhongo (Avivo)</dc:creator>
      <pubDate>Sun, 29 Nov 2026 07:06:23 +0000</pubDate>
      <link>https://dev.to/vivian23/sessions-or-jwts-why-i-picked-server-side-sessions-for-a-1000-member-platform-4oog</link>
      <guid>https://dev.to/vivian23/sessions-or-jwts-why-i-picked-server-side-sessions-for-a-1000-member-platform-4oog</guid>
      <description>&lt;p&gt;I'm building a member platform for a university Christian Union with the &lt;strong&gt;MERN&lt;/strong&gt; stack. Members sign in, and leaders post announcements, approve events and mark attendance. Early on I had to choose between a sessioned site (the server remembers you) and a sessionless one (the client carries a signed token). Here is how I decided, and what I learned about speed along the way.&lt;/p&gt;

&lt;h2&gt;
  
  
  The two models in one minute
&lt;/h2&gt;

&lt;p&gt;With sessions, the server stores your login state and gives you a session ID to present on later requests. With JWTs, the token is self-contained and needs no server-side storage. &lt;/p&gt;

&lt;h2&gt;
  
  
  What each one costs you
&lt;/h2&gt;

&lt;p&gt;Sessions cost a lookup. Every request needs a session-store lookup, and the cookie stays small, around 32 bytes versus 800+ for a JWT. With several servers, all of them must share the same store. &lt;br&gt;
JWTs cost control. Any server can verify a JWT on its own, so scaling is easy. But revoking one is difficult without a blocklist. Once you add logout, revocation and risk controls, JWT stops being fully stateless. &lt;/p&gt;

&lt;p&gt;They fail differently. Sessions tend to crack first around coordination of shared state; tokens fail in other ways, around expiry and revocation. &lt;br&gt;
loginradius&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I chose sessions
&lt;/h2&gt;

&lt;p&gt;Access has to stop the moment a role ends. In a union, a leader's term ends or an admin removes a role. Deleting a session from the store invalidates it immediately. A JWT would keep working until it expires. &lt;br&gt;
The scale doesn't need statelessness. I expect 1,000 to 2,000 members on one backend. The classic reasons to go sessionless (microservices, multi-client APIs, mobile apps) don't apply to me. &lt;br&gt;
The speed cost is small. I already run Redis for queues and rate limiting. One reported figure is about 1ms for a Redis check per request, in exchange for instant revocation. Measure that on your own setup rather than trusting any single number. &lt;br&gt;
hackernoon&lt;br&gt;
Sockets and background jobs can reuse it. The same session cookie authenticates my real-time connection, so I don't build a second auth system.&lt;/p&gt;

&lt;h3&gt;
  
  
  Making sessions fast
&lt;/h3&gt;

&lt;p&gt;Keep session data tiny. I store only the user ID and look up roles when needed.&lt;br&gt;
Use Redis, never the database, for session storage.&lt;br&gt;
Set a sensible expiry so abandoned sessions clear themselves.&lt;br&gt;
Cache only public reads (events, ministries). Don't cache per-user data in the same layer.&lt;br&gt;
Use httpOnly, sameSite and secure cookies. This blocks browser scripts from reading the session.&lt;br&gt;
Measure p95 latency before and after any change.&lt;/p&gt;

&lt;h3&gt;
  
  
  When I'd go sessionless
&lt;/h3&gt;

&lt;p&gt;If I later add a mobile app, third-party API clients or multiple services, I'd use short-lived tokens plus a server-side refresh token. Short expiry limits the damage from a stolen token. The refresh token can be stored server-side, which gives you revocation for that token. In practice, many production systems end up as a hybrid. &lt;/p&gt;

&lt;h2&gt;
  
  
  The takeaway
&lt;/h2&gt;

&lt;p&gt;Neither model is "the modern one." Sessions give control; tokens give portability. Pick based on what you must be able to switch off instantly, and how many servers you really run.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Next I'm adding email verification and abuse-path tests. What would you test first on an auth system?&lt;/em&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>ai</category>
      <category>webdev</category>
      <category>security</category>
    </item>
    <item>
      <title>INSIGHTS FROM PROJECT 1 OF THE DATA SCIENCE BOOTCAMP</title>
      <dc:creator>vivian mukhongo (Avivo)</dc:creator>
      <pubDate>Sat, 03 Aug 2024 16:03:15 +0000</pubDate>
      <link>https://dev.to/vivian23/insights-from-project-1-of-the-data-science-bootcamp-5188</link>
      <guid>https://dev.to/vivian23/insights-from-project-1-of-the-data-science-bootcamp-5188</guid>
      <description>&lt;p&gt;I am so thrilled to dive into this five week boot camp by Lux Tech Academy&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;WEEK 1 PROJECT 1 PART 1&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A weather dataset was provided and requested to write a python code to answer questions regarding the same.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;STEPS USED&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;In Jupyter Notebook I imported the pandas and numpy libraries&lt;/li&gt;
&lt;li&gt;- 2. - loaded the csv file and started cleaning the data&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  ** DATA CLEANING**
&lt;/h2&gt;

&lt;p&gt;checking for the structure of the dataframe&lt;br&gt;
     1. df.head() - to check for the first rows&lt;br&gt;
     2. df.tail() - to check for the last rows&lt;br&gt;
     3. df.shape() - checks for the number of rows and columns&lt;br&gt;
     4. df.info() - checking for the general information about the dataset&lt;br&gt;
     5. df.dtypes - checks for the data types used in the columns&lt;br&gt;
     6. df.isna()- checked for the missing values in the dataset.&lt;br&gt;
&lt;strong&gt;I WENT AHEAD AND ANSWERED THE QUESTIONS ASKED USING THE FUNCTIONS BELOW&lt;/strong&gt;&lt;br&gt;
Len()- used to determine the size or length of various data structures.&lt;br&gt;
Considering my code this function has been widely used especially in cases where the number of records for certain values was asked.&lt;/p&gt;

&lt;p&gt;print() -used to output a specified message. I used this function to make increase the readability  of the output.&lt;br&gt;
df.rename()- used to rename labels, columns or index of a dataframe&lt;br&gt;
I renamed the column 'weather' to 'Weather_Conditions' using the syntax below&lt;br&gt;
&lt;strong&gt;_df.rename(columns={Weather:Weather_Conditions}Inplace=True) _&lt;/strong&gt;&lt;br&gt;
Mean() - used to calculate the average value of numeric columns in a dataframe.&lt;br&gt;
groupby()- used when you need to perform an operation of your data defined by unique values in one or more columns.&lt;/p&gt;

&lt;p&gt;From the above analysis, I understood that in the realm of data analysis, understanding and utilizing the right tools and techniques is crucial for extracting meaningful insights from datasets&lt;/p&gt;

&lt;h2&gt;
  
  
  PART TWO:SQL CODE
&lt;/h2&gt;

&lt;p&gt;I used the microsoft sql management studio&lt;br&gt;
where I learnt how to connect the database with the local host and the steps for importing a csv file into the database for analysis. &lt;br&gt;
Here, I explored the use of Select....From and WHERE Clause in SQL&lt;/p&gt;

&lt;p&gt;Though I am a beginner in the field I anticipate to learn more and use a wide range of python and sql applications in the industry!&lt;br&gt;
I am so excited to be in the Data industry!&lt;/p&gt;

</description>
      <category>database</category>
      <category>machinelearning</category>
      <category>datascience</category>
      <category>github</category>
    </item>
  </channel>
</rss>
