• 1 Post
  • 30 Comments
Joined 1 year ago
cake
Cake day: June 10th, 2023

help-circle



  • So basically your typical network protocol is something that converts an async stream of bytes into things like Postgres Row objects. What you do then is you write a synchronous library that does the byte conversion, then you write an asynchronous library that talks with the database with async functions, but most of the business logic is sync for converting the data coming from the async pipe.

    Now, this can also be done in a higher level application. You do a server that is by nature async in 2024. Write the server part in async, and implement a sync set of mapping functions which take a request coming in and returns a response. This can be sync. If you need a database, this sync set of functions maps a request to a database query, and your async code can then call the database with the query. Another set of sync functions maps the database result into http response. No need to color everything async.

    The good part with this approach is that if you want to make a completely sync version of this library or application, you just rewrite the async IO parts and can reuse all the protocol business logic. And you can provide sync and async versions of your library too!





  • I’ve been digging into the settings of this printer and, sadly the only send it can do is as a fax… It’s the entry model, been serving us for years very nicely. It even connects to the internet, but misses features such as email, smb or ftp. For me this looks like something an open source firmware could fix. It has enough processing power to possibly run a lightweight Linux distribution, so installing one that would enable modern communication protocols doesn’t seem impossible.


  • This was it for me now, installed paperless-xng, set it up to scan my email folders, copied all random PDFs from my “organized” tax folder and scanned the rest.

    Too bad I just happen to have that Brother printer/scanner without SMB or FTP support. So I need to go through the process of scanning on my computer first, then uploading.


  • Of course. My setup now is a Proxmox server + a NAS. What I’m planning to do is to install a service for this to Proxmox, then have the files synced over NFS to the NAS, which then backs them up every night to Backblaze. And of course I need to have the paper copies too, but to be able to search, tag and archive the documents is great when you need to remember a thing X that was mentioned in a paper I got back in 2014.




  • pimeys@lemmy.nauk.iotoSelfhosted@lemmy.worldImmich is awesome
    link
    fedilink
    English
    arrow-up
    6
    ·
    11 months ago

    Installed it because of this thread to my homelab today. I never really managed my phone images in any way, never uploaded them anywhere. This was the first time. About 5 gigabytes of images and videos were synced to my NAS in a few minutes, now I can search them and all that. It’s a pretty cool setup, although the installation is a bit tricky if you don’t go to the path they give you. I run a Postgres server in Proxmox, and you have to install just the right version of pgvecto.rs for the system to work.

    Browsing the issues I was able to figure out what went wrong, and after downgrading, no issues.



  • As said in the thread, you need some kind of tunnel that stays up and doesn’t need to be fixed if the internet goes down.

    Wireguard, or if wanting super easy setup, Tailscale version of Wireguard is great for this. Now you have a private IP address in your VPN network to your home server, that stays up and answers to HTTP. Next thing you need is a cheap VPS somewhere with a public IP address. When that is running, and is in the Wireguard network so you can access your home server from the VPS, you need a Nginx proxy in the public server. Either do it by hand, or use a service such as the Nginx Proxy Manager to handle the proxy setup.

    How it basically works is you register a domain name (A, CNAME) to the public VPS service, then with Nginx you setup that anything coming in to the domain X should be proxied to the VPN IP address Y and port Z. Now you can add HTTPS to this domain and get a Let’s Encrypt certificate for it. You can, again, do this manually with Nginx, or let Nginx Proxy Manager handle it for you.

    Finally. Stay safe. If you really open services to public internet from your home, be very sure to have all the latest updates and use strong passwords in all of them. Additionally, you can use the home services directly from the Wireguard/Tailscale network by accessing them using the private IP addresses. Your computer should just be in the same network with them.


  • I’m running it in my homelab for projects I do not (yet) push anywhere public, and projects containing private items such as ssh keys. It is snappy and has a ton of features. I can imagine when the federation support works, one can set up their own git forge and contribute more easily to other forges no matter what software they run.

    And, to be honest, that is already how git works if you use the email workflow. Here we just get a web based flow with federated issues and pull requests. But if email is enough for you, you can have a full federation with email and git.