dudeami0
I like to code, garden and tinker
- 0 posts
- 19 comments
- dudeami0@lemmy.dudeami.winto
Selfhosted@lemmy.world•How do services like Mastohost work on a fundamental level?English
1 yearCentralization is a weakness. These services can be targeted by governments that want to limit communication. Free speech is a commodity, and servers host this free speech. If a hostile organization, such as a government, targets a channel of free speech such as those hosted on a platform that makes it easy to setup a mastodon instance, this become an easy target that will affect a large portion of users. If you are serious about freedom, you have the freedom to self-host your own platforms.
Edit: I realize my post doesn’t answer the question proposed, but it’s more of an argument against such services. I would argue self-hosting doesn’t rely on paying third-parties to host your software, but I guess this is in the eye of the hoster.
When I say residential IP addresses, I mostly mean proxies using residential IPs, which allow scrappers to mask themselves as organic traffic.
Edit: Your point stands on there are a lot of services without these protections in place, but a lot of services are protective against scrapping.
The only way I can think of is require users to authenticate themselves, but this isn’t much of a hurdle.
To get into the details of it, what do you define as an AI bot? Are you worried about scrappers grabbing the contents of you website? What is the activities of an “AI Bot”. Are you worried about AI bots registering and using your platform?
The real answer is not even cloudflare will fully defend you from this. If anything cloudflare is just making sure they get paid for access to your website by AI scappers. As someone who has worked around bot protections (albeit in a different context than web scrapping), it’s a game of cat and mouse. If you or some company you hire are not actively working against automated access, you lose as the other side is active.
Just think of your point that they are using residential IP addresses. How do they get these addresses? They provide addons/extensions for browsers that offer some service (generally free VPNs) in exchange for access to your PC and therefore your internet in the contract you agree to. The same can be used by any addon, and if the addon has permissions to read any website they can scrape those websites using legit users for whatever purposes they want. The recent exposure of the Honey scam highlights this, as it’s very easy to get users to install addons by selling users they might save a small amount of money (or make money for other programs). There will be users who are compromised by addons/extensions or even just viruses that will be able to extract the data you are trying to protect.
- dudeami0@lemmy.dudeami.winto
Selfhosted@lemmy.world•Looking to start self hosting by going through Louis Rossman's recently released guide. Any pointers for a newbie are most welcome.English
2 yearsI’d just skip OpenVPN altogether and get started with Wireguard or Headscale/Tailscale.
This one was huge for me. OpenVPN is pretty heavy with CPU overhead, where as wireguard is almost free. I was getting throttled due to the overhead of OpenVPN and roasting the CPU on my Netgear R6350 (it’s what I had lying around). With wireguard I get nearly the same speeds as without a VPN and my loads are very reasonable.
Also with weaker routers like mine, be wary of trying to use QoS, this will probably not help network congestion and instead become a bottleneck (like it did for me). This is where a beefy dedicated router really shines.
Yea this is just syntax, every language does it a little different, most popular languages seem to derive off of C in some capacity. Some do it more different than others, and some are unholy conglomerations of unrelated languages that somehow works. Instead of saying why is this different, just ask how does this work. It’s made my life a lot simpler.
var test intis justint testin another language.func (u User) hi () { ... }is justclass User { void hi() { ... } }in another language (you can guess which language I’m referencing I bet).map := map[string]int {}is justMap<String, Integer> map = new HashMap<>()in another (yes it’s java).Also RTFM, this is all explained, just different!
Edit: I also know this is a very reductive view of things and there are larger differences, I was mostly approaching this from a newer developers understanding of things and just “getting it to work”.
- dudeami0@lemmy.dudeami.winto
Reddit@lemmy.world•The r/FluentinFinance subreddit, a regular on the front page, may be a massive influence campaign
2 yearsFluent in finance is just another forum that says it’s your fault your poor. They say you don’t play the game right and they may be right for a rigged game. But the fact is you shouldn’t be required to play a game to get whats your fair share, and fluent in finance just says you didn’t invest right and didn’t setup your future right to live off the backs of other workers.
The rest is just hyperbolic headlines which drive engagement which is the cancer of any social media platform. No one makes a billion dollars in income as defined by the US tax code, they make a billion dollars in equity which can be used to back loans which is part of the whole issue of obscuring cash flow. Then they can just use this as fodder to call anyone supporting this idiots cause “No one makes a billion dollars a year” when we know they do, it’s just accounted differently.
- 2 years
My question would be, why do you need a more powerful server? Are you monitoring your load and seeing it’s overloaded often? Are you just looking to be able to hook more drives to it? Do you need to re-encode video on the fly for other devices? Giving some more details would help someone to give a more insightful answer. I personally am using a Raspberry Pi 4, Chromebox w/ an i7, an old HP rack server, and an old desktop PC for my self hosting needs, as this is cheaper than buying all new hardware (though the electricity bill isn’t the greatest haha, but oh well). If you are just looking for more storage, using the USB 3.0 slots on the Raspberry Pi 4b you can add a couple extra SSDs using a NVMe to USB 3.0 enclosure. For most purposes the speeds will be fine for most applications.
As for SSD vs HDD, SSD hands down. The only reason you’d pick an HDD is if your trying to get more storage cheaper and don’t mind a higher rate of failure. If your data is at all valuable, and it almost always is, redundancy should be added as well.
And as for running Linux, if it can’t run Linux I wouldn’t want to own it.
Edit: Fixed typo
This might help, sorry if it doesn’t, but here is a link to CloudFlares 5xx error code page on error 521. If you’ve done everything in the resolution list your ISP might be actively blocking you from hosting websites, as it is generally against the ISPs ToS to do such on residential service lines. This is why I personally rent a VPS and have a wireguard VPN setup to host from the VPN, which is basically just a roll your own version of Tailscale using any VPS provider. This way you don’t need to expose anything via your ISPs router/WAN and they can’t see what you are sending or which ports you are sending on (other than the encrypted VPN traffic to your VPS of course).
- 2 years
I use my own router with DD-WRT in-between the ISPs router/modem and my LAN, and use a different subnet. I haven’t had any issues with this myself, and my router just sees the ISP router/modem as the WAN.
I’ve never ran this program, but skimmed the documentation. You should be able to use the
SHIORI_DIR(or a custom database table following those instructions) along with the-pargument for launching the web interface. A simple bash script that should work:export SHIORI_DIR=/path/to/shiori-data-dir shiori serve -p 8081To run multiple versions, I’d suggest setting up each instance as a service on your machine in case of reboots and/or crashes.
Now for serving them, you have two options. The first is just let the users connect to the port directly, but this is generally not done for outward facing services (not that you can’t). The second is to setup a reverse proxy and route the traffic through subdomains or subpaths. Nginx is my go-to solution for this. I’ve also heard good things about Caddy. You’ll most likely have to use subdomains for this, as lots of apps assume they are the root path without some tinkering.
Edit: Corrected incorrect cli arguments and a typo.
- 3 years
SQL is the industry standard for a reason, it’s well known and it does the job quite well. The important part of any technology is to use it when it’s advantageous, not to use it for everything. SQL works great for looking up relational data, but isn’t a replacement for a filesystem. I’ll try to address each concern separately, and this is only my opinion and not some consensus:
Most programmers aren’t DB experts: Most programmers aren’t “experts”, period, so we need to work with this. IT is a wide and varied field that requires a vast depth of knowledge in specific domains to be an “expert” in just that domain. This is why teams break up responsibilities, the fact the community came in and fixed the issues doesn’t change the fact the program did work before. This is all normal in development, you get things working in an acceptable manner and when the requirements change (in the lemmy example, this would be scaling requirements) you fix those problems.
translation step from binary (program): If you are using SQL to store binary data, this might cause performance issues. SQL isn’t an all in one data store, it’s a database for running queries against relational data. I would say this is an architecture problem, as there are better methods for storing and distributing binary blobs of data. If you are talking about parsing strings, string parsing is probably one of the least demanding parts of a SQL query. Prepared statements can also be used to separate the query logic from the data and alleviate the SQL injection attack vector.
Yes, there are ORMs: And you’ll see a ton of developers despise ORMs. They is an additional layer of abstraction that can either help or hinder depending on the application. Sure, they make things real easy but they can also cause many of the problems you are mentioning, like performance bottlenecks. Query builders can also be used to create SQL queries in a manner similar to an ORM if writing plain string-based queries isn’t ideal.
- dudeami0@lemmy.dudeami.wintoProgramming@programming.dev•how to turn events on and off in JavascriptEnglish3 years
For your own sanity, please use a formatter for your IDE. This will also help when others (and you) read the code, as indentation is a convenience for understanding program flow. From what I see:
- Your
enableanddisablefunctions are never called for this portion of code - You use a possibly undeclared
enabledvariable, if so it never passes scopes between thehandleClickandanimationmethods - You do not use any callback or
awaitforinvokeorupdateCurrentBox, causing all the code after either to immediately run. As a result,enabledis neverfalse, since it just instantly flips back totrue. I’m not sure what libraryinvokeis from, but there should be a callback or the function returns aPromisewhich can beawaited.
- Your
- dudeami0@lemmy.dudeami.winto
Selfhosted@lemmy.world•Are transfer speeds tied to internet speed?English
3 yearsSounds like some QoS software is also limiting LAN traffic, seeing as it still works if the internet is disconnected. I would look if your router has “Adaptive QoS” or something similar enabled.
- dudeami0@lemmy.dudeami.winto
Selfhosted@lemmy.world•Q: Lemmy and Mastodon instances behind existing reverse proxyEnglish
3 yearsIn most setups I have seen, the nginx instance provided by Lemmy is used due to the routing needed between lemmy/lemmy-ui being handled in nginx. Your reverse proxy can then point to the nginx instance to expose lemmy.
Why not a Raspberry Pi? The supply chain issues are clearing up.
In the US it seems the supply chain issues are alive as ever. Most of the official resellers are sold out on anything but the Pico and Zero boards. Some do have 4B boards for sale if you buy their starter kit with them, increasing the price by $65 on canakit. The supply issues are definitely not resolved for home users no matter what the CEO wants to say.
- dudeami0@lemmy.dudeami.wintoProgramming@programming.dev•Does Lemmy really benefit from Rust? Is code execution speed the bottleneck?English3 years
The numbers are a little higher than you mention (currently ~3.2k active users). The server isn’t very powerful either, it’s now running on a dedicated server with 6 cores/12 threads and 32 gb ram. Other public instances are using larger servers, such as lemmy.world running on a AMD EPYC 7502P 32 Cores “Rome” CPU and 128GB RAM or sh.itjust.works running on 24 cores and 64GB of RAM. Without running one of these larger instances, I cannot tell what the bottleneck is.
The issues I’ve heard with federation are currently how ActivityPub is implemented, and possibly the fact all upvotes are federated individually. This means every upvote causes a federation queue to be built, and with a ton of users this would pile up fast. Multiply this by all the instances an instance is connected to and you have an exponential increase in requests. ActivityPub is the same protocol used by other federated servers, including Mastodon which had growing pains but appears to be running large instances smoothly now.
Other than that, websockets seem to be a big issue, but is being resolved in 0.18. It also appears every connected user gets all the information being federated, which is the cause for the spam of posts being prepended to the top of the feed. I wouldn’t be surprised if people are already botting content scrapers/posters as well, which might cause a flood of new content which has to get federated which causes queues to back up; this is mostly speculation though.
As it goes with development, generally you focus on feature sets first. Optimization comes once you reach a point a code-freeze makes sense, then you can work on speeding things up without new features breaking stuff. This might be an issue for new users temporarily, but this project wasn’t expecting a sudden increase in demand. This is a great way to show where inefficiencies are and improve performance is though. I have no doubt these will be resolved in a timely manner.
My personal node seems to use minimal resources, not having even registered compared to my other services. Looking at the process manager the postgres/lemmy backend/frontend use ~250MB of RAM.
For now, staying off lemmy.ml and moving communities to other instances is probably best. The use case of large instances anywhere near the scale of reddit wasn’t the goal of the project until reddit users sought alternatives. We can’t expect to show up here and demand it work how we want without a little patience and contributing.
- dudeami0@lemmy.dudeami.winto
Selfhosted@lemmy.world•Anyone else running Lemmy with Kubernetes?English
3 yearsI currently am running the instance I am responding from on kubernetes. I published a helm chart, and others are working on them too. I feel being able to quickly deploy a kubernetes instance will help a lot of smaller instances pop up, and eventually be a good method of handling larger instances once horizontal scaling is figured out.




node-media-server is what I use, it does the job well. I haven’t tried the recording bit, I just stream my desktop to my buddies sometimes. I had to modify the version I was using because the authentication didn’t work well with OBS. This was a while ago and development seems to be semi-active but I have no idea where it’s at.