<FromGitter>
<Blacksmoke16> Method in this case means like the "algorithm" to use
gangstacat has quit [Quit: Δis!]
<FromGitter>
<randiaz95> Yep, Figured it out, what stumped me on this is that i need to put a filename while adding, because I already gave the Writer a filename through the file object with extension zip.
<FromGitter>
<randiaz95> essentially you need a filename with `.zip` and then a `.txt` whilst adding
<FromGitter>
<randiaz95> Theres no way to just store string alone into a zip file.
<FromGitter>
<tenebrousedge> the Zip file format only stores files, not strings, so you need to at least give it a name inside the zip file
<FromGitter>
<randiaz95> nah, the add method inside of the ZipWriter object needs filename and string content
<FromGitter>
<tenebrousedge> that doesn't contradict what I said
<FromGitter>
<randiaz95> Sorry I know saying no is a painful word, specifically over the internet where I can't say it in a nice way lol..
gangstacat has joined #crystal-lang
<FromGitter>
<randiaz95> I meant that the only way to create a new zip with the current API is with both a filename for the inner file and it's content. ( I am sure we can abstract the inner files name to some content, however it may cause problems for some people's applications , thus that is why one cannot do it without the inner filename... )
<FromGitter>
<randiaz95> I think there should be a default value for that argument though and one can then choose to omit the inner filename if they want
<FromGitter>
<tenebrousedge> I think you're probably alone in that opinion
HumanG33k has quit [Read error: Connection reset by peer]
<FromGitter>
<randiaz95> right, my application doesn't matter what the inner filename is; I am sure most other applications do care about the inner filename.
<FromGitter>
<tenebrousedge> you could probably write a compressed string to a file some other way, if the goal isn't necessarily to create a compressed filesystem
<FromGitter>
<randiaz95> lol great deduction, I am trying to compress my application's file system so that I can spend less money on server hard disk.
<FromGitter>
<randiaz95> Side hustles suck and I am not good at dev ops when I am at my day job.
<FromGitter>
<tenebrousedge> hmmmm. what exactly are you compressing?
<FromGitter>
<randiaz95> ok, I create dashboards through the website I made https://wombol.com
<FromGitter>
<randiaz95> to checkout a demo use: demo as account and `Welcome.1` as the password
<FromGitter>
<randiaz95> Essentially I have tons of social media data, amazon marketplace data, and website data feeding custom dashboards
<FromGitter>
<j8r> if server hard disk is the topic, why don't directly compress it?
<FromGitter>
<j8r> the whole filesystem?
<FromGitter>
<randiaz95> So on every request I have to compress the entire filesystem?
<FromGitter>
<Blacksmoke16> im assuming its data that is used, not just like archived stuff?
<FromGitter>
<j8r> No, it automatically done @randiaz95
<FromGitter>
<randiaz95> Thing is, the easiest way to do that is to use a RDBMS to autocompress data but RDBMS is too much time with manually dropped csvs and excels
<FromGitter>
<randiaz95> no data that is used to feed the dashboards.
<FromGitter>
<j8r> In any case there will have a little CPU penalty, of course
<FromGitter>
<randiaz95> do you mean unzip the entire filesystem on request?
<FromGitter>
<j8r> The whole `/` is compressed.
<FromGitter>
<randiaz95> 1) o
<FromGitter>
<randiaz95> Wow LMAO
<FromGitter>
<randiaz95> God bless open source
<FromGitter>
<j8r> This means, everything you put on it is automatically compressed
<FromGitter>
<tenebrousedge> amen πΌ
<FromGitter>
<randiaz95> ROFL
<FromGitter>
<randiaz95> So i would interact with the filesystem normally?
<FromGitter>
<j8r> yes, transparent
<FromGitter>
<randiaz95> File.read in crystal and with open("", 'r') as file in python?
<FromGitter>
<randiaz95> wow
<FromGitter>
<randiaz95> Amazing....
<FromGitter>
<j8r> you can also compress RAM memory for saving
<FromGitter>
<randiaz95> what?
<FromGitter>
<j8r> yep, ZSWAP on Linux
<FromGitter>
<j8r> that's somethings very common on macOS and Windows
<FromGitter>
<randiaz95> for free?
<FromGitter>
<randiaz95> like what are the drawbacks of compressing your ram? I know if you compress your file system it will take longer to load because of unzipping
<FromGitter>
<j8r> and that's fairly important for databases
<FromGitter>
<j8r> furthermore, a database is stateful
<FromGitter>
<tenebrousedge> so you have a volume
<FromGitter>
<j8r> mounted locally? This break the whole point of K8S
<FromGitter>
<j8r> and you can no longer destroy the node like this
<FromGitter>
<j8r> or perhaps using CEPH, but it adds latency, too
<FromGitter>
<j8r> you are right, you can, but IMO it's not as good as for stateless applications
<FromGitter>
<Daniel-Worrall> Docker is great for stateful applications. You just need to extrapolate the state out using mounting in various ways. You can have multiple database processes accessing the same database information, but you should still introduce sharding for very large databases
<FromGitter>
<Daniel-Worrall> Mounts don't have to be local
<FromGitter>
<j8r> but then, what's the point of K8S?
<FromGitter>
<j8r> a dedicated hosts for the databases will perfectly do the job
<FromGitter>
<Daniel-Worrall> What do you mean? k8s uses mounts
<FromGitter>
<j8r> and will have optimum performace
<FromGitter>
<j8r> For me local mounts are not an option
<FromGitter>
<j8r> and remote mounts add latency.
<FromGitter>
<Daniel-Worrall> For production, sure. Local mounting is used mainly for development
<FromGitter>
<Daniel-Worrall> remote mounts are usually found in the same datacenter, they're only remote in the context of the host
<FromGitter>
<j8r> Some databases can already use sharding/replication natively (ElasticSearch, PostgreSQL, Redis) β No need to have a redundant FS like Ceph then
<FromGitter>
<j8r> I just find the advantages less interesting for this kind of apps
<FromGitter>
<j8r> What we have do with prometheus is running is on a dedicated node, alone, with a local mounted volume
<FromGitter>
<j8r> Because else, there is performance impact
<FromGitter>
<tenebrousedge> you've benchmarked the alternatives?
<FromGitter>
<j8r> On Amazon, the best is to use the local EBS storage
<FromGitter>
<j8r> anyway, it not critical data, that's fine