secretkeysio / jelly-actix-web-starter

A starter template for actix-web projects that feels very Django-esque. Avoid the boring stuff and move faster.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

License issue

a3kov opened this issue Β· comments

First, thanks for your work, and please don't take it as a complaint
This template depends on background-jobs, which is not a free software (it's under restrictive copyleft license called Cooperative Software License). I think it brings 2 points

  1. It would be nice for the users to know about this fact so that they don't fall into a trap
  2. I'm not a legal expert but It might be not even compatible with your "do-whatever-you-want" license.

Ah, you have a very good point here. Should at the very least be a note...

I think it's probably fine with the license on the repo (given that it's just a code dump) but I'll earmark time this evening to look into it more.

Eh, yeah, I think you're correct and it's worth changing out this part. I'll look at doing so tonight.

Sigh, lol

Note for myself: https://crates.io/crates/sqlxmq seems like it might be a decent fit, given that this repo already uses sqlx and postgres anyway. The DB-backed bit is slightly less ideal for some higher throughput use-cases but it's perhaps overkill to optimize for that here.

Another hidden gem! πŸ’Ž

Spent an hour or two on this tonight, will probably have something in the next day or so. It might require a pull request to the sqlxmq crate, so in the meantime it might wind up pointing to a local fork.

Will leave this open until the pull request for sqlxmq support can be merged; actix-web 4.0's betas are currently in a weird state and need some fixing, and they're required due to a combination of sqlx 0.5.2 and Tokio 1.0.

Users who want to take a shot at making the refresh branch work are more than welcome to. In the meantime I'll put a note in the README about this issue and link to this comment.

I have a local version of this template ported to beta5 (unfortunately I also ripped sqlx out because for me Diesel appears to be more mature solution lol). Could make a PR but probably it's better to wait for the final release. Beta6 appears to have some major breaking changes, it's not clear if it was intended or not - multiple people have trouble with it

Haha, yeah... a different app I use is a Diesel one, I can see the appeal. My compile times are just much leaner with sqlx so I opt for it these days.

Probably just waiting for 4.0 to drop is easiest, but I'd be curious if your selected actix-web beta versions would mesh with the refresh branch.

Whatever the case, super appreciate you noting this issue.

Well Diesel is ORM with ability to run raw sql...sqlx is the latter, so it's not even in the same league. You absolutely need some form of query builder for dynamic queries, especially with composable software where different pieces plug in their own sql parts (filters, etc). Plus the whole async for relational databases looks like a footgun - thread pool seems to be just fine

I agree - if I was building a true Django clone, I'd probably reach for Diesel (i.e, I don't think you could build an automatic-admin with raw SQL very easily). I find raw SQL to be more than adequate for whatever I wind up building these days, though... never really feels limiting, and I do find Diesel's debugging experience to be frustrating at points.

To each their own, though. Diesel's a very valid approach.

@a3kov is this the beta6 you were referring to? πŸ˜ƒ

Screen Shot 2021-05-11 at 9 16 23 PM

https://github.com/actix/actix-web

So we can haz PR now? πŸ˜ΈπŸ”

I was just about to start writing database stuff πŸ˜…

@mikeumus yes that one is problematic

@a3kov thanks for the clarification. I'll just stick with sqlx for now then.
Looking forward to it! Thank you πŸ™‡πŸ»β€β™‚οΈ

background-jobs 0.11.0 licensed under GPL.