Thread: What do we think about Proxygen?

  1. #1
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665

    What do we think about Proxygen?

    Introducing Proxygen, Facebook's C++ HTTP framework | Engineering Blog | Facebook Code | Facebook
    GitHub - facebook/proxygen: A collection of C++ HTTP libraries including an easy to use HTTP server.

    So yeah, Facebook has an open-source HTTP library written in C++. And it seems to support C++11 as well. So that's pretty exciting.

    I'm thinking about trying it out this weekend. Also, today I learned that in CMake, you declare the project before you find_package().

  2. #2
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    Quote Originally Posted by MutantJohn View Post
    Introducing Proxygen, Facebook's C++ HTTP framework | Engineering Blog | Facebook Code | Facebook
    GitHub - facebook/proxygen: A collection of C++ HTTP libraries including an easy to use HTTP server.

    So yeah, Facebook has an open-source HTTP library written in C++. And it seems to support C++11 as well. So that's pretty exciting.
    BSD license, nice. Another library to add to the list of "might use it in a future program". For C I'd use Libmicrohttpd
    - GNU Project - Free Software Foundation


    Quote Originally Posted by MutantJohn View Post
    Also, today I learned that in CMake, you declare the project before you find_package().
    Welcome to hell.

  3. #3
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Welcome to another Linux-only project. We don't need that. Facebook might, but we don't. We already have a HTTP library that's portable. It's called Casablanca.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #4
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    In the README it says that it's likely to work on many different platforms. It's also somewhat appropriate because I imagine most servers in the wild are running Linux in the first place.

  5. #5
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    Quote Originally Posted by Elysia View Post
    Welcome to another Linux-only project. We don't need that. Facebook might, but we don't. We already have a HTTP library that's portable. It's called Casablanca.
    "We" being the minority, as the majority of servers are run on Unix-like OSes. Also, it'll probably run on Cygwin.

    Waiting for you to say that IIS is a good option on Windows or something to that effect...at which point I would lose all respect for you, and probably put you on ignore.

  6. #6
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    One thing I do like about Casablanca though is that it's very forward with the REST aspect. To me, that's actually important. I like the API design that reflects verb + noun. I think it lends itself well to very natural and self-documenting APIs.

  7. #7
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Elysia View Post
    Welcome to another Linux-only project. We don't need that.
    For someone who wouldn't spend a single keystroke to write portable code, you seem too annoyed by people that write non-portable code to a platform you don't use.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  8. #8
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Btw, I actually pulled down the repo and it failed to build. Lame.

  9. #9
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Mario F. View Post
    For someone who wouldn't spend a single keystroke to write portable code, you seem too annoyed by people that write non-portable code to a platform you don't use.
    Ignorance is a bliss, I guess. I do make sure to keep to the standard and use portable libraries, so YES, I DO write portable code, and I make effort to do so.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #10
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Elysia View Post
    Ignorance is a bliss, I guess. I do make sure to keep to the standard and use portable libraries, so YES, I DO write portable code, and I make effort to do so.
    Really, are you sure? Using standard or portable libraries is just the beginning of it. Except for the most simplistic of applications, which perform mundane tasks and read from standard input and write to the standard output, you will not achieve one ounce of portability with them. Some libraries do make it more transparent than others, I'll agree. And you can indeed write portable code without knowing it. But I doubt they will be more than just utilitarian libraries.

    There's the notion of a portable library, and the notion of the portable code you need to write on top of them in the context of the entire project, and I'm not sure you are distinguishing the two. Or, to put it in another way, you are confusing writing standard and well formed code that leads to portability, with portable code itself.

    So I am curious, what kind of projects do you write? When you claim to be writing portable code and yet know nothing about the particulars of these target systems and very likely haven't even compiled once on them, I can only assume very simple IO projects. Also, what makes you think that a project like Proxygen which is an http server from scratch can be easily made portable by just "using standard code and portable libraries"?
    Last edited by Mario F.; 07-18-2016 at 04:55 AM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  11. #11
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Mario F. View Post
    Really, are you sure? Using standard or portable libraries is just the beginning of it. Except for the most simplistic of applications, which perform mundane tasks and read from standard input and write to the standard output, you will not achieve one ounce of portability with them. Some libraries do make it more transparent than others, I'll agree. And you can indeed write portable code without knowing it. But I doubt they will be more than just utilitarian libraries.
    I did not say I extensively write and test to make sure what I write is portable. But you said For someone who wouldn't spend a single keystroke to write portable code, and that's what I said is plain wrong. No, it's not a priority. No, I don't aim to have it as a high priority. No, it's that THAT important. But YES, I do try to write portable code that, with some modifications, can be compiled on other platforms.

    I do this by focusing on writing standard-compliant code that can be compiled with all compilers and that avoiding platform-specific APIs. Yes, there's a lot more to portable code sometimes, but I don't aim to have it all portable because it's just not something I need. There just aren't any other platforms where I need to use this which I'm interested in. These are my own projects, which I don't sell or give away publically, so I don't see the point.

    You're probably going to criticise me for not writing portable code and complaining on others for not making a portable library. And you have that right, as well as I have the right to complain. I am not going to mind if anyone complains. But you criticised me on a point that was incorrect, and I wanted to correct that.

    So I am curious, what kind of projects do you write? When you claim to be writing portable code and yet know nothing about the particulars of these target systems and very likely haven't even compiled once on them, I can only assume very simple IO projects.
    Recently, nothing really. I WOULD like to do a specific project to replace Microsoft Access, but that's going to be a lot of work because database abstraction layer. But no, I am not doing "simple" I/O projects. The most complicated one I can think of was a program that took recorded gameplay, added some video effects, split them into segments and uploaded them to youtube with a single click. This involved video processing, video encoding (done on the GPU) and network uploading.

    Also, what makes you think that a project like Proxygen which is an http server from scratch can be easily made portable by just "using standard code and portable libraries"?
    Did I say it's going to easy? No. Do I still think they should've made the library portable? Yes, because Linux is only a small percentage of the market. Ideally, libraries should be available on Windows, Linux and Mac.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  12. #12
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Elysia View Post
    I did not say I extensively write and test to make sure what I write is portable. But you said For someone who wouldn't spend a single keystroke to write portable code, and that's what I said is plain wrong. No, it's not a priority. No, I don't aim to have it as a high priority. No, it's that THAT important. But YES, I do try to write portable code that, with some modifications, can be compiled on other platforms.

    Ok. So, in that context I'll say it again, now using words that will hopefully fit your criteria:
    For someone who doesn't prioritize portable code and doesn't even consider it that important, you seem too annoyed by someone who writes non-portable code to a platform you don't use.

    Quote Originally Posted by Elysia View Post
    Recently, nothing really. I WOULD like to do a specific project to replace Microsoft Access, but that's going to be a lot of work because database abstraction layer. But no, I am not doing "simple" I/O projects. The most complicated one I can think of was a program that took recorded gameplay, added some video effects, split them into segments and uploaded them to youtube with a single click. This involved video processing, video encoding (done on the GPU) and network uploading.
    Safely assuming you don't plan to write a Microsoft Access replacement that works on Linux or MacOs and placing another bet that your video editor wasn't compiled to support both NVIDIA and AMD GPUs, pause for a moment. Stop and look back at your statement in post #3. And admit there is no sense in what you said.

    And I am even discarding the argument that Linux is exactly the platform where we need these type of projects, for reasons that Epy have already mentioned. I'm instead just arguing about the inherent hypocrisy of your statement.
    Last edited by Mario F.; 07-18-2016 at 07:02 AM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  13. #13
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Mario F. View Post
    Ok. So, in that context I'll say it again, now using words that will hopefully fit your criteria:
    For someone who doesn't prioritize portable code and doesn't even consider it that important, you seem too annoyed by someone who writes non-portable code to a platform you don't use.
    As I already mentioned, feel to criticize me. I don't mind. I accept that it may seem like hypocrisy. It's my choice. I've made it.

    Safely assuming you don't plan to write a Microsoft Access replacement that works on Linux or MacOs and placing another bet that your video editor wasn't compiled to support both NVIDIA and AMD GPUs, pause for a moment. Stop and look back at your statement in post #3.
    I won't do it for linux because I have no need for linux. The video editor was compiled to support nVidia only because 1) I know of no platform independent API that does what I want and 2) I don't have an AMD card and don't plan on invest one and 3) I don't want to spend resources on maintaining code for BOTH cards unless I need to. It makes no sense.

    And admit there is no sense in what you said. And I am even discarding the argument that Linux is exactly the platform where we need these type of projects, for reasons that Epy have already mentioned. I'm instead just arguing about the inherent hypocrisy of your statement.
    I never argued against Linux being a supported platform. I argue against Linux being the ONLY supported platform. For a big project by a huge company (Facebook), to only limit themselves to ONE platform seriously hurts everyone who has decided, for whatever reason, to not use Linux.

    I know I'm hypocritical, but in my opinion, I have the right to be. I just develop small programs for my own needs, not big software or libraries for others to use. Plus I'm only a single dev. If I had to support other operating systems and stuff, it would just forever to develop, and I get nothing from it! Facebook is a huge company with tons of resources. Apparently they've only chosen to open source some internal project without bothering to make it usable on other platforms. I don't like the approach at all.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  14. #14
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Oh God, server stuff on Windows...

    I think there's a very strong reason why Facebook decided to target Linux specifically, even if it does fail to build on my machine.

  15. #15
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by MutantJohn View Post
    Oh God, server stuff on Windows...
    Did you ever try?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Tags for this Thread