-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Base on vite-plugin-ssr
#13
Comments
You'll likely have many open questions about the relationship between Nastoalgie and these libraries, I'm happy to elaborate. (They have many convergences!) |
Hey @brillout, I've taken a quick spin through Some things that I observed in reviewing
Something that is not yet evident in Nostalgie's codebase is that I hope to make the browser --> server communication less chatty. Basically, I plan to defer the actual http request and collect batches thereof. These would be I've been tossing around the idea of starting a Discord server for higher-bandwidth discussions. Would you be interested in that sort of thing? Other ideas? |
We seem to agree on a lot!
There is a new version that I didn't release yet that improves this.
Yes, allowing tight integrations is definitely a goal.
I'm curious; why don't you like it? While secondary, I find aesthetics do play a non-negligable role.
The aforementioned unreleased version allows telefunctions (the new version is called Telefunc instead of Wildcard API) to be defined as arrow functions.
It took me a while to get there :).
So neat what they are doing with Wasm. It's going to take a while but I can't wait for their platform to mature enough to be able to ship full-stack WebAssembly apps to Cloudflare, including a Wasm database client.
When you think about it, this actually does not really happen with RPC. This is a RESTful problem, not an RPC problem. The thing here is that you define telefunctions to retrieve exactly what the frontend needs. This means you end up with one telefunction per frontend need. Given our RESTful habits, it takes a bit of time to get accustomted to the RPC-way. But once you get the feel of it, it's super neat.
Sounds good. I'm flexible; I'm fine with async writing as well as sync chat / video call :-). Curious to see how this is going to go. One thing we do disagree on though: I believe Also, we should discuss authentication. From first sight, I really like your auth plans, and I believe you'll appreciate brillout/wildcard-api#59. Your plan and Wildcard Sessions fit well. (Wildcard Sessions is already used in production.) |
Hi @brillout, I've put together a Contribution Guide whose intent is to help explain the codebase's organization and architecture. Hope you enjoy! I've taken a look at the wildcard sessions issue and it does look interesting. I have some pretty strong opinions on this subject as an Auth0 employee. I think that many auth solutions do a great job at authentication but then fall short on authorization. One of the interesting ideas in the |
The realtime / bi-di communication looks really interesting to me! |
Neat, I guess I should do the same.
Yea, I can't wait for one of my user to need this, I'll then implement it. My plan is to simply use non-closing HTTP responses, while requiring the user to use HTTP/2 in order to remediate the concurrent number of connections limit problem.
Love it, me too ;-). Wouldn't programmaticallly defined permissions be enough? import { server, context } from "telefunc/server";
server.updateTodoText = async (id, updatedText) => {
const todo = await Todo.findById(id);
// Programmaticallly defined permissions
if (!todo) return;
if (!(context.user?.id === todo.authorId || context.user?.isAdmin)) return;
todo.text = updatedText;
await todo.save();
};
Would love to hear your opinion on that. I'm happy to be contradicted. R :-) |
The vision for Nostalgie is to help build the Frontend and that frontend's backend (backend-for-frontend). These two are developed and deployed as tightly-coupled components. The Frontend talks to its backend's Server Functions. This backend for the frontend is a place to hold credentials and make calls to other APIs in a Service-Oriented Architecture. To be able to make authenticated requests to these API servers, there are two high-level approaches:
Nostalgie's authn / authz design aims to facilitate the 2nd scenario, without making the first any harder. This is the sort of 'step-up authentication' I'm talking about. Using it, you can gradually (or just on-demand) increase the authorizations issued to the user's session as the user attempts to perform operations requiring higher / different privileges. Programmatic authorization is fine in simple cases but usually falls short in larger, SOAs. |
The way I see it is that a forward-thinking SSR framework, like Nostalgie needs a deep integration with 'a router' to be able to fully hydrate arbitrarily complex routing designs. I picked A user can easily build an app with Nostalgie that doesn't use any routing and thereby not have their front-end chunks contain any extra routing code. However, Nostalgie wants to provide a deeply-integrated solution and url-based routing is a fundamental primitive of the web so it has made a bet on |
I agree with As for authn / authz, I'm not sure I'm following; I'm not seeing a concrete situation where something as sophisticated as you decribed is needed. In the end, the API simply has to know who is doing the request, his permissions, and decide whether to authorize the request. That's it, right? |
There is work in progress for a deep integration between vite-plugin-ssr and Vue Router. Something similar could be done for React Router. Maybe we could consider rebasing Nostalgie on https://github.com/brillout/vite-plugin-ssr. Nostalgie would then have a rock-solid SSR foundation. |
I'm working on
The goal of these do-one-thing-do-it-well libraries is two-fold:
Is collaborating something you'd be interested in?
The text was updated successfully, but these errors were encountered: