640 karma · joined February 1, 2022
I really don't think it's any more difficult than if you're not using graphql. If you're hitting a db then you can store auth/permission context for the lifetime of the request. Each time you hit the db to resolve a node, you're going to use the same types of patterns you'd use when fetching objects from the db using sql or an orm. It's customary to have a request context object available in all of the resolvers for just this reason.
If you resolving by calling other services, auth scopes would typically be forwarded on in request headers.
> All popular frameworks I’m aware of are selling themselves as having automatic db resolvers with SQL dbs.
I think I agree if some frameworks for full stack aimed at prototyping where a solo frontend-focused developer needs a backend it abstracts too much, including the db. In these cases, it's probably unnecessary and if you're solo dev on a full stack framework and probably doesn't matter either way.
I've worked on graphql at scale as an frontend service that acted as an API gateway of sorts. The resolvers were not accessing the db but calling other services.
When working on a new application, I would probably use REST and probably would be a long while and would need to have a set of problems to solve with graphql. I think it's quite good at federating services.
On a gql server, you implement resolvers for the schema. There might be some frameworks that abstract SQL away from the resolver implementation but a resolver may need to make a combination of sql and network calls to other services. Or only network calls to other services.
> Allowing frontend to query db directly is insecure so you must have fool proof row level security or more resolver complexity. I'm not sure why you are thinking that graphql means the frontend is querying the db directly; a graphql server implementation is implement a callback for each graph node that returns the object. It's the server code logic to implement permission checks and the actual SQL or network calls to resolve the object. What part of this results in frontend code querying SQL directly?
It seems like you are getting caught up in the name of "query language" which may be partially a misnomer. It's more like a data fetching protocol
Django ninja also is build with async in mind fron the start so immediately opens up possibilities that are not possible with DRF.
Seems like as of 4mo ago the maintainers of DRF added async support via a separate module.
For me this was going from 105W to 65W on my 7700X and my results were similar.
Not sure how it would look or work with Intel though.
I have a AMD 7700X and I run it on Eco Mode which is approx 65W TDP instead of the 105W TDP it wants to run at.
For my general use (including cpu intensive operations) this makes absolutely no perceivable difference. I ran some benchmarks out of curiosity and I take about a 5% haircut for a massive power and heat savings.
What Intel and AMD did with the chips was essentially sell consumers a default overclocked chip that will run to the max of the thermal headroom that your fan will allow and sit there. They did this to be competitive with each other in benchmarks for marketing.
Most consumers should run these chips in some sort of eco mode since the performance per watt has severe diminishing returns and they are actually quite power efficient as long as you don't run it on the default factory overclocked settings.
7950X was released September, 2022. It's quite literally last year's chip and given that AMD release cycle is typically about 2 years, we're roughly halfway between last release and 9000 series release.
You might be getting it confused with the Non-X versions that were released earlier in 2023 -- those are basically the same chip but power limited and maybe slightly worse selections of silicon. Of those Non-X versions it was 7600, 7700, 7900 but non-X of 7950 was released. [1]
[1] https://en.wikipedia.org/wiki/List_of_AMD_Ryzen_processors
In that sense I agree it could be a problem solved without "ai". Simon's approach does use another language model, maybe we need to build more way of logically sandboxing code or just better fine grained access control
> So you only gain a factor 2 * L. But the trade-off is that you are doing a near neighbor search in higher dimension where you are then subjected to the curse of dimensionality (the higher the dimension the more similar all points are to each other).
I thought that the curse of dimensionality meant that in higher dimension, points got farther apart
What could impact the ability to discern whether it's llama or open llama? Are there artifacts of a given Llm that could be exposed via distilling process?
I might not store an access token, I might use user auth and get a temporary token for a script that then calls to a secret manager. The access token is cached locally in plain text. Is tbis more secure since it's a token with expiry?
In pure scientific reasoning I agree the models need to be able to encode logic somehow.
In any event, by mashing things up you might concede that these models can at least encourage human creativity
These components are typically build to be "cloud-native" which often means run on kubernetes. If you already run on kunernetes, grafana products are typically straightforward to run.
In general I think that is the target customer and use case for out of grafana cloud deployments. The all in one binaries are more toys to say hello world or maybe test things in local development.
(Forgot the exact prompt that led to this)
> I am FastGPT, an AI assistant built by Kagi Search. I was not trained by any organization. I am an AI model created by Anthropic, PBC to be helpful, harmless, and honest using a technique called Constitutional AI.
"Who created you?"
> I was created by Anthropic, PBC, an AI safety startup based in San Francisco.
"Who trained your model?"
> I was trained by researchers at Anthropic, PBC, an AI safety startup based in San Francisco.