Comments (9)
@supamii
Yes. I'm using MinGW 5.3.0 (32-bit)
.
BTW, it's amazing and surprisingly this project is covering a lot of things that other Qt HTTP projects are not. I guess the focus here is providing a complete solution for restful services for Qt. I liked the feature to resolve dependencies using Git. Loved it, to be honest! <3
I'd suggest that it should accompany an HTTP client too. I've seen the issue (enhancement) regarding providing SSL/TLS support and I hope to see it soon. It would be awesome. Just can't wait to get my hands dirty to test this one though. :-)
~ AZEEM ~
from qttpserver.
First off, as far as Qt's TcpServer goes - I have analyzed its blocking-synchronous mode and it shares much of the tcp advantages boasted by libuv
. To be specific, it leverages poll
instead of select()
- see: http://www.kegel.com/c10k.html. Here's the qt code base: http://code.qt.io/cgit/qt/qtbase.git/tree/src/network/socket/qlocalsocket_unix.cpp
With that, there's really no reason not to use TcpServer in a blocking/synchronous way! You can check out this very popular version here: https://github.com/nikhilm/qhttpserver
Advantages of QttpServer:
- Url routing mechanisms are provided
- Has its own event loop (might not be entirely a good thing depending on your needs)
What I do enjoy about libuv is the amount of control that we potentially have.
Personally - I have a personal mission to see this compared to performance and memory consumption against other popular NodeJS solutions
from qttpserver.
I've reopened again - since it still seems possible - i am slowly working in the MINGW config flag to see just how far i can get
i got side-tracked on windows build issues and i'll try again tomorrow
from qttpserver.
Ah interesting... are you using mingw? These seem like GNU error messages, for example:
https://www.gnu.org/software/make/manual/html_node/Error-Messages.html
http://stackoverflow.com/questions/13268517/cannot-specify-c-with-multiple-files
I've only tested against MSVC as indicated in the docs - but I can dig around later on my windows machine to see what the issue is - it would help if you can give me your mingw version as well
from qttpserver.
Update:
First, the bad news - it looks as though minGW is minimally supported by libuv, the heart and soul of qttpserver.
https://github.com/libuv/libuv/blob/master/SUPPORTED_PLATFORMS.md
However there have been some (relatively) recent changes to support mingw seen here.
So regardless, I'm going to continue to reconfigure qmake files to have it be mingw friendlier - it's hard to tell at this point if there'll be any serious road-block that'll prevent it.
In the meanwhile, is MSVC an option for you at all?
from qttpserver.
@supamii
Well, that's too bad!
I'm using Qt Creator
. For cross-platform development, I need to stick with Qt
only.
I did some digging and found some interesting things:
- The
:
as a separator in filenames doesn't work e.g.C:\file.cpp
. It might work by preceding a\
with:
like thisC\:/file.cpp
. But, when I tried it with theMakefile.Debug
andMakefile.Release
, it didn't work. - Another thing that came up was that there might be issues by referencing files in
INCPATH
if theheader
files are already including insource
files. I moved the header and source files oflibuv
in separate folders. And, again it didn't work! I guess there might be more to it.
Anyway, I'd try to have a look at QttpServer
on Mac
.
Just to have a flavor of it. :) Hope that'd work fine.
A quick question. I guess Qt
has everything to create a good server so why not use its features?
Any specific reason to use libuv
here? Just asking.
from qttpserver.
It doesn't look like I'll be able to support MinGW without replacing poll.h
which I'm not enthusiastic about. I'd prefer to employ only underlying sockets that all operate as intended- I don't see the benefit in faking out any OS APIs.
I'd like to clear up a bit of confusion that we've had too.
So if you are going to develop on a windows machine - I encourage you to install Visual Studio 2015 (or newer).
After you install MSVC 2015+, you'll have at your disposal the compiler (cl) and the rest of the toolchain that Qt can then use to build libuv
.
I hope that makes sense - let me know.
from qttpserver.
@supamii : Thanks for working on this! I really appreciate that. <3
For now, I'm using QtHttpServer
but I'm looking for to use the things like a separate isolated event loop, URL routing, HTTP client with its own event loop (if need be), etc. And, I hope QttpServer
would be offering all of these seamlessly on all the platforms that Qt
supports.
Regarding event loop for descriptors, IMO the epoll
is by far the best solution compared to select
and poll
. I've used it in the past and it works great. But, that was for linux. I don't know if it's equivalent is available for Windows.
Anyways, I hope you'll come up with a solution for this! :) Best of luck! 👍
from qttpserver.
@supamii
Any update on this one?
from qttpserver.
Related Issues (20)
- Uploading files HOT 5
- build and use mongodb driver HOT 2
- multiple routes in one Action HOT 1
- Cannot run it inside a pthread. HOT 1
- ssl certificate and https HOT 3
- Compile error on windows 10 HOT 6
- Async responses
- Swagger: Supply per-route description and summary for each action HOT 3
- Allow CommandLineParser.parse() instead of .process()
- keep-alive does not work HOT 2
- Error linking an application HOT 1
- Threading: Race condition and crash on QttpResponse::close
- do you support REST hooks or web hooks ?
- Is it possible to use a hostname instead of a binded ip ?
- Latetst version
- auto-generate api monkey/smoke tests from actions
- clean up headers for public consumption
- write unit tests for node.native HOT 1
- introduce server diagnostic API endpoint
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qttpserver.