View previous topic :: View next topic |
Author |
Message |
mukwa_mbele n00b
Joined: 15 May 2024 Posts: 6
|
Posted: Wed May 15, 2024 6:01 am Post subject: The Linux Programming Interface |
|
|
Has anybody read it, and is it still relevant today for someone that wants to use Gentoo in their production server? |
|
Back to top |
|
|
Banana Moderator
Joined: 21 May 2004 Posts: 1709 Location: Germany
|
|
Back to top |
|
|
mukwa_mbele n00b
Joined: 15 May 2024 Posts: 6
|
Posted: Thu May 16, 2024 2:56 am Post subject: |
|
|
Thanks for the reply.
So, I want to build my own server. I am currently building my knowledge base in order to implement and run it in the future.
It is for this knowledge base that I am tackling this book. Last time I tried to work with Gentoo, my sheer ignorance was made painfully obvious. |
|
Back to top |
|
|
NichtDerHans Apprentice
Joined: 27 Jan 2023 Posts: 177
|
Posted: Thu May 16, 2024 4:47 am Post subject: |
|
|
To use Gentoo, you do not need any information about the "Linux programming interface". Building a server means that you install programmes, set them up and secure the whole thing (switch off non-essential things). It would be good to learn how to use Gentoo for this.
Or do you want to "program" (c++, python etc...) a server? |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3404
|
Posted: Thu May 16, 2024 9:27 am Post subject: |
|
|
I looked it up and found a book with this title. Is this what you're talking about?
At the first glance it appears to be a description of kernel interfaces exposed to the userspace. Everyone will learn the concepts eventually, but there is little reason to deliberately focus on them. Just go about your business doing the things you actually want to do. _________________ Make Computing Fun Again |
|
Back to top |
|
|
mukwa_mbele n00b
Joined: 15 May 2024 Posts: 6
|
Posted: Thu May 16, 2024 1:38 pm Post subject: |
|
|
Yes, I do also want to programme the server. Thank you all for the replies. All three of you seem to show strong preference for learning through engagement, so I will follow this approach.
And yes, szatox, it's that book that I have in mind.
Edit: Actually, having said that, I just got flashbacks to the first time that I tried to use Gentoo, and I got a lot of help from the IRC channel. A point came, though, when I realised that I didn't even know what the right questions to ask were.
Sheer ignorance is one extreme, but perhaps a 1500 page book is gross overkill. Still, I probably need some way to educate myself before I can set up my own production server. Perhaps the 'Linux From Scratch' project is an appropriate middle ground..? |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3404
|
Posted: Thu May 16, 2024 2:52 pm Post subject: |
|
|
Quote: | Perhaps the 'Linux From Scratch' project is an appropriate middle ground..? | Dunno, are you a masochist? I mean, you _can_ do that, and I have actually done something similar (using Gentoo toolchain as a shortcut) and it can be an interesting challenge, but it is still quite a lot of work with a very steep learning curve. You'll be better off starting with something that already works, and then you can take baby steps in any direction, breaking and fixing stuff in a somewhat controlled fashion.
Quote: | Still, I probably need some way to educate myself before I can set up my own production server | And how will you know what do you need to educate yourself about?
Quote: | All three of you seem to show strong preference for learning through engagement | That's because it's a big world and 99% of the things you _could_ learn are unnecessary for the particular thing you're doing, while 90% will never be relevant to anything you're ever going to do. And you won't know which things you need until you need them.
What does the word "server" mean to you? Anything that listens and responds to requests is a server, so you need to narrow it down. Like, by a LOT.
A shell account on a machine visible from the internet? A NAS on your LAN? A website? Email? Imagination is the limit.
Linux windowing system, X11 is a server too. _________________ Make Computing Fun Again |
|
Back to top |
|
|
mukwa_mbele n00b
Joined: 15 May 2024 Posts: 6
|
Posted: Thu May 16, 2024 9:26 pm Post subject: |
|
|
szatox wrote: | Dunno, are you a masochist? I mean, you _can_ do that, and I have actually done something similar (using Gentoo toolchain as a shortcut) and it can be an interesting challenge, but it is still quite a lot of work with a very steep learning curve. You'll be better off starting with something that already works, and then you can take baby steps in any direction, breaking and fixing stuff in a somewhat controlled fashion. |
What works for me is in and of itself a very open question. I am going from Ubuntu as my personal use OS, to Gentoo for entrepreneurial purposes, and my attraction to Gentoo is its high configurability and minimal resource expenditure. Steep learning curves, I don't believe is something I should shy away from if bringing something to market is my aim.
Quote: | And how will you know what do you need to educate yourself about? |
I don't know. But I am certain that there is foundational general knowledge of system programming that I do not currently have. Why I believe LFS might be the way to go for me (now that I have been dissuaded from the other hefty book).
Quote: | What does the word "server" mean to you? Anything that listens and responds to requests is a server, so you need to narrow it down. Like, by a LOT.
A shell account on a machine visible from the internet? A NAS on your LAN? A website? Email? Imagination is the limit.
Linux windowing system, X11 is a server too. |
A remotely accessed classical computer running a single programme for a single-strategy trading system. It won't need multiple, complex client-server applications, just the one programme I load on it that downloads live financial market data, interprets the data, then communicates with a brokerage firm's own server.
Another reason why I lean LFS (and leaned towards that gigantic book) is because it is very important for me that I get a complete grasp of how my system works, at every stage of exchanged information. Just getting a system that works, and I don't really grasp well what is going on, would not suffice for me. |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3404
|
Posted: Thu May 16, 2024 10:23 pm Post subject: |
|
|
Alright.
Quote: | A remotely accessed classical computer running a single programme for a single-strategy trading system. | Does this program already exist and you just have to deploy it, or is it a new thing you have create?
At this point it looks like it's the latter. Which changes the task from "linux programing" to "web service programming". You don't need "linux interface", you need a list of operations user should be able to perform and their procedure flow-charts, protocols for interaction with users and backend, some way to store the data, validating user input (because the internet is a hostile place and your app WILL face adversity), user access control within application... All those things happening under the hood are pretty much platform-independent. There's a good chance you can simply recompile your program for windows or mac and it will just work in a new place.
The former is much more linux-specific, as it may involve system configuration. Partitioning disks, selecting filesystems, identifying and installing dependencies, advanced network configuration (firewalls, proxy, vpn), installation in the host's system or perhaps in a container, integration with init for autostart, possibly tuning some system behaviors for best performance... Looking for bottlenecks in a running system...
Quote: | I am going from Ubuntu as my personal use OS, to Gentoo for entrepreneurial purposes, and my attraction to Gentoo is its high configurability and minimal resource expenditure.
Steep learning curves, I don't believe is something I should shy away from if bringing something to market is my aim
| Man, you're really reversing full-speed right now. LFS may be a fun exercise, but it is way too high maintenance for a production system, unless you're basically trying to challenge RedHat.
Enterprises also prefer binary distributions with periodic releases over source-based rolling releases (Good for auditing and testing - hopefully done by someone else - AKA stability and security; flexibility be damned, 'cus it doesn't bring many-money), and on top of that it's easier to find a readily available Debian/Ubuntu admin than a Gentoo admin.
Also, building everything from sources is not very minimal in terms of resources used (unless you're working on a large scale: build binary packages once, deploy to many identical machines).
Fortunately, the platform you do the development on should be easy to replace. So you can work on Gentoo and then deploy to whatever the enterprise uses.
BTW, if you've been using Ubuntu for some time, you should already have basic knowledge of linux in general. You should be familiar with most of the concepts from that 1.5k pages long book. Maybe not at the same depth as 1.5k pages allows, but it doesn't really matter as long as you can look up the details relevant to the task at hand in some reference manual, howto, or anywhere else, once you actually need them. _________________ Make Computing Fun Again |
|
Back to top |
|
|
mukwa_mbele n00b
Joined: 15 May 2024 Posts: 6
|
Posted: Sat May 18, 2024 6:04 am Post subject: |
|
|
My primary concern is having full control and understanding of the system, since I am working alone and want to eventually develop it into a fiduciary investment fund. I will have to wear all of the hats, and well.
It might be unnecessarily convoluted to explain the whole project, but deliberate resource allocation will be necessary. The activity itself is resource intensive, which I think means that writing a programme that is platform independent and could be recompiled onto any platform is not an optimal solution. I believe that I will need to have control of what is actually happening under the hood in order to manage resources appropriately.
So LFS would not be for the purpose of creating my own OS flavour, but as an important learning exercise. The intention would still be to take advantage of Gentoo's stability and configurability. In some way or another, I ought to learn system programming, and last time I jumped into Gentoo, yes I was able to follow the hand-holding instructions for installation (with a lot of help from IRC), but nothing more than that. I would welcome any steep learning curve, so long as results follow.
Leaving open the idea that LFS is not the best learning approach for me. But I am just reluctant to jump onto Gentoo straight away again, because my last experience wasn't very fruitful (due to my lack of understanding). |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3404
|
Posted: Sat May 18, 2024 12:09 pm Post subject: |
|
|
Quote: | It might be unnecessarily convoluted to explain the whole project | That's OK, I won't be tagging along all the way, so details won't matter.
Quote: | deliberate resource allocation will be necessary. The activity itself is resource intensive, which I think means that writing a programme that is platform independent and could be recompiled onto any platform is not an optimal solution. |
Computer systems are to a large extent made of layers. There are relatively few interactions between those layers, and some of those interactions are already abstracted by standard libraries available for pretty much all programming languages.
You can use pretty much anything except for shell (which btw would be a terrible choice for anything either complex or resource intensive anyway), and inside your application code you will do math the same way regardless of the underlying OS, you'll open files and network connections the same way, and you'll talk to databases the same way. Things get weird around direct access to devices (E.g. sound and cameras), but this part is out of scope, out of mind for you.
I'm not telling you to focus on making it portable; I'm telling you that the thing you described should end up being portable just by accident, so there is no need for you to worry about the OS.
Quote: | So LFS would not be for the purpose of creating my own OS flavour, but as an important learning exercise | It can be a fun exercise, but it has nothing to do with your app.
Quote: | In some way or another, I ought to learn system programming | Not if you're thinking about OS programming while designing a fancy stock report calculator.
Quote: | and last time I jumped into Gentoo, yes I was able to follow the hand-holding instructions for installation (with a lot of help from IRC), but nothing more than that. | Don't overcomplicate things for yourself. If you're more comfortable with Ubuntu, stick with Ubuntu. The differences lie mostly in the package manager and the style of maintainer-provided configs. Neither of those affects applications you develop yourself.
Quote: | I would welcome any steep learning curve, so long as results follow. | You're already punching way above your pay grade. If you keep adding obstacles, absolutely nothing will follow.
Actually, starting with something smaller and easier, that only does one thing and doesn't require integration with external systems might be a better way to start. Literally, try to do something you think you can complete in a week... And if you can finish it in a month, that will already be an impressive result.
Also: first make it work, then make it pretty (like in: easy to understand and maintain), finally make it fast if you really need to. _________________ Make Computing Fun Again |
|
Back to top |
|
|
mukwa_mbele n00b
Joined: 15 May 2024 Posts: 6
|
Posted: Sun May 19, 2024 8:24 am Post subject: |
|
|
This is actually absolutely priceless advice.
Thank you so very much.
And I have nothing more to add, other than, I will see to it that I follow it well.
I suppose the first order of business is to go back to the drawing board on my minimum viable product. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|