-
Notifications
You must be signed in to change notification settings - Fork 1
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
Pocketbase #28
Comments
IMHO, PocketBase is a interesting piece of software. It took me a while to figure out what you had in mind with this feature request. I think you would benefit from explaining your toughs and giving some use cases with some imaginary code. If I understand you well, PB whould be a backend interface to implement the main business logic, then xtemplate would implements the front end logic. xtemplate would make requests to PB in a way or another, making it able to get collections defined in PB, something like:
to get the object from the "pages" collection with the "slug" field equal to "home". Am I right ? xtemplate would generate entire pages with some htmx that would request some html fragments, also generated by xtemplate. Am I getting it right? In this case, it would be a elegant way to provide RAD web developments. But:
I did not dive into how xtemplate is (or not) expandable but, I think that, if possible, PB-xtemplate should be available as a plugin or a module. |
thanks for the comments .., here we go ..
Sure can do a few use case s that I see . But in another comment as I don’t have time right now ..
yrs that’s pretty much spot on ! Xtemplate is a clever router . PB is the clever data layer .
yes It also has a file system API too that Xtemplate lacks .
logic should go in benthos and its versioned because it’s git ops .
I get that you want an agnostic db layer and it’s elegant I propose pb is a different interface . It’s not a traditional DB . It’s much more .
Yes you have reached the same conclusions as me |
PB does support SSE :) so don’t have to deal with awful web sockets . ties in nicely with template and benthos then . |
Use cases are pretty obvious . any system that needs to respond d to changing data and surface that to the gui or to any workers that carry out kind running things like sending data to no gui channels too . any system that needs fully integrated Auth and AuthZ. PB can model authz against the data , and so gives fine grained security for whatever use csss you have extending to multi tenant scenarios also which matches perfectly with XT and caddy which supports multiple domains. global scaling out is easy because PB can be multi master replicated using NATS and Marmot . I run it this way now . So that teams up fantastically with XT that already uses NATS. Which btw also teams up with the PB FS API for file replication using either S3 minio or NATS object storage . I actually prefer to use nats object storage because its 1 less dependency but mainly because its multi master and so we keep the data close to the compute logic , just like how PB is close to the compute logic . Latency is massively reduced , but your compute and storage are the same servers so you need to be a little careful with the types of servers you provision from . This makes operations far simpler for the average punter to not need an S3 somewhere . Any use case where you need to add logic with Benthos . WASM workers is what I use for logic that benthos runs . Blobbing is what I use for logic and complex validation. You can reuse the PB Auth / Authz in the benthos logic for validation also . Any use case where you want a HOWL stack . Because XT is not a software language but rather a DSL it’s HOWL and so not specific to golang developers . Benthos is the language in a way because event passes through it to PB . There is now a benthos called Wombst that has a proper plugin model too that is openly licensed . Been using it . It can easily support more plugins as processing plugins . I use it currently for logic but also to ended non web GUI for PDF, image processing and video transcoding . I raise this point because it vastly expands XT allowing it to serve PDF, Trancoded images and videos , which web projects also sometimes need. The email template g that PB provides is mainly just for Auth . A benthos plugin can provide email templates for when you need to send emails with PDF,s attached and some basic email text with transcoded image logo. helps too see where PB and Benthos work well with XT. Btw I really wish XT had more examples because it is too hard to use currently due to it having its own Abstractions . Caching and Cloudflare can be used too . I currently use the WASM golang plugins for benthos also on Cloudflare . The compilation is exactly the same . Just golang WASM. This means that XT an be your origin and Cloudflare can be your Edge . This works for all the transcoding that I do such as PDF, images. This is a highly advanced use case but helps to show an advanced roadmap of how benthos and PB can work with CDN and XT for a global scaled out system . You can then run XT is a single region but get cloud caching from cloud flare . I run things this way currently . Cloudflare WASM workers that are programmed in golang make direct calls to PB over http . This would then just travel through via XT / caddy to PB , thus providing the highly needed security layer . PB Web API is not secure enough on its own . |
Well, my bad, this is not exactly what I mean by use cases. On the one hand, we can say that we can assemble an engine with wheels and have as a use case a trip from Paris to Berlin or Rome, but not New York. This doesn't tell us much about the desired experience. These use cases would be just as suitable for a bike as a car, autonomous or even a taxi. BTW, I googled a while searching for what Benthos is. I found a lot of stuff, but not at all web or even computing related. At least, I found something named Redpanda, and, googling for both, I found that Redpanda acquired Benthos in May. As I didn't know both before, I wonder how Benthos was used (or how, concretely you use it), and what is the impact of this acquisition on Benthos. And I don't really understand what it has to do with Xtemplate. To put it in one sentence: I'm very pleased and grateful to see your enthusiasm in engaging in the same projects as me, but I have some hard times to understand where and how you wanna go, as you are often abstract and talking about mixing tools I've never heard about before. It makes me think I should provide a roadmap for my own project (LLW) and, maybe, you should do so, so we can compare notes. |
I am def a systems architect and think in abstractions because I have been working with these tools for ages . glad you found Redpanda. Yep it’s the new benthos. Still works like benthos so all good . Roadmaps are great . Can do that for sure . also what about a chat on signal one day ? Mine is on my github repo profile. |
I’m exploring using pocketbase PB with Xtemplate .
It’s sort of like a DB and Real time system in one with auth all the way through . It’s throws events over web sockets . Wish Is was SSE , but such is life :)
do you can have a record changes and then update all gyi effected using htmx and SSE. So all users stay up to date .
you can call it over http , so I currently use it with benthos to do any json mapping on the way in and out .
it also has an FS system for local and remote.
PB is real time so that when any record changes it tells you .
Xtemplate has the htmx stuff I need
benthos is where you can do custom logic / validation
The Xtemplate providers are nice still and useful ..
One thing I find hard with Xtemplate is sitting it all and understanding it . More examples would def help .
The text was updated successfully, but these errors were encountered: