-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
Update the "Compare with Diesel" page to include some more facts #203
Comments
Hi Diesel Team, welcome! I know people would ask this frequently, so I tried to write one up as objectively as possible. Sure, I will try to rework the statements without being too verbose. I may ask for clarification when I can think of some counter-arguments. |
@weiznich |
@tyt2y3 It's perfectly fine to be biased here. I do not find that this comparison is badly written or heavily biased. I would likely remove that claim about compilation times (at least as long as there are no hard numbers for this) and probably soften a few other formulations (like that one saying diesel is tied to native drives, which could just say that diesel uses the native drivers). As for the benchmarks: Sure feel free to suggest something. @baoyachi Yes there are plans for async support in diesel, but unfortunately doing "the right way" that would require fixes for a few bugs in rustc that are open for quite a long time now (Especially rust-lang/rust#59337). Additionally at least I have quite a few concerns about the stability, performance and maintainability of such an implementation. To just shorten this: I personally fail to see that async database connection itself are that important in rust, as database connections itself are generally a resource that will restrict the throughput (as it's running out of database connections). It's just you cannot open thousands of concurrent connections so your service will just wait on the availability of the connection, instead of the response from the server in most cases. That can be quite easily migrated by just using an async connection pool. (There are a few pool implementations out there that support diesel). |
@weiznich I always have puzzles about the It's like I always forget it, compile error, stack overflow and add it again. Can I use that as a counter-argument? |
|
I started to port my (very small) CLI app that uses SQLite as the back-end and there seems to be a lack of a main feature in my opinion: SeaORM is not able to generate entities from SQLIte databases, I receive a message saying "database not supported" and upon reading the code, it looks like only MySQL and PGSQL are supported.
With that in mind, the above phrase was highly misleading for me. I would love to be proven wrong and find out that I missed how I could generate entities from SQLite. |
Yes. The utility is not able to generate entities from a SQLite database dump for now. The recommend way is to go 'Model First', where you write the entity file by hand (or port from somewhere), and then use the create_table_from_entity method to setup a fresh database.
Sorry if that confuses you. We are always trying to improve and expand the documentation. Will add some clarification soon. |
Added clarification
Added clarification
Added clarification
Removed the statement. It was 'probably' as in 'probably the best beer in the world' anyway.
Removed the statement. Finally, I'd say, performance was not the selling point. The point is the programming paradigm, which, probably, at the end, do not have a strict better or worse. Please close this issue if you are satisfied. |
Thanks for the update. I feel its much better now. 👍
Let me use this issue to thank you for your work here. I'm really happy to see some alternative to diesel emerging that explores a different design. I believe its important for the ecosystem to have more than one solution available for such complex crates. Especially if those solutions implement different design patterns, as there is no such thing like the "right" solution here. |
I would like to request that the "Compare with Diesel" page includes some more facts and that some inaccuracies are clarified:
Diesel also allows third parties to implement custom backends, which means there is support for more database "available". Public sources I'm aware of:
Diesel is not tied to any native drives. The default provided backends use the native driver internally but it's certainly possible (and feasible) to implement pure rust drivers. I would estimate that this needs as less than 300 lines of rust code.
I feel that this wording here is a bit to strict. Yes diesel provides an API that can be checked at compile time entirely. But it also provides utilities to write dynamic queries + [there are extension crates for fully dynamic queries].
I would like to see numbers for those claims. I did a short possibly unscientific benchmark and got the following results. I basically did a minimal example with one table and one query:
For all cases the compilation of the diesel based implementation is faster by at least a factor of 2.
I would say that's also true for diesel. (Maybe besides the
table!
macro.)The text was updated successfully, but these errors were encountered: