640 karma · joined June 28, 2019
I think this is fine if and only if you have an application that can subscribe to PubSub.broadcast. The problem is that not everything is Elixir/Erlang or even the same language internally to the org that runs it. The solution (unfortunately) seems to be reinventing everything that made Erlang good but for many general purpose languages at once.
I see this more as a mechanism to signal the runtime (combination of fly machines and erlang nodes running on those machines) you'd like to scale out for some scoped duration, but I'm not convinced that this needs to be initiated from inside the runtime for erlang in most cases -- why couldn't something like this be achieved externally noticing the a high watermark of usage and adding nodes, much like a kubernetes horizontal pod autoscaler?
Is there something specific about CPU bound tasks that makes this hard for erlang that I'm missing?
Also, not trying to be combative -- I love Phoenix framework and the work y'all are doing at fly, especially you Chis, just wondering if/how this abstraction leaves the walls of Elixir/Erlang which already has it significantly better than the rest of us for distributed abstractions.
- Trigger the lambda via HTTP endpoint, S3, or API gateway ($)
* Pretending that starting a fly machine doesn't cost the same as triggering via s3 seems disingenuous.
- Write the bespoke lambda to transcode the video ($) * In go this would be about as difficult as flame -- you'd have to build a different entrypoint that would be 1 line of code but it could be the same codebase. Node it would depend on bundling but in theory you could do the same -- it's just a promise that takes an S3 event, that doesn't seem much different.
- Place the thumbnail results into SQS ($) * I wouldn't do this at all. There's no reason the results need to be queued. Put them in a deterministically named s3 bucket where they'll live and be served from. Period.
- Write the SQS consumer in our app (dev $) * Again -- this is totally unnecessary. Your application *should forget* it dispatched work. That's the point of dispatching it. If you need subscribers to notice it or do some additional work I'd do it differently rather than chaining lambdas.
- Persist to DB and figure out how to get events back to active subscribers that may well be connected to other instances than the SQS consumer (dev $) * Your lambda really should be doing the DB work not your main application. If you've got subscribers waiting to be informed the lambda can fire an SNS notification and all subscribed applications will see "job 1234 complete"
So really the issue is:* s3 is our image database
* our app needs to deploy an s3 hook for lambda
* our codebase needs to deploy that lambda
* we might need to listen to SNS
which is still some complexity, but it's not the same and it's not using the wrong technology like some chain of SQS nonsense.
The major issues (imo):
* Reliance on extending the runtime via the C-bindings (and that changing)
* A community that had largely gotten accustomed to stability being thrust into an enormous change all at once
I think people tend to be in a camp of either "this was good and needed to happen because python had unshakable warts" or "this was bad and we should have lived with language mistakes forever". I think both of those camps conflicting is really what made it really painful - breaking changes were held for years and then once one got in they all came. I think the reality is that coming up with a migration plan incrementally working towards it would give developers more time to focus on one upgrade rather than a full rewrite. Node gets a bad reputation for being "chaotic" or "constantly changing" but the changes are small and manageable comparatively. Go on the other hand has managed to maintain strong stability, but with an ecosystem that's working primarily in the core language rather than the implementation language (C for python).
I think the python 3 merge did a ton of damage to the community's willingness to encourage breaking changes that are needed and it's why packaging and runtime self hosting have been comparatively weak despite a huge userbase.
Not breaking apis is a great ideal but if you have to, breaking them in planned, bite-sized, frequent bursts is often MUCH MUCH better than once a decade.
So, if I understand correctly, I think what you're saying is you "create a post" and the timestamp might have "now" listed as a humanized representation of it being just posted. When it reaches 1 minute, what you're saying is you'd like it to say "1 minute ago" etc. I think this is generally against the goals of htmx and the way you'd accomplish this is one of two ways:
* Find a humanized representation that does not need constant updating
* Use ordinary clientside javascript alongside htmx rendered data attributes to update the output.
I don't think htmx aims to do loads of rerender cycle updates like this. I don't think that means its not a good library, just not a good fit for sites that need this. There are plenty of tools like django templates, rails templates, hugo sites etc that all act like this and require some hand-authored clientside js to handle updates. I think the goal of htmx is to require *as few as possible* without overtly adding js to clientside runtimes.
* How do they afford such an expensive city?
* Where do they go when the work is done?
* Why don't they get the same rights as citizens?
* If the city needs them so badly and has such a hard time finding work, why aren't they allowing migrants a more permanent residency that isn't tied to a specific company?
* Why are companies and the government restricting migrant movement?
* Why do companies (sometimes) charge their migrant workers for the right to work?
* Why do companies (sometimes) withhold the passports of their workers?
* Why does the government punish overstaying a visa with caning?
I think there are a lot of parallels to western wealth disparity but there's still a lot of grossness to the systemic human labor trafficking that is the backbone of the country.
For example: take a look at some of the comments here https://hacker-recommended-books.vercel.app/category/0/all-t... while there are some recommendations (I expect this) there are also quite a lot of people using the book as a way to deride purveyors of its ideology.
I think what we're both experiencing here is an expectation that this list will be GOOD recommendations, but the methodology is popular mentions, which happen to contain some people's (subjective) GOOD recommendations but also peoples (subjective) BAD popular mentions.
Example:
I have userId=4 and userId=2. Suppose a user can have multiple bank accounts and userId=4 has accountId=5 and accountId=6 and a defaultAccound accountId=5. userId=2 has an account, accountId=7; I want to send userId=4 some money so I use the function `sendUserMoneyFromAccount(to: int, from: int)`. This is a bad interface but these things exist in the wild a lot. I could accidentally assume that because I want to send userId=4 the money to their default account that I would call it using `sendUserMoneyFromAccount(4, 7)` and that would work, but if under the hood it wants 2 accountIds, I've just sent accountId=4 money rather than userId=4's defaultAccount, accountId=5.
With prefixed ids that indicate type, a function that assumes type differently from the one supplied will not accidentally succeed.
In addition, humans who copy ids will be less likely to mistake them. This is just an ergonomic/human centric typing.
* "the majority of coc documents" - this feels unquantifiable, but maybe you mean a particular template? Could you point me to one that you take issue with?
* "one particular in-group of people who share extremist beliefs" - which group? Is it the same group for all of the communities or one group per community? Could you help me with an example? Which extremist beliefs? Again, is this per-community or one group with one set of beliefs?
With these concrete examples, what do you personally think could be done by these communities to make would-be well-intentioned-codes more like their abstract, theoretical tool?
That being said, I also think you're not accurately describing social credit or relying entirely on hearsay. For the most part its focused around credit worthiness and financial fraud. I'm not a huge fan of either system, but as somebody who's worked with people harmed by the US private credit system, I can tell you that it's possible to "Nosedive" here and that's not just what I've heard.
[1]: https://world.hey.com/jason/changes-at-basecamp-7f32afc5o
You have an x86 machine running Linux v5.12 which is running QEMU using KVM accelerations. Using this setup, you're able to emulate a machine that can run Xen. Since Xen is a type 1 hypervisor, you would then run a Dom0 and perhaps many DomU machines inside it, let's say Linux here for both.
Hardware > Linux KVM > QEMU > Xen guest > Linux Dom0 guest, Linux DomU guest
(it was #46)