โŒ

Normal view

There are new articles available, click to refresh the page.
Today โ€” 21 November 2024Main stream

IRC โ€“ My Understanding V2.0

By: Sugirtha
21 November 2024 at 10:47

What is plaintext in my point of view:
Its simply text without any makeup or add-on, it is just an organic content. For example,

  • A handwritten grocery list what our mother used to give to our father
  • A To-Do List
  • An essay/composition writing in our school days

Why plaintext is important?
โ€“ The quality of the content only going to get score here: there is no marketing by giving some beautification or formats.
โ€“ Less storage
โ€“ Ideal for long term data storage because Cross-Platform Compatibility
โ€“ Universal Accessibility. Many s/w using plain text for configuration files (.ini, .conf, .json)
โ€“ Data interchange (.csv โ€“ interchange data into databases or spreadsheet application)
โ€“ Command line environments, even in cryptography.
โ€“ Batch Processing: Many batch processes use plain text files to define lists of actions or tasks that need to be executed in a batch mode, such as renaming files, converting data formats, or running programs.

So plain text is simple, powerful and something special we have no doubt about it.

What is IRC?
IRC โ€“ Internet Relay Chat is a plain text based real time communication System over the internet for one-on-one chat, group chat, online community โ€“ making it ideal for discussion.

Itโ€™s a popular network for free and open-source software (FOSS) projects and developers in olden days. Ex. many large projects (like Debian, Arch Linux, GNOME, and Python) discussion used. Nowadays also IRC is using by many communities.

Usage :
Mainly a discussion chat forum for open-source software developers, technology, and hobbyist communities.

Why IRC?
Already we have so many chat platforms which are very advanced and I could use multimedia also there. So this is very basic, right?

Yes it is very basic, but the infrastructure of this IRC is not like other chat platforms. In my point of view the important differences are privacy and decentralized.

Advantages over other Chat Platforms:

  • No Ads Or Popups: We are not distracted from other ads or popups because my information are not passed to any company to track my needs and give marketing.
  • Privacy: Many IRC networks does not need your email or mobile number or even registration. Simply you can type your name or nick name, select your server and start chat instantly. Chat Logs also getting stored if required.
  • Open Source and Free: Server, Client โ€“ the entire networking model is free and open source. Anybody can install the IRC servers/clients and connect with the network.
  • Decentralized : As servers are decentralized, it could able to work even one server has some issues and it is down. Users can connect to different servers within the same network which is improving reliability and performance.
  • Low Latency: Its a free real time communication system with low latency which is very important for technical communities and time sensitive conversations.
  • Customization and Extensibility: Custom scripts can be written to enhance functionality and IRC supports automation through bots which can record chats, sending notification or moderating channels, etc.
  • Channel Control: Channel Operators (Group Admin) have fine control over the users like who can join, who can be kicked off.
  • Light Weight Tool: As its light weight no high end hardware required. IRC can be accessed from even older computers or even low powered devices like Rasberry Pi.
  • History and Logging: Some IRC Servers allow logging of chats through bots or in local storage.

Inventor
IRC is developed by Jarkko Oikarinen (Finland) in 1988.

Some IRC networks/Servers:
Libera.Chat(#ubuntu, #debian, #python, #opensource)
EFNet-Eris Free Network (#linux, #python, #hackers)
IRCnet(#linux, #chat, #help)
Undernet(#help, #anime, #music)
QuakeNet (#quake, #gamers, #techsupport)
DALnet- for both casual users and larger communities (#tech, #gaming, #music)

Some Clients-GUI
HexChat (Linux, macOS, Windows)
Pidgin (Linux, Windows)
KVIrc (Linux, Windows, macOS)

Some IRC Clients for CLI (Command Line Interface) :
WeeChat
Irssi

IRC Clients for Mobile :
Goguma
Colloquy (iOS)
LimeChat (iOS)
Quassel IRC (via Quassel Core) (Android)
AndroIRC (Android)

Directly on the Website โ€“ Libera WebClient โ€“ https://web.libera.chat/gamja/You can click Join, then type the channel name (Group) (Ex. #kaniyam)

How to get Connected with IRC:
After installed the IRC client, open.
Add a new network (e.g., โ€œLibera.Chatโ€).
Set the server to irc.libera.chat (or any of the alternate servers above).
Optionally, you can specify a port (default is 6667 for non-SSL, 6697 for SSL).
Join a channel like #ubuntu, #python, or #freenode-migrants once youโ€™re connected.

Popular channels to join on libera chat:
#ubuntu, #debian, #python, #opensource, #kaniyam

Local Logs:
Logs are typically saved in plain text and can be stored locally, allowing you to review past conversations.
How to get local logs from our System (IRC libera.chat Server)
folders โ€“ /home//.local/share/weechat/logs/ From Web-IRCBot History:
https://ircbot.comm-central.org:8080/

References:
https://kaniyam.com/what-is-irc-an-introduction/
https://www.youtube.com/watch?v=CGurYNb0BM8

Our daily meetings :
You can install IRC client, with the above link help, can join.
Timings : IST 8pm-9pm
Server : libera.chat
Channel : #kaniyam

ALL ARE WELCOME TO JOIN, DISCUSS and GROW

Before yesterdayMain stream

POC : Tamil Date parser using parse

By: Hariharan
15 November 2024 at 18:05

Tamil Date time parser POC
https://github.com/r1chardj0n3s/parse

it requires external dependency parse for parsing the python string format with placeholders

import parse
from date import TA_MONTHS
from date import datetime
//POC of tamil date time parser
def strptime(format='{month}, {date} {year}',date_string ="เฎจเฎตเฎฎเฏเฎชเฎฐเฏ, 16 2024"):        
    parsed = parse.parse(format,date_string)
    month = TA_MONTHS.index(parsed['month'])+1
    date = int(parsed['date'])
    year = int(parsed['year'])
    return datetime(year,month,date)

print(strptime("{date}-{month}-{year}","16-เฎจเฎตเฎฎเฏเฎชเฎฐเฏ-2024"))
#dt = datetime(2024,11,16);
# print(dt.strptime_ta("เฎจเฎตเฎฎเฏเฎชเฎฐเฏ , 16 2024","%m %d %Y"))

Basic Linux Commands

By: Ragul.M
15 November 2024 at 14:25

Hi folks , welcome to my blog. Here we are going to see some basic and important commands of linux.

One of the most distinctive features of Linux is its command-line interface (CLI). Knowing a few basic commands can unlock many possibilities in Linux.
Essential Commands
Here are some fundamental commands to get you started:
ls - Lists files and directories in the current directory.

ls

cd - Changes to a different directory.

cd /home/user/Documents

pwd - Prints the current working directory.

pwd

cp - Copies files or directories.

cp file1.txt /home/user/backup/

mv - Moves or renames files or directories.

mv file1.txt file2.txt

rm - Removes files or directories.

rm file1.txt

mkdir - Creates a new directory.

mkdir new_folder

touch - Creates a new empty file.

touch newfile.txt

cat - Displays the contents of a file.

cat file1.txt

nano or vim - Opens a file in the text editor.

nano file1.txt

chmod - Changes file permissions.

chmod 755 file1.txt

ps - Displays active processes.

ps

kill - Terminates a process.

kill [PID]

Each command is powerful on its own, and combining them enables you to manage your files and system effectively.We can see more about some basics and interesting things about linux in further upcoming blogs which I will be posting.

Follow for more and happy learning :)

Linux basics for beginners

By: Ragul.M
14 November 2024 at 16:04

Introduction:
Linux is one of the most powerful and widely-used operating systems in the world, found everywhere from mobile devices to high-powered servers. Known for its stability, security, and open-source nature, Linux is an essential skill for anyone interested in IT, programming, or system administration.
In this blog , we are going to see What is linux and Why choose linux.

1) What is linux
Linux is an open-source operating system that was first introduced by Linus Torvalds in 1991. Built on a Unix-based foundation, Linux is community-driven, meaning anyone can view, modify, and contribute to its code. This collaborative approach has led to the creation of various Linux distributions, or "distros," each tailored to different types of users and use cases. Some of the most popular Linux distributions are:

  • Ubuntu: Known for its user-friendly interface, great for beginners.
  • Fedora: A cutting-edge distro with the latest software versions, popular with developers.
  • CentOS: Stable and widely used in enterprise environments. Each distribution may look and function slightly differently, but they all share the same core Linux features.

2) Why choose linux
Linux is favored for many reasons, including its:

  1. Stability: Linux is well-known for running smoothly without crashing, even in demanding environments.
  2. Security: Its open-source nature allows the community to detect and fix vulnerabilities quickly, making it highly secure.
  3. Customizability: Users have complete control to modify and customize their system.
  4. Performance: Linux is efficient, allowing it to run on a wide range of devices, from servers to small IoT devices.

Conclusion
Learning Linux basics is the first step to becoming proficient in an operating system that powers much of the digital world. We can see more about some basics and interesting things about linux in further upcoming blogs which I will be posting.

Follow for more and happy learning :)

Weekly Notes 44 โ€“ 2024

5 November 2024 at 04:20

  • For the past few months, I was preparing for an English Exam called CELPIP. It is an exam to check the Listening, Reading, Writing and Speaking. Though we know English, preparing for an exam is an exhausting one. We took online training from โ€œGalaxy Training Academyโ€œ. https://galaxytraining.in The coach โ€œJay Kumarโ€ gave nice intro about exam pattern. He gave many mock tests and gave good feedback on how to improve, on each test. Last month, Nithya and I cleared the exam. It is a good feel to released from exam fear. Postponed many activities because of the exam preparation. Will roll out them all soon. If you are preparing for any English Exam, I suggest taking training and mock tests with โ€œGalaxy Training Academyโ€.

    โ€”โ€”

  • In Canada, Daylight saving ended yesterday. This happens every year in fall season and referred as โ€œFallbackโ€. The clocks are moved one hour back. This is to adjust the dark winter season. It seems like all in a sudden, we got one hour extra to sleep in morning. ๐Ÿ™‚

    โ€”โ€”

  • On Oct 31, we had Deepavali, Halloween and our Marriage day. Deepavali day went with great remembering our childhood memories. The evening was filled with fun, as we went to neighbourhood houses, with friends and kids, to play โ€œTrick or Treatโ€. Saw many weird, spooky decorated houses and people. Kids collected a bag full of chocolates. Last year, it was too cold. This year, the same day had a nice weather, to roam around in the evening.

    โ€”โ€”

  • On Nov 1, we celebrated Deepavali with firing crackers. Bought a few crackers, which emit light. Here, we donโ€™t get loud-full crackers like atom bombs, 1000 piece fireworks shots etc. With limited available crackers, kids enjoyed firing them, with all their friends together.

    โ€”โ€”

  • On Nov 8, we are planning for a mega Deepavali event with around 250 people here. I am contributing on the planning/photography. Nithya and kids are practicing dance with their friends. Hope it will be a fun-filled evening.


    โ€”โ€”

  • On Nov 2, gave a talk on tolkappiyam Canada monthly meeting, about our efforts on writing python code for tamil grammar rules in Tolkappiyam book. It was a good meeting. Few of the participants accepted to collaborate. You can read our progress here โ€“ https://github.com/KaniyamFoundation/ProjectIdeas/issues/214


    โ€”โ€”

  • Few weeks ago, gave a talk on open-tamil python library, at Kanchi Linux Users Group ( KanchiLUG) meet. Video is here โ€“ https://www.youtube.com/watch?v=GtIrbvw2V-w


    โ€”โ€”

  • Kids started going to tamil school on every Saturday morning. This week, they received books. Viyan is good at Tamil and English. Iyal started to read Tamil and English. Paari is trying to learn writing.

    โ€”โ€”

  • We conduct daily meetings in a text based chat system called IRC (Internet Relay Chat). daily, 7-8 pm IST. Good to see many people are joining and discussing many things about open source software and mentoring to contribute to open source software. More details here โ€“ https://goinggnu.wordpress.com/2024/10/21/open-source-projects-mentoring-via-irc/

    โ€”โ€”

  • Practicing Manual mode in photography for few weeks. Feeling like learning linux and Emacs. It gives the most flexible options and results are stunning. It is better to learn it in early days, so that we can do more magics with lighting.


    โ€”โ€”


    The one thing I follow in photography is โ€“ shoot a lot, share a little. I keep and share only 10%. All others are deleted. Though it is hard to select the best photos, sharing only 10% is easy for viewers and brings a Wow from them.


    โ€”โ€”
  • Completed reading books in last week.
    • เฎตเฎพเฎฒเฎฟเฎช เฎตเฎพเฎฐเฏเฎคเฏเฎคเฏˆเฎ•เฎณเฏ: vaaliba vaarthaigal โ€“ book about poet Vaali โ€“ https://www.amazon.in/gp/product/B08F3KGF1B
    • เฎŽเฎดเฏเฎคเฏเฎคเฎฒเฏ เฎชเฎฑเฏเฎฑเฎฟเฎฏ เฎ•เฏเฎฑเฎฟเฎชเฏเฎชเฏเฎ•เฎณเฏ: (Art of Writing) โ€“ https://www.amazon.in/-/ta/dp/B09XHZYGZD kombu muLaithavan:
    • เฎ•เฏŠเฎฎเฏเฎชเฏ เฎฎเฏเฎณเฏˆเฎคเฏเฎคเฎตเฎฉเฏ โ€“ https://www.amazon.in/-/ta/dp/B07YJ4PJQK

      โ€”โ€”


  • currently reading these books.

Weekly Notes 44 โ€“ 2024

5 November 2024 at 04:20

  • For the past few months, I was preparing for an English Exam called CELPIP. It is an exam to check the Listening, Reading, Writing and Speaking. Though we know English, preparing for an exam is an exhausting one. We took online training from โ€œGalaxy Training Academyโ€œ. https://galaxytraining.in The coach โ€œJay Kumarโ€ gave nice intro about exam pattern. He gave many mock tests and gave good feedback on how to improve, on each test. Last month, Nithya and I cleared the exam. It is a good feel to released from exam fear. Postponed many activities because of the exam preparation. Will roll out them all soon. If you are preparing for any English Exam, I suggest taking training and mock tests with โ€œGalaxy Training Academyโ€.

    โ€”โ€”

  • In Canada, Daylight saving ended yesterday. This happens every year in fall season and referred as โ€œFallbackโ€. The clocks are moved one hour back. This is to adjust the dark winter season. It seems like all in a sudden, we got one hour extra to sleep in morning. ๐Ÿ™‚

    โ€”โ€”

  • On Oct 31, we had Deepavali, Halloween and our Marriage day. Deepavali day went with great remembering our childhood memories. The evening was filled with fun, as we went to neighbourhood houses, with friends and kids, to play โ€œTrick or Treatโ€. Saw many weird, spooky decorated houses and people. Kids collected a bag full of chocolates. Last year, it was too cold. This year, the same day had a nice weather, to roam around in the evening.

    โ€”โ€”

  • On Nov 1, we celebrated Deepavali with firing crackers. Bought a few crackers, which emit light. Here, we donโ€™t get loud-full crackers like atom bombs, 1000 piece fireworks shots etc. With limited available crackers, kids enjoyed firing them, with all their friends together.

    โ€”โ€”

  • On Nov 8, we are planning for a mega Deepavali event with around 250 people here. I am contributing on the planning/photography. Nithya and kids are practicing dance with their friends. Hope it will be a fun-filled evening.


    โ€”โ€”

  • On Nov 2, gave a talk on tolkappiyam Canada monthly meeting, about our efforts on writing python code for tamil grammar rules in Tolkappiyam book. It was a good meeting. Few of the participants accepted to collaborate. You can read our progress here โ€“ https://github.com/KaniyamFoundation/ProjectIdeas/issues/214


    โ€”โ€”

  • Few weeks ago, gave a talk on open-tamil python library, at Kanchi Linux Users Group ( KanchiLUG) meet. Video is here โ€“ https://www.youtube.com/watch?v=GtIrbvw2V-w


    โ€”โ€”

  • Kids started going to tamil school on every Saturday morning. This week, they received books. Viyan is good at Tamil and English. Iyal started to read Tamil and English. Paari is trying to learn writing.

    โ€”โ€”

  • We conduct daily meetings in a text based chat system called IRC (Internet Relay Chat). daily, 7-8 pm IST. Good to see many people are joining and discussing many things about open source software and mentoring to contribute to open source software. More details here โ€“ https://goinggnu.wordpress.com/2024/10/21/open-source-projects-mentoring-via-irc/

    โ€”โ€”

  • Practicing Manual mode in photography for few weeks. Feeling like learning linux and Emacs. It gives the most flexible options and results are stunning. It is better to learn it in early days, so that we can do more magics with lighting.


    โ€”โ€”


    The one thing I follow in photography is โ€“ shoot a lot, share a little. I keep and share only 10%. All others are deleted. Though it is hard to select the best photos, sharing only 10% is easy for viewers and brings a Wow from them.


    โ€”โ€”
  • Completed reading books in last week.
    • เฎตเฎพเฎฒเฎฟเฎช เฎตเฎพเฎฐเฏเฎคเฏเฎคเฏˆเฎ•เฎณเฏ: vaaliba vaarthaigal โ€“ book about poet Vaali โ€“ https://www.amazon.in/gp/product/B08F3KGF1B
    • เฎŽเฎดเฏเฎคเฏเฎคเฎฒเฏ เฎชเฎฑเฏเฎฑเฎฟเฎฏ เฎ•เฏเฎฑเฎฟเฎชเฏเฎชเฏเฎ•เฎณเฏ: (Art of Writing) โ€“ https://www.amazon.in/-/ta/dp/B09XHZYGZD kombu muLaithavan:
    • เฎ•เฏŠเฎฎเฏเฎชเฏ เฎฎเฏเฎณเฏˆเฎคเฏเฎคเฎตเฎฉเฏ โ€“ https://www.amazon.in/-/ta/dp/B07YJ4PJQK

      โ€”โ€”


  • currently reading these books.

Open Source projects mentoring via IRC

21 October 2024 at 02:46

In the programming world, if you say as โ€˜ I prefer watching videos, than reading docsโ€™ it means you are a programmer already or you wonโ€™t become a programmer.

Do you feel that you are struggling to be a good programmer, even after watching 100s of hours of videos?

Let me share one secret. It is the fear of reading and writing PlainText. The more you go away from reading and writing, programming will go away from you.

Programming is all about dealing with the code, error messages, log files, documentation. All in PlainText. We have emails, tickets, docs, reports too there on the stack of IT life.

If you love terminal and PlainText tools, you are already into reading and writing. The more you read and write, the more you can get clarity in thinking, which is the essential part of programming.

To embrace the simplicity and powers of PlainText, few friends started to discuss in IRC. yes, the same 40+ years old Internet Relay Chat, an chat system which built the internet itself via chat.

Thanks to Indian Linux Users Group, Chennai, KanchiLUG, Kaniyam Foundation friends for joining the chat.

Read my post on why I like IRC here https://goinggnu.wordpress.com/2020/04/14/why-i-like-irc-internet-relay-chat-even-in-2020/

Here is small video in Tamil by my friend Muthuramalingam of Payilagam โ€“ https://www.youtube.com/watch?v=CGurYNb0BM8

From today, 7-8 IST evenings, we can discuss at channel at irc.libera.chat

I suggest a terminal based chat client โ€œweechatโ€

But, for a quick connection, use this link to join and discuss. https://web.libera.chat/gamja/#kaniyam

Start Date โ€“ 21 Oct 2024 ( Monday to Friday )
Time โ€“ 7-8 pm IST
server โ€“ irc.libera.chat
channel โ€“

read the chat logs here โ€“ https://ircbot.comm-central.org:8080/kaniyam

join and say something about you.

  • feel like a hacker by chatting with people in your linux terminal
  • get mentored on hactoberfest
  • ask any questions on linux/python/programming/devops
  • share your daily progress on learning and programming
  • practice reading and writing PlainText
  • learn slowly and strongly

See you at IRC.

If you are interested in mentoring students for open source projects, please join and start the discussions.

The other interesting channels that people chat are #ubuntuย  you can join there and participate on the discussions anytime.

IRC โ€“ Internet Relay Chat

By: Sugirtha
12 October 2024 at 12:58

What is IRC?

IRC stands for Internet Relay Chat. Its simply text messaging service (real time online communication service) and even with hundreds of people at once in fractions of a second messages are getting shared.

  • Actually it is a protocol for real-time text messaging created. It is mainly used for group discussion between the like minded people in chat rooms called โ€œchannelsโ€ (Ex. #Kaniyam) although it supports private messages between two users.
  • Mainly this is used in lots of open source community knowledge share โ€“ Ex. If you want to chat with a developer from linux, firefox etc.
  • The Chat Process works on a client-server networking model.

Wait! Wait!! Is it a Protocol or Chat App?

Its a Protocol which is implemented in client server for the text chat. WeeChat is one of the terminal application for IRC client and Pidgin is one of the Desktop client app.

Founder & Year :

IRC was developed in 1988 by Jakko Oikarinen in Finland

Merits/Advantages :

Simplicity : IRC is a simple, text-based environment for communication, without the multimedia features of other platforms.ย 

Community building : IRC is ideal for interest-based or topic-based chat rooms, and is designed to foster a sense of community

Decentralized : IRC isnโ€™t controlled by a single company, so anyone can set up their own server and network.ย 

Privacy : Users can control their privacy with access levels, invitation-only channels, and one-on-one messaging.ย 

Accessibility : IRC is accessible across various platforms, including desktop, laptop, and mobile devices.

Speed : IRC is a good option for fast text-based chat apps with a geographically distributed user-base, as it has low latency and can transmit large amounts of data quickly. (Simply its all texts โ€“ so speed is high).

Flexibility : IRC can be used for a variety of purposes, from critical operations to gaming discussions.ย 

File sharing : IRC clients can be used to create file servers and share files with other users.ย 

Everything is Fine, But already we have so many Apps for Chats, Why IRC?

So many People have so many answers, but according to me,

Reading is a Best Habit compares to watching video (unless it is necessary). It will increase our imagination capacity. Imagination is the key factor for our more technologies and inventions.

Environmental friendly โ€“ We are making so much of carbon footprints everyday. A carbon footprint is the total amount of greenhouse gases (including carbon dioxide and methane) that are generated by our actions.

We are wasting so much of energy (electricity and other resources) while sharing tons of files or images or videos everyday.

I am not asking you to stop watching TV or using internet etcโ€ฆ

Why donโ€™t you contribute to our Mother Earth at least by doing this simple help.

I want to Know More about IRC :

Thanks Note: My sincere Thanks to our Professor Mr. MuthuRamaLingam and Mr. Shrini

Open Source projects mentoring via IRC

21 October 2024 at 02:46

In the programming world, if you say as โ€˜ I prefer watching videos, than reading docsโ€™ it means you are a programmer already or you wonโ€™t become a programmer.

Do you feel that you are struggling to be a good programmer, even after watching 100s of hours of videos?

Let me share one secret. It is the fear of reading and writing PlainText. The more you go away from reading and writing, programming will go away from you.

Programming is all about dealing with the code, error messages, log files, documentation. All in PlainText. We have emails, tickets, docs, reports too there on the stack of IT life.

If you love terminal and PlainText tools, you are already into reading and writing. The more you read and write, the more you can get clarity in thinking, which is the essential part of programming.

To embrace the simplicity and powers of PlainText, few friends started to discuss in IRC. yes, the same 40+ years old Internet Relay Chat, an chat system which built the internet itself via chat.

Thanks to Indian Linux Users Group, Chennai, KanchiLUG, Kaniyam Foundation friends for joining the chat.

Read my post on why I like IRC here https://goinggnu.wordpress.com/2020/04/14/why-i-like-irc-internet-relay-chat-even-in-2020/

Here is small video in Tamil by my friend Muthuramalingam of Payilagam โ€“ https://www.youtube.com/watch?v=CGurYNb0BM8

From today, 7-8 IST evenings, we can discuss at #kaniyam channel at irc.libera.chat

I suggest a terminal based chat client โ€œweechatโ€

But, for a quick connection, use this link to join and discuss. https://web.libera.chat/gamja/#kaniyam

Start Date โ€“ 21 Oct 2024 ( Monday to Friday )
Time โ€“ 7-8 pm IST
server โ€“ irc.libera.chat
channel โ€“ #kaniyam

read the chat logs here โ€“ https://ircbot.comm-central.org:8080/kaniyam

join and say something about you.

  • feel like a hacker by chatting with people in your linux terminal
  • get mentored on hactoberfest
  • ask any questions on linux/python/programming/devops
  • share your daily progress on learning and programming
  • practice reading and writing PlainText
  • learn slowly and strongly

See you at IRC.

If you are interested in mentoring students for open source projects, please join and start the discussions.

The other interesting channels that people chat are #ilugc #dgplug #emacs #kde #ubuntuย  you can join there and participate on the discussions anytime.

Why I like IRC โ€“ Internet Relay Chat โ€“ even in 2020?

14 April 2020 at 08:03

IRC โ€“ Internet Relay Chat โ€“ is a text based chat program. The 2k kids may compare this to slack, telegram chat, whatapp chat or any other instant messaging.

IRC was created by Jarkko Oikarinen in August 1988. Wow. Too old, Right?

Why it is not famous nowadays? People are telling that there are many cons compared to modern instant messaging.

These cons are real Pros of IRC. They are not bugs. They are the intended features.

Are you hearing the word IRC for the first time? Here is a quick beginners guide

https://www.whoishostingthis.com/resources/irc-primer/

IRC is only Text Based Chat.

Yes. You can not add any image or video. Few servers accept file uploads. Still Text is the only preferred way of communication in IRC. Why?

  • Plain Text is the God of content, always.
  • It is searchable.
  • Anyone can read faster
  • Watching a one hour video will talk one hour time. Reading its transcription will take quarter of its time.
  • On server side maintenance, it will be great headache to keep on adding the storage to keep all the images, files, videos. Ask the admins, who manages RocketChat, Mattermost, Mastodon Instances. They will tell the pains of keep on increasing the hard disk spaces. The IRC server admins will live a peacefull life and can keep the history for decades.
  • If you can not explain anything on text, even videos wont help for many.

IRC is not keeping the history of chats

IRC simulates the realtime chatroom like a meeting room. If you are late to a meeting room, you miss the spoken things. You can read minutes and know what was spoken.

Similarly, IRC is only realtime chat. You can not read the previous chats like you do in telegram like instant messengers. Even in modern we dont read all the history of chats. Imagine, in a morning, a chat room having 200 unread message. What do you do? Just skip all the messages and mark them read. Thats life. IRC knew this 30 ago.

What If I want history?

As all the interaction is happening as plain text, anyone can share the chat history online as blogpost, pastebin or github gist. Ask any fellow mates to export them and read in leisure.

Thatโ€™s too much work for me to ask for a chat history

Well. There are bots and bots and bots for IRC. Check for any logging bot and add to your channel. Host the bot yourself or use this bot.ย ย  https://ircbot.comm-central.org:8080/ย  Add this bot to your channel and read all the chatlog on their website.

Who are using IRC still?

Most of the Free/Open Source software are having IRC Channels to provide free support. You can interact with the original developers of the software there. Anyone can create a channel, invite friends, hangout and have fun there.

Rules, Rules, Rules

It seems there are few rules to chat in IRC Channels. It depends on each channel. To maintainย  goodness, there are rules everywhere. Even in Roads, to avoid accidents, we have to follow rules. There are mailing list rules. Similarly, there are common IRC Rules. Read here for common IRC meeting Rules https://fedoraproject.org/wiki/How_to_use_IRC#Meeting_Protocol

There are many commands to learn

Yes. As everything is via only text, we have to give few commands to use the IRC. There are no โ€œJoin/Mute/Leave/Kickโ€ buttons. They are just commands. Check your instant messenger GUI. You will be clicking so many buttons to interact. They are the original commands here.

I have to remember people by there NickName. Why cant we connect with their phone number?

Welcome to the world of Privacy. By giving all your contactโ€™s phone numbers to your instant messenger like WhatsApp, you are selling all our privacy. Do you get frequent SPAM phone calls from all banks,credit cards? We did not get these on IRC times. IRC keeps all your privacy. You dont have to reveal your name, sex, country.

What if I want to chat with someone instantly? He is not there in the IRC Channel? In instant messenger, I leave him a message, on next day, he will see and reply.

IRC respects your offline life. You dont need to be online 24/7. IRC is like going to office and being in a meeting room. Are you in meeting room or a tea shop gang or friends gathering 24/7 ? How are you connecting with them when they are not around? Yes. You make calls or send a message. You choose another medium to connect with them and wait. Do the same here. If you have some query. Posted in IRC. No one replies or the persons who can reply are not there in the Channel. Then ask the same on respective mailing list or stackoverflow like forums. Check the IRC logs next day, you might got answers. You can quickly search over text to get your conversations.

If someone is not there online, it seems he is enjoying life in realtime. Let them enjoy it. Ask for their available time and interact only on that time.

Meet.Jit.si, BigBlueButton,Zoom, Skype, Facebook Live, YouTube Live are useful to meet people, discuss and for any training. Can we do the same on IRC?

Yes. We can do all the things in IRC too. There are tons and tons of training happening over IRC. DPGLug is conducting Training on Free Software from 2009 on every summer. You can read all the logs here https://dgplug.org/irclogs/

We had monthly IRC meetings on Tamil Computing around 2015. You can read all the logs hereย  https://tamilirc.wordpress.com/

Anyone can read/skim these logs quickly. If I share a youtube channel or podcasts full of 100s of hours of content, how long will you watch? It depends on the need. The same applies for IRC also. But it easy and quick to read text.

Can I use IRC on the go with Mobile?

Yes. There are many mobile clients. IRCCloudโ€™s web client and mobile client are modern and neat. I use their free plan. There are tons of clients available for all OS. Explore and find your lovable pair, yourself.

What if I want to read all the history?

You can setup IRC bouncer software like ZNC, or connect with a matrix channel or pay for IRCCloud.com like services. https://thelounge.chat/ seems a better self hostable IRC web client. Install it in a server or raspberry pi. If you want to be away from propitiatory software, for which you are the product, you have to host yourself or pay to some service providers. Or simply enable a free logging bot and read from their website.

I can talk faster than typing.

But people can read faster than hearing or seeing any video. If you want to reach more people, type the content in IRC or a blog post.

What about Matrix/Riot?

Matrix/Riot.im seems a upgraded IRC with all the bells and whistles of other instant messengers. They can be connected with IRC using bots. To and Fro both way communications are seamless. But it allows multimedia content, exporting all the content for public view is still tough, high maintenance tasks for server admins.

Want to discuss with 1000s of people same time? Use IRC

All the modern video chat services, YouTube, Facebook Live sessions take high bandwidth. Not everyone on the world have the bandwidth to connect with a video chat. Most of the video calls are spending time with โ€œAm I audible? Do you see my screen? I can not see the screen. Stop the Noiceโ€ etc like discussions.

We dont have a 100s of people participating free video call service yet. You have to pay a lot for Zoom like services, just to hear the above voices and see blur faces of participants.

Instead, call for a meeting over IRC. Follow few meeting guidelines and all the meeting is done with low noise. Even anyone can connect with 2G or below bandwidth network.

Ok.Ok.Ok Stop this marketing for IRC

Few final thoughts.

  1. IRC server is self hostable. irc.libera.chat, irc.oftc.net are few major free servers available to create a channel
  2. Respect other peopleโ€™s time. Video calls take all the participants time. Text chats are quick and respecting time.
  3. Text chat is very minimalist. Enjoy the peacefulness of a IRC meeting.
  4. Not all trainings need a video chat. If something is really important to demonstrate as a video, record a screencast, upload online and ask all to watch.
  5. Text is great way to learn things. Remember, we still use text books, tutorials, documentation, wikipedia to learn many things. Videos can help only as supporting materials.

I will be available at #ilugc and #kaniyam at irc.libera.chat on weekdays on daytimes.

I will plan for few text based training on any free software and announce here soon.

Thanks to ShakthiKannan, Mohan of Indian Linux Users Group, Chennai and Kushal of DGPLug for inspiring me on using IRC.

Add your comments or experience with IRC here.

HAProxy EP 9: Load Balancing with Weighted Round Robin

11 September 2024 at 14:39

Load balancing helps distribute client requests across multiple servers to ensure high availability, performance, and reliability. Weighted Round Robin Load Balancing is an extension of the round-robin algorithm, where each server is assigned a weight based on its capacity or performance capabilities. This approach ensures that more powerful servers handle more traffic, resulting in a more efficient distribution of the load.

What is Weighted Round Robin Load Balancing?

Weighted Round Robin Load Balancing assigns a weight to each server. The weight determines how many requests each server should handle relative to the others. Servers with higher weights receive more requests compared to those with lower weights. This method is useful when backend servers have different processing capabilities or resources.

Step-by-Step Implementation with Docker

Step 1: Create Dockerfiles for Each Flask Application

Weโ€™ll use the same three Flask applications (app1.py, app2.py, and app3.py) as in previous examples.

  • Flask App 1 (app1.py):

from flask import Flask

app = Flask(__name__)

@app.route("/")
def home():
    return "Hello from Flask App 1!"

@app.route("/data")
def data():
    return "Data from Flask App 1!"

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=5001)

  • Flask App 2 (app2.py):

from flask import Flask

app = Flask(__name__)

@app.route("/")
def home():
    return "Hello from Flask App 2!"

@app.route("/data")
def data():
    return "Data from Flask App 2!"

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=5002)

  • Flask App 3 (app3.py):

from flask import Flask

app = Flask(__name__)

@app.route("/")
def home():
    return "Hello from Flask App 3!"

@app.route("/data")
def data():
    return "Data from Flask App 3!"

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=5003)

Step 2: Create Dockerfiles for Each Flask Application

Create Dockerfiles for each of the Flask applications:

  • Dockerfile for Flask App 1 (Dockerfile.app1):

# Use the official Python image from Docker Hub
FROM python:3.9-slim

# Set the working directory inside the container
WORKDIR /app

# Copy the application file into the container
COPY app1.py .

# Install Flask inside the container
RUN pip install Flask

# Expose the port the app runs on
EXPOSE 5001

# Run the application
CMD ["python", "app1.py"]

  • Dockerfile for Flask App 2 (Dockerfile.app2):

FROM python:3.9-slim
WORKDIR /app
COPY app2.py .
RUN pip install Flask
EXPOSE 5002
CMD ["python", "app2.py"]

  • Dockerfile for Flask App 3 (Dockerfile.app3):

FROM python:3.9-slim
WORKDIR /app
COPY app3.py .
RUN pip install Flask
EXPOSE 5003
CMD ["python", "app3.py"]

Step 3: Create the HAProxy Configuration File

Create an HAProxy configuration file (haproxy.cfg) to implement Weighted Round Robin Load Balancing


global
    log stdout format raw local0
    daemon

defaults
    log     global
    mode    http
    option  httplog
    option  dontlognull
    timeout connect 5000ms
    timeout client  50000ms
    timeout server  50000ms

frontend http_front
    bind *:80
    default_backend servers

backend servers
    balance roundrobin
    server server1 app1:5001 weight 2 check
    server server2 app2:5002 weight 1 check
    server server3 app3:5003 weight 3 check

Explanation:

  • The balance roundrobin directive tells HAProxy to use the Round Robin load balancing algorithm.
  • The weight option for each server specifies the weight associated with each server:
    • server1 (App 1) has a weight of 2.
    • server2 (App 2) has a weight of 1.
    • server3 (App 3) has a weight of 3.
  • Requests will be distributed based on these weights: App 3 will receive the most requests, App 2 the least, and App 1 will be in between.

Step 4: Create a Dockerfile for HAProxy

Create a Dockerfile for HAProxy (Dockerfile.haproxy):


# Use the official HAProxy image from Docker Hub
FROM haproxy:latest

# Copy the custom HAProxy configuration file into the container
COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg

# Expose the port for HAProxy
EXPOSE 80

Step 5: Create a docker-compose.yml File

To manage all the containers together, create a docker-compose.yml file

version: '3'

services:
  app1:
    build:
      context: .
      dockerfile: Dockerfile.app1
    container_name: flask_app1
    ports:
      - "5001:5001"

  app2:
    build:
      context: .
      dockerfile: Dockerfile.app2
    container_name: flask_app2
    ports:
      - "5002:5002"

  app3:
    build:
      context: .
      dockerfile: Dockerfile.app3
    container_name: flask_app3
    ports:
      - "5003:5003"

  haproxy:
    build:
      context: .
      dockerfile: Dockerfile.haproxy
    container_name: haproxy
    ports:
      - "80:80"
    depends_on:
      - app1
      - app2
      - app3


Explanation:

  • The docker-compose.yml file defines the services (app1, app2, app3, and haproxy) and their respective configurations.
  • HAProxy depends on the three Flask applications to be up and running before it starts.

Step 6: Build and Run the Docker Containers

Run the following command to build and start all the containers


docker-compose up --build

This command builds Docker images for all three Flask apps and HAProxy, then starts them.

Step 7: Test the Load Balancer

Open your browser or use curl to make requests to the HAProxy server


curl http://localhost/
curl http://localhost/data

Observation:

  • With Weighted Round Robin Load Balancing, you should see that requests are distributed according to the weights specified in the HAProxy configuration.
  • For example, App 3 should receive three times more requests than App 2, and App 1 should receive twice as many as App 2.

Conclusion

By implementing Weighted Round Robin Load Balancing with HAProxy, you can distribute traffic more effectively according to the capacity or performance of each backend server. This approach helps optimize resource utilization and ensures a balanced load across servers.

HAProxy Ep 6: Load Balancing With Least Connection

11 September 2024 at 13:32

Load balancing is crucial for distributing incoming network traffic across multiple servers, ensuring optimal resource utilization and improving application performance. One of the simplest and most popular load balancing algorithms is Round Robin. In this blog, weโ€™ll explore how to implement Least Connection load balancing using Flask as our backend application and HAProxy as our load balancer.

What is Least Connection Load Balancing?

Least Connection Load Balancing is a dynamic algorithm that distributes requests to the server with the fewest active connections at any given time. This method ensures that servers with lighter loads receive more requests, preventing any single server from becoming a bottleneck.

Step-by-Step Implementation with Docker

Step 1: Create Dockerfiles for Each Flask Application

Weโ€™ll create three separate Dockerfiles, one for each Flask app.

Flask App 1 (app1.py) โ€“ Introduced Slowness by adding sleep

from flask import Flask
import time

app = Flask(__name__)

@app.route("/")
def hello():
    time.sleep(5)
    return "Hello from Flask App 1!"

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=5001)


Flask App 2 (app2.py)

from flask import Flask

app = Flask(__name__)

@app.route("/")
def hello():
    return "Hello from Flask App 2!"

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=5002)


Flask App 3 (app3.py) โ€“ Introduced Slowness by adding sleep.

from flask import Flask
import time

app = Flask(__name__)

@app.route("/")
def hello():
    time.sleep(5)
    return "Hello from Flask App 3!"

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=5003)

Each Flask app listens on a different port (5001, 5002, 5003).

Step 2: Dockerfiles for each flask application

Dockerfile for Flask App 1 (Dockerfile.app1)

# Use the official Python image from the Docker Hub
FROM python:3.9-slim

# Set the working directory inside the container
WORKDIR /app

# Copy the current directory contents into the container at /app
COPY app1.py .

# Install Flask inside the container
RUN pip install Flask

# Expose the port the app runs on
EXPOSE 5001

# Run the application
CMD ["python", "app1.py"]

Dockerfile for Flask App 2 (Dockerfile.app2)

FROM python:3.9-slim
WORKDIR /app
COPY app2.py .
RUN pip install Flask
EXPOSE 5002
CMD ["python", "app2.py"]

Dockerfile for Flask App 3 (Dockerfile.app3)

FROM python:3.9-slim
WORKDIR /app
COPY app3.py .
RUN pip install Flask
EXPOSE 5003
CMD ["python", "app3.py"]

Step 3: Create a configuration for HAProxy

global
    log stdout format raw local0
    daemon

defaults
    log     global
    mode    http
    option  httplog
    option  dontlognull
    timeout connect 5000ms
    timeout client  50000ms
    timeout server  50000ms

frontend http_front
    bind *:80
    default_backend servers

backend servers
    balance leastconn
    server server1 app1:5001 check
    server server2 app2:5002 check
    server server3 app3:5003 check

Explanation:

  • frontend http_front: Defines the entry point for incoming traffic. It listens on port 80.
  • backend servers: Specifies the servers HAProxy will distribute traffic evenly the three Flask apps (app1, app2, app3). The balance leastconn directive sets the Least Connection for load balancing.
  • server directives: Lists the backend servers with their IP addresses and ports. The check option allows HAProxy to monitor the health of each server.

Step 4: Create a Dockerfile for HAProxy

Create a Dockerfile for HAProxy (Dockerfile.haproxy)

# Use the official HAProxy image from Docker Hub
FROM haproxy:latest

# Copy the custom HAProxy configuration file into the container
COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg

# Expose the port for HAProxy
EXPOSE 80

Step 5: Create a Dockercompose file

To manage all the containers together, create a docker-compose.yml file

version: '3'

services:
  app1:
    build:
      context: .
      dockerfile: Dockerfile.app1
    container_name: flask_app1
    ports:
      - "5001:5001"

  app2:
    build:
      context: .
      dockerfile: Dockerfile.app2
    container_name: flask_app2
    ports:
      - "5002:5002"

  app3:
    build:
      context: .
      dockerfile: Dockerfile.app3
    container_name: flask_app3
    ports:
      - "5003:5003"

  haproxy:
    build:
      context: .
      dockerfile: Dockerfile.haproxy
    container_name: haproxy
    ports:
      - "80:80"
    depends_on:
      - app1
      - app2
      - app3

Explanation:

  • The docker-compose.yml file defines four services: app1, app2, app3, and haproxy.
  • Each Flask app is built from its respective Dockerfile and runs on its port.
  • HAProxy is configured to wait (depends_on) for all three Flask apps to be up and running.

Step 6: Build and Run the Docker Containers

Run the following commands to build and start all the containers:

# Build and run the containers
docker-compose up --build

This command will build Docker images for all three Flask apps and HAProxy and start them up in the background.

You should see the responses alternating between โ€œHello from Flask App 1!โ€, โ€œHello from Flask App 2!โ€, and โ€œHello from Flask App 3!โ€ as HAProxy uses the Round Robin algorithm to distribute requests.

Step 7: Test the Load Balancer

Open your browser or use a tool like curl to make requests to the HAProxy server:

curl http://localhost

You should see responses cycling between โ€œHello from Flask App 1!โ€, โ€œHello from Flask App 2!โ€, and โ€œHello from Flask App 3!โ€ according to the Least Connection strategy.

HAProxy EP 1: Traffic Police for Web

9 September 2024 at 16:59

In the world of web applications, imagine youโ€™re running a very popular pizza place. Every evening, customers line up for a delicious slice of pizza. But if your single cashier canโ€™t handle all the orders at once, customers might get frustrated and leave.

What if you could have a system that ensures every customer gets served quickly and efficiently? Enter HAProxy, a tool that helps manage and balance the flow of web traffic so that no single server gets overwhelmed.

Hereโ€™s a straightforward guide to understanding HAProxy, installing it, and setting it up to make your web application run smoothly.

What is HAProxy?

HAProxy stands for High Availability Proxy. Itโ€™s like a traffic director for your web traffic. It takes incoming requests (like people walking into your pizza place) and decides which server (or pizza station) should handle each request. This way, no single server gets too busy, and everything runs more efficiently.

Why Use HAProxy?

  • Handles More Traffic: Distributes incoming traffic across multiple servers so no single one gets overloaded.
  • Increases Reliability: If one server fails, HAProxy directs traffic to the remaining servers.
  • Improves Performance: Ensures that users get faster responses because the load is spread out.

Installing HAProxy

Hereโ€™s how you can install HAProxy on a Linux system:

  1. Open a Terminal: Youโ€™ll need to access your command line interface to install HAProxy.
  2. Install HAProxy: Type the following command and hit enter

sudo apt-get update
sudo apt-get install haproxy

3. Check Installation: Once installed, you can verify that HAProxy is running by typing


sudo systemctl status haproxy

This command shows you the current status of HAProxy, ensuring itโ€™s up and running.

Configuring HAProxy

HAProxyโ€™s configuration file is where you set up how it should handle incoming traffic. This file is usually located at /etc/haproxy/haproxy.cfg. Letโ€™s break down the main parts of this configuration file,

1. The global Section

The global section is like setting the rules for the entire pizza place. It defines general settings for HAProxy itself, such as how it should operate, what kind of logging it should use, and what resources it needs. Hereโ€™s an example of what you might see in the global section


global
    log /dev/log local0
    log /dev/log local1 notice
    chroot /var/lib/haproxy
    stats socket /run/haproxy/admin.sock mode 660
    user haproxy
    group haproxy
    daemon

Letโ€™s break it down line by line:

  • log /dev/log local0: This line tells HAProxy to send log messages to the system log at /dev/log and to use the local0 logging facility. Logs help you keep track of whatโ€™s happening with HAProxy.
  • log /dev/log local1 notice: Similar to the previous line, but it uses the local1 logging facility and sets the log level to notice, which is a type of log message indicating important events.
  • chroot /var/lib/haproxy: This line tells HAProxy to run in a restricted area of the file system (/var/lib/haproxy). Itโ€™s a security measure to limit access to the rest of the system.
  • stats socket /run/haproxy/admin.sock mode 660: This sets up a special socket (a kind of communication endpoint) for administrative commands. The mode 660 part defines the permissions for this socket, allowing specific users to manage HAProxy.
  • user haproxy: Specifies that HAProxy should run as the user haproxy. Running as a specific user helps with security.
  • group haproxy: Similar to the user directive, this specifies that HAProxy should run under the haproxy group.
  • daemon: This tells HAProxy to run as a background service, rather than tying up a terminal window.

2. The defaults Section

The defaults section sets up default settings for HAProxyโ€™s operation and is like defining standard procedures for the pizza place. It applies default configurations to both the frontend and backend sections unless overridden. Hereโ€™s an example of a defaults section


defaults
    log     global
    option  httplog
    option  dontlognull
    timeout connect 5000ms
    timeout client  50000ms
    timeout server  50000ms

Hereโ€™s what each line means:

  • log global: Tells HAProxy to use the logging settings defined in the global section for logging.
  • option httplog: Enables HTTP-specific logging. This means HAProxy will log details about HTTP requests and responses, which helps with troubleshooting and monitoring.
  • option dontlognull: Prevents logging of connections that donโ€™t generate any data (null connections). This keeps the logs cleaner and more relevant.
  • timeout connect 5000ms: Sets the maximum time HAProxy will wait when trying to connect to a backend server to 5000 milliseconds (5 seconds). If the connection takes longer, it will be aborted.
  • timeout client 50000ms: Defines the maximum time HAProxy will wait for data from the client to 50000 milliseconds (50 seconds). If the client doesnโ€™t send data within this time, the connection will be closed.
  • timeout server 50000ms: Similar to timeout client, but it sets the maximum time to wait for data from the server to 50000 milliseconds (50 seconds).

3. Frontend Section

The frontend section defines how HAProxy listens for incoming requests. Think of it as the entrance to your pizza place.


frontend http_front
    bind *:80
    default_backend http_back
  • frontend http_front: This is a name for your frontend configuration.
  • bind *:80: Tells HAProxy to listen for traffic on port 80 (the standard port for web traffic).
  • default_backend http_back: Specifies where the traffic should be sent (to the backend section).

4. Backend Section

The backend section describes where the traffic should be directed. Think of it as the different pizza stations where orders are processed.


backend http_back
    balance roundrobin
    server app1 192.168.1.2:5000 check
    server app2 192.168.1.3:5000 check
    server app3 192.168.1.4:5000 check
  • backend http_back: This is a name for your backend configuration.
  • balance roundrobin: Distributes traffic evenly across servers.
  • server app1 192.168.1.2:5000 check: Specifies a server (app1) at IP address 192.168.1.2 on port 5000. The check option ensures HAProxy checks if the server is healthy before sending traffic to it.
  • server app2 and server app3: Additional servers to handle traffic.

Testing Your Configuration

After setting up your configuration, youโ€™ll need to restart HAProxy to apply the changes:


sudo systemctl restart haproxy

To check if everything is working, you can use a web browser or a tool like curl to send requests to HAProxy and see if it correctly distributes them across your servers.

The Search for the Perfect Media Server: A Journey of Discovery

2 September 2024 at 04:11

Dinesh, an avid movie collector and music lover, had a growing problem. His laptop was bursting at the seams with countless movies, albums, and family photos. Every time he wanted to watch a movie or listen to her carefully curated playlists, he had to sit around his laptop. And if he wanted to share something with his friends, it meant copying with USB drives or spending hours transferring files.

One Saturday evening, after yet another struggle to connect his laptop to his smart TV via a mess of cables, Dinesh decided it was time for a change. He needed a solution that would let his access all his media from any device in his house โ€“ phone, tablet, and TV. He needed a media server.

Dinesh fired up his browser and began his search: โ€œHow to stream media to all my devices.โ€ He gone through the results โ€“ Plex, Jellyfin, Embyโ€ฆ Each option seemed promising but felt too complex, requiring subscriptions or heavy installations.

Frustrated, Dinesh thought, โ€œThere must be something simpler. I donโ€™t need all the bells and whistles; I just want to access my files from anywhere in my house.โ€ He refined her search: โ€œlightweight media server for Linux.โ€

There it was โ€“ MiniDLNA. Described as a simple, lightweight DLNA server that was easy to set up and perfect for home use, MiniDLNA (also known as ReadyMedia) seemed to be exactly what Dinesh needed.

MiniDLNA (also known as ReadyMedia) is a lightweight, simple server for streaming media (like videos, music, and pictures) to devices on your network. It is compatible with various DLNA/UPnP (Digital Living Network Alliance/Universal Plug and Play) devices such as smart TVs, media players, gaming consoles, etc.

How to Use MiniDLNA

Hereโ€™s a step-by-step guide to setting up and using MiniDLNA on a Linux based system.

1. Install MiniDLNA

To get started, you need to install MiniDLNA. The installation steps can vary slightly depending on your operating system.

For Debian/Ubuntu-based systems:

sudo apt update
sudo apt install minidlna

For Red Hat/CentOS-based systems:

First, enable the EPEL repository,

sudo yum install epel-release

Then, install MiniDLNA,

sudo yum install minidlna

2. Configure MiniDLNA

Once installed, you need to configure MiniDLNA to tell it where to find your media files.

a. Open the MiniDLNA configuration file in a text editor

sudo nano /etc/minidlna.conf

b. Configure the following parameters:

  • media_dir: Set this to the directories where your media files (music, pictures, and videos) are stored. You can specify different media types for each directory.
media_dir=A,/path/to/music  # 'A' is for audio
media_dir=V,/path/to/videos # 'V' is for video
media_dir=P,/path/to/photos # 'P' is for pictures
  • db_dir=: The directory where the database and cache files are stored.
db_dir=/var/cache/minidlna
  • log_dir=: The directory where log files are stored.
log_dir=/var/log/minidlna
  • friendly_name=: The name of your media server. This will appear on your DLNA devices.
friendly_name=Laptop SJ
  • notify_interval=: The interval in seconds that MiniDLNA will notify clients of its presence. The default is 900 (15 minutes).
notify_interval=900

c. Save and close the file (Ctrl + X, Y, Enter in Nano).

3. Start the MiniDLNA Service

After configuration, start the MiniDLNA service

sudo systemctl start minidlna

To enable it to start at boot,

sudo systemctl enable minidlna

4. Rescan Media Files

To make MiniDLNA scan your media files and add them to its database, you can force a rescan with

sudo minidlnad -R

5. Access Your Media on DLNA/UPnP Devices

Now, your MiniDLNA server should be up and running. You can access your media from any DLNA-compliant device on your network:

  • On your Smart TV, look for the โ€œMedia Serverโ€ or โ€œDLNAโ€ option in the input/source menu.
  • On a Windows PC, go to This PC or Network and find your DLNA server under โ€œMedia Devices.โ€
  • On Android, use a media player app like VLC or BubbleUPnP to find your server.

6. Check Logs and Troubleshoot

If you encounter any issues, you can check the logs for more information

sudo tail -f /var/log/minidlna/minidlna.log

To setup for a single user

Disable the global daemon

sudo service minidlna stop
sudo update-rc.d minidlna disable

Create the necessary local files and directories as regular user and edit the configuration

mkdir -p ~/.minidlna/cache
cd ~/.minidlna
cp /etc/minidlna.conf .
$EDITOR minidlna.conf

Configure as you would globally above but these definitions need to be defined locally

db_dir=/home/$USER/.minidlna/cache
log_dir=/home/$USER/.minidlna 

To start the daemon locally

minidlnad -f /home/$USER/.minidlna/minidlna.conf -P /home/$USER/.minidlna/minidlna.pid

To stop the local daemon

xargs kill </home/$USER/.minidlna/minidlna.pid

To rebuild the database,

minidlnad -f /home/$USER/.minidlna/minidlna.conf -R

For more info: https://help.ubuntu.com/community/MiniDLNA

Additional Tips

  • Firewall Rules: Ensure that your firewall settings allow traffic on the MiniDLNA port (8200 by default) and UPnP (typically port 1900 for UDP).
  • Update Media Files: Whenever you add or remove files from your media directory, run minidlnad -R to update the database.
  • Multiple Media Directories: You can have multiple media_dir lines in your configuration if your media is spread across different folders.

To set up MiniDLNA with VLC Media Player so you can stream content from your MiniDLNA server, follow these steps:

Letโ€™s see how to use this in VLC

On Machine

1. Install VLC Media Player

Make sure you have VLC Media Player installed on your device. If not, you can download it from the official VLC website.

2. Open VLC Media Player

Launch VLC Media Player on your computer.

3. Open the UPnP/DLNA Network Stream

  1. Go to the โ€œViewโ€ Menu:
    • On the VLC menu bar, click on View and then Playlist or press Ctrl + L (Windows/Linux) or Cmd + Shift + P (Mac).
  2. Locate Your DLNA Server:
    • In the left sidebar, you will see an option for Local Network.
    • Click on Universal Plug'n'Play or UPnP.
    • VLC will search for available DLNA/UPnP servers on your network.
  3. Select Your MiniDLNA Server:
    • After a few moments, your MiniDLNA server should appear under the UPnP section.
    • Click on your server name (e.g., My DLNA Server).
  4. Browse and Play Media:
    • You will see the folders you configured (e.g., Music, Videos, Pictures).
    • Navigate through the folders and double-click on a media file to start streaming.

4. Alternative Method: Open Network Stream

If you know the IP address of your MiniDLNA server, you can connect directly:

  1. Open Network Stream:
    • Click on Media in the menu bar and select Open Network Stream... or press Ctrl + N (Windows/Linux) or Cmd + N (Mac).
  2. Enter the URL:
    • Enter the URL of your MiniDLNA server in the format http://[Server IP]:8200.
    • Example: http://192.168.1.100:8200.
  3. Click โ€œPlayโ€:
    • Click on the Play button to start streaming from your MiniDLNA server.

5. Tips for Better Streaming Experience

  • Ensure the Server is Running: Make sure the MiniDLNA server is running and the media files are correctly indexed.
  • Network Stability: A stable local network connection is necessary for smooth streaming. Use a wired connection if possible or ensure a strong Wi-Fi signal.
  • Firewall Settings: Ensure that the firewall on your server allows traffic on port 8200 (or the port specified in your MiniDLNA configuration).

On Android

To set up and stream content from MiniDLNA using an Android app, you will need a DLNA/UPnP client app that can discover and stream media from DLNA servers. Several apps are available for this purpose, such as VLC for Android, BubbleUPnP, Kodi, and others. Hereโ€™s how to use VLC for Android and BubbleUPnP, two popular choices

Using VLC for Android

  1. Install VLC for Android:
  2. Open VLC for Android:
    • Launch the VLC app on your Android device.
  3. Access the Local Network:
    • Tap on the menu button (three horizontal lines) in the upper-left corner of the screen.
    • Select Local Network from the sidebar menu.
  4. Find Your MiniDLNA Server:
    • VLC will automatically search for DLNA/UPnP servers on your local network. After a few moments, your MiniDLNA server should appear in the list.
    • Tap on the name of your MiniDLNA server (e.g., My DLNA Server).
  5. Browse and Play Media:
    • You will see your media folders (e.g., Music, Videos, Pictures) as configured in your MiniDLNA setup.
    • Navigate to the desired folder and tap on any media file to start streaming.

Additional Tips

  • Ensure MiniDLNA is Running: Make sure your MiniDLNA server is properly configured and running on your local network.
  • Check Network Connection: Ensure your Android device is connected to the same local network (Wi-Fi) as the MiniDLNA server.
  • Firewall Settings: If you are not seeing the MiniDLNA server in your app, ensure that the serverโ€™s firewall settings allow DLNA/UPnP traffic.

Some Problems That you may face

  1. minidlna.service: Main process exited, code=exited, status=255/EXCEPTION - check the logs. Mostly its due to an instance already running on port 8200. Kill that and reload the db. lsof -i :8200 will give PID. and `kill -9 <PID>` will kill the process.
  2. If the media files is not refreshing, then try minidlnad -f /home/$USER/.minidlna/minidlna.conf -R or `sudo minidlnad -R`

Docker Ep 3 : Virtual Machines VS Containers

12 August 2024 at 08:40
SNo.Virtual Machines(VM)Containers
1VM is a piece of software that allows you to install other software inside of it so you control it virtually as opposed to installing the software directly on the computer.While a container is software that allows different functionalities of an application independently.
2.Applications running on a VM system, or hypervisor, can run different OS.While applications running in a container environment share a single OS.
3.VM virtualizes the computer system, meaning its hardware.While containers virtualize the operating system, or the software only.
4.VM size is very large, generally in gigabytes.While the size of the container is very light, generally a few hundred megabytes, though it may vary as per use.
5.VM takes longer to run than containers, the exact time depending on the underlying hardware.While containers take far less time to run.
6.VM uses a lot of system memory.While containers require very less memory.
7.VM is more secure, as the underlying hardware isnโ€™t shared between processes.While containers are less secure, as the virtualization is software-based, and memory is shared.
8.VMs are useful when we require all of the OS resources to run various applications.While containers are useful when we are required to maximize the running applications using minimal servers.
9.Examples of Type 1 hypervisors are KVM, Xen, and VMware. Virtualbox is a Type 2 hypervisorExamples of containers are RancherOS, PhotonOS, and Containers by Docker.

Interface types in Java

12 August 2024 at 02:49
java programming language an interface is a reference type, similar to a class, that can contain only constants, method declaration(method signature, nobody), default methods, static methods and nested types inside its body. Nested type simply means it can contain another interface or class inside it. variables declared in an interface are public, static & final [โ€ฆ]

Python - Fundamentals

By: ABYS
16 July 2024 at 14:00

In here, I'm gonna tell you how to use variables in python. We shall see how to name a variable and assign values to them.

How to name a Variable ?

Firstly a variable is nothing but a reference to an object or value throughout the program. They act as reference to a memory where the value is stored.

There are certain rules to name them.

  • Must begin with a letter (a-z, A-Z) or an underscore (_).
  • After the first character, letters, digits (0-9), or underscores can be followed.
  • Variable names are case-sensitive. For ex, myName and myname are entirely different variables.
  • Should not use Python reserved words as variable names For ex: class, def, for, while.

So, in python the operator = is used for assigning values to variables.

# Assigning integer value
age = 18
print(age)

18

# Assigning string value
name = "Arif"
print(name)

Arif

# Assigning float value (float means decimal value)
height = 2.5
print(height)

2.5

# Assigning boolean value (rfrs to true/false)
is_student = True
print(is_student)

True

Varible Types

Python is a typed lang, we needn't declare the type of a variable when assigning a value to it. The type is inferred by its own.

name = "Abys"
print(name)
print(type(name))

Abys
<class 'str'>

or we can also define the type by,

name = "Abys"
type(name)

str

age = 18
type(age)

int

That's the basic.

I've been asked to complete some questions on my own, lemme discuss those with you guys.
It's much easier to learn right...?

1. Create a variable named name and assign your name to it. Then print the value of the variable.

name = "Abys"
print(name)
print(type(name))

Abys
<class 'str'>

2. Create a variable age and assign your age to it. Later, reassign the variable with a new value and print the new value.

age=17
print("Present age:",age)
age= 18
print(age)

Present age: 17
18

and here if we want the type;

print(type(age))
<class 'int'>

3. Assign the values 5, 10, and 15 to three variables a, b, and c in a single line. Print their values.

a,b,c = 5,10,15
print(a,b,c)

5 10 15

if we wanna add them we get,

print(a+b+c)

30

4. Swap the values of two variables x and y without using a third variable. Print their values before and after swapping.

x,y = 5,25
print(x,y)
print(x-y)
x,y = 25,5
print(x,y)
print(x-y)

5 25
-20
25 5
20

they've asked just to print the swapped values, it's me who did extra stuffs.

Before the next qn we ought to know what is constants...

What are Constants ?

In Python, constants are those values that are not meant to change. By convention, they are typically written in capital letters with underscores separating the words.
However, in python constants can also be changed.

5. Define constants PI with appropriate values and print them.

PI=3.14159
print(f"{PI:.3f}")

3.142

6. Write a program that calculates the area of a circle using the constant PI and a variable radius. Print the area.

PI=3.14
radius=7
r=radius
area=PI*r**2 # r**2 refers to r pow 2
print("Area of circle is",area)

Area of circle is 153.86

7. Define constants for the length and width of a rectangle. Calculate and print the area.

L,B = 5,15
area = L*B
print("Area of rect is ",area)

Area of rect is  75

These were the qns I worked on. Hope it is clear.
Sorry, if I'm ain't clear enough.., as I've just started blogging I may make mistakes.
Definitely will improve myself.
Thank you, All...

Working with Tamil Content in Computing Environments (27 July 2024)

27 July 2024 at 04:33

https://tamil.digital.utsc.utoronto.ca/working-with-tamil-content-in-computing-environments-27-july-2024

Unicode is an international standard extensively adopted across the industry and the Internet to represent Tamil and other languages.ย  Yet, we still face several legacy issues and ongoing challenges.ย 

The content from government documents cannot be easily extracted. The conversion of documents from one font to another presents problems due to inconsistencies. There exist various, slightly different standards for phonetic transcription of Tamil into latin scripts.ย  There are varied keyboard layouts and input styles for desktop and mobile.

Researchers, developers and practitioners continue to evolve solutions to overcome these challenges. The presentations and discussions will identify needs, issues and solutions for working with Tamil content in varied computing environments.

Please fill this anonymous survey related to using Tamil in computers and smartphones.

Presentation Topicsย 

  • Introduction to Unicode โ€“ Elango
  • Using Tamil Keyboards on Computer and Mobile Platforms โ€“ Suganthan
  • Androidโ€™s New Faster and More Intuitive Method to Type Tamil โ€“ Elango
  • Working with Tamil Content in PDFs โ€“ Shrinivasan
  • Tamil Font Styles โ€“ Uthayan
  • Challenges in Automatic Tamil Font Conversions โ€“ Parathan
  • Transliteration Approaches for Library Metadata Generation โ€“ Natkeeran

Date

July 27, 2024 (Saturday) โ€“ Virtual Presentations and Discussion

9:30 am โ€“ 11:30 am (Toronto time)
7 pm โ€“ 9 pm (Chennai/Jaffna time)

Zoom
https://utoronto.zoom.us/j/87507821579

Contributors

  • UTSC Library Digital Tamil Studies
  • Kaniyam Foundation
  • Tamil Kanimai Maiyam (เฎคเฎ•เฎฎเฏˆ)
  • South Asian Canadian Digital Archive (SACDA)

Working with Tamil Content in Computing Environments (27 July 2024)

27 July 2024 at 04:33

https://tamil.digital.utsc.utoronto.ca/working-with-tamil-content-in-computing-environments-27-july-2024

Unicode is an international standard extensively adopted across the industry and the Internet to represent Tamil and other languages.ย  Yet, we still face several legacy issues and ongoing challenges.ย 

The content from government documents cannot be easily extracted. The conversion of documents from one font to another presents problems due to inconsistencies. There exist various, slightly different standards for phonetic transcription of Tamil into latin scripts.ย  There are varied keyboard layouts and input styles for desktop and mobile.

Researchers, developers and practitioners continue to evolve solutions to overcome these challenges. The presentations and discussions will identify needs, issues and solutions for working with Tamil content in varied computing environments.

Please fill this anonymous survey related to using Tamil in computers and smartphones.

Presentation Topicsย 

  • Introduction to Unicode โ€“ Elango
  • Using Tamil Keyboards on Computer and Mobile Platforms โ€“ Suganthan
  • Androidโ€™s New Faster and More Intuitive Method to Type Tamil โ€“ Elango
  • Working with Tamil Content in PDFs โ€“ Shrinivasan
  • Tamil Font Styles โ€“ Uthayan
  • Challenges in Automatic Tamil Font Conversions โ€“ Parathan
  • Transliteration Approaches for Library Metadata Generation โ€“ Natkeeran

Date

July 27, 2024 (Saturday) โ€“ Virtual Presentations and Discussion

9:30 am โ€“ 11:30 am (Toronto time)
7 pm โ€“ 9 pm (Chennai/Jaffna time)

Zoom
https://utoronto.zoom.us/j/87507821579

Contributors

  • UTSC Library Digital Tamil Studies
  • Kaniyam Foundation
  • Tamil Kanimai Maiyam (เฎคเฎ•เฎฎเฏˆ)
  • South Asian Canadian Digital Archive (SACDA)

โŒ
โŒ