Giter VIP home page Giter VIP logo

Comments (9)

iamazeem avatar iamazeem commented on August 26, 2024 1

@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.

supamii avatar supamii commented on August 26, 2024 1

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:

  1. Url routing mechanisms are provided
  2. 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.

supamii avatar supamii commented on August 26, 2024 1

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.

supamii avatar supamii commented on August 26, 2024

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.

supamii avatar supamii commented on August 26, 2024

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.

iamazeem avatar iamazeem commented on August 26, 2024

@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 this C\:/file.cpp. But, when I tried it with the Makefile.Debug and Makefile.Release, it didn't work.
  • Another thing that came up was that there might be issues by referencing files in INCPATH if the header files are already including in source files. I moved the header and source files of libuv 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.

supamii avatar supamii commented on August 26, 2024

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.

iamazeem avatar iamazeem commented on August 26, 2024

@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.

iamazeem avatar iamazeem commented on August 26, 2024

@supamii
Any update on this one?

from qttpserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.