C++ Middleware Writer

Discussion in 'C++' started by woodbrian77@gmail.com, Aug 5, 2012.

  1. Guest

    I have to put something in the makefile. I switched
    it to Os from O3 based on my observations here. I also
    tested switching from O3 to Os on another program and
    found the same results -- equal run time results and
    better build times. So I decided to make Os the default
    for now. From reading about Os, it uses most of the
    O2 optimizations.
     
    , Oct 27, 2012
    #21
    1. Advertisements

  2. Guest

    O3 often contains optimizations that will increase binary size a lot and may even have negative impact on performance.
    O2 may be a good compromise between Os and O3.

    Tobi
     
    , Oct 28, 2012
    #22
    1. Advertisements

  3. Guest

    I found this to be an interesting perspective:

    "-O3 is the highest optimization level and could
    possibly make faster code but the applications that
    benefit from it are very few, usually image and
    video decoders and such. However the side effects,
    like larger binary size, affects everything.
    Larger binaries use more memory, load slower,
    cause more disc I/O, etc. So compiling a system
    with -O3 will have the effect that a few
    applications run slightly faster at the expense
    of the rest of the system running slightly slower
    and becoming less responsive."

    The program I noticed the increase in size is a
    server that users run. It isn't expected to be
    the primary application running on a machine.
    It is likely to be one of a number of servers
    on a machine.
    It does seem that O2 or Os is a better default
    for this particular server.
     
    , Oct 28, 2012
    #23
  4. [Changed my newsserver, this one seems to accept my posts. Now I don't have
    to resort to Google Groups anymore.]

    Probably O2 is a better default than O3 for almost everything, not only for
    your server.
    I think it's also what most people use.

    Tobi
     
    Tobias Müller, Oct 28, 2012
    #24
  5. Jorgen Grahn Guest

    And as far as I can tell, that's as close to the truth you get. g++
    -O2 is almost always beneficial; -Os or -O3 is *probably* worth it,
    but it depends heavily on the application, and at least some on the
    exact cache sizes etc of the CPU it's executing on.

    /Jorgen
     
    Jorgen Grahn, Oct 29, 2012
    #25
  6. Guest

    I removed the Windows support for the middle tier.
    The middle tier runs on Linux and Mac OSX and it
    should work on other UNIX flavors. The new version
    of the code --

    http://webEbenezer.net/misc/cmwAmbassador.cc

    is about 40 lines smaller without the Windows related
    code/junk. To reiterate, the front tier still works
    on Windows, but have for the time being decided to
    drop Windows support for the middle tier.


    Brian
    Ebenezer Enterprises
    http://webEbenezer.net
     
    , Jan 9, 2013
    #26
  7. æ–¼ 2013å¹´1月10日星期四UTC+8上åˆ12時49分05秒寫é“:
    In the user interface part, I think the O2 and Os
    switches help a lot.

    But in the heavy work horse part the O3 mode
    is required.

    Anyway it acctually depends upon the ratio of the
    interfaces and the work horses involved in the system.
     
    88888 Dihedral, Jan 10, 2013
    #27
  8. Guest

    I'm reviving a classic thread rather than starting a new
    thread. If you can provide some ideas on how to improve
    the code or documentation of C++ Middleware Writer,
    please let me know.

    I was looking at Springfuse

    http://springfuse.com

    and they say:

    "Configure Springfuse and generate your project foundation"

    I don't know their service that well, but the use of
    the word foundation seems questionable. At least for
    CMW I wouldn't describe it as providing the foundation
    of your project. I want it to be a helpful tool.


    Brian
    Ebenezer Enterprises
    http://webEbenezer.net
     
    , May 27, 2014
    #28
  9. Guest

    They also say "Generate an application now."

    I wouldn't be comfortable with that on my site. The CMW
    doesn't generate applications. You have to generate your
    own application. The CMW can help you build an application,
    but that's as far as I would go.

    Brian
    Ebenezer Enterprises
    http://webEbenezer.net

    Brian
    Ebenezer Enterprises
    http://webEbenezer.net
     
    , May 27, 2014
    #29
  10. Guest

    This is a function written by the C++ Middleware Writer:

    inline void Marshal :):cmw::SendBuffer& buf
    ,uint8_t az1
    ,::cmw::marshalling_integer const& az2
    ,cui_generator const& az3
    ,int32_t msg_length_max=10000){
    try{
    buf.ReserveBytes(4);
    buf.Receive(az1);
    az2.Marshal(buf);
    az3.Marshal(buf);
    buf.FillInSize(msg_length_max);
    }catch(...){buf.PartialReset();throw;}
    }

    I'm thinking about changing the name of the function
    PartialReset to Rollback. The function resets the
    state of the buffer to what it was when the function
    started. But I'm not sure if it's a good idea to use
    Rollback outside of database context.?

    Brian
    Ebenezer Enterprises "If the foundations are destroyed,
    what can the righteous do?" Psalms 11:3
    http://webEbenezer.net
     
    , Jun 9, 2014
    #30
  11. Guest

    There are a number of older topics here that were only
    discussed a little or not at all.

    Also my middle tier, the CMW Ambassador, does synchronous
    writes to files. It is async as far as the networking
    stuff goes. I'm not sure how big of a deal that is. I
    believe the average request will amount to output (files)
    less than 20k in size. I hope that will help in terms of
    minimizing the impact of synchronous writes.?

    Brian
    Ebenezer Enterprises - "Do not rejoice when your enemy
    falls, And do not let your heart be glad when he stumbles;
    Or the L-rd will see it and be displeased, and turn His
    anger away from him." Proverbs 24:17,18

    http://webEbenezer.net
     
    , Jun 10, 2014
    #31
  12. Ike Naar Guest

    You can't trust people who call themselves "righteous". Grandma 1:01
     
    Ike Naar, Jun 10, 2014
    #32
  13. Guest

    I beleive there are some who are counted by G-d as righteous.
    But I admit this:

    "Many a man proclaims his own loyalty, but who can find a
    trustworthy man?" Proverbs 20:6

    Some translations say goodness rather than loyalty.
     
    , Jun 10, 2014
    #33
  14. Ike Naar Guest

    Exactly. Don't trust them.
     
    Ike Naar, Jun 10, 2014
    #34
  15. Guest

    "So then, while we have opportunity, let us do good to all people, and especially to those who are of the household of the faith." Galatians 6:10

    Why?
     
    , Jun 10, 2014
    #35
  16. Daniel Guest

    My sense is that interest in this classic thread has waned. I also think you've already gotten a lot of good advise: one, fix up the web page, tell people what your product is, how it compares to the competition, and why anyone would want to use it; two, support standard serialization formats ratherthan proprietary formats, nobody wants to be locked into an unknown vendor; three, prefer alternatives to code generation. But you already have this feedback.

    Best of luck,
    Daniel
    https://github.com/danielaparker/jsoncons

    "Dear Sir or Madam, will you read my code?
    It took me years to write, will you take a look?
    It's a million lines, give or take a few
    I'll be writing more in a week or two
    But I need a break and I want to be a middleware writer
    Middleware writer

    Middleware writer"

    - The Beatles
     
    Daniel, Jun 11, 2014
    #36
  17. Guest

    A month or two ago I did update a number of things on the
    website. I compare it to the serialization library in
    Boost.

    I haven't found a format that encodes string lengths as variable-
    length integers. I'm not sure if there are any major
    differences between other binary protocols and mine besides
    the string lengths... for regular container sizes and message
    lengths I use 4-byte integers.

    I haven't updated this change on my website yet, but I
    plan to soon. The old figure was $500 and now it's $999.

    I'm willing to donate 15 hours/week for six months to a project
    that uses the C++ Middleware Writer.

    Also I'll pay $999 and give a $1,000 investment in my company
    to someone who helps me find someone interested in this.

    I'll pay the $999 after working for four months on the project.
    Ebenezer Enteprises works to reward investments to 3 times the
    original amount. So the investment would result in between $0 and
    $3,000, depending on how things go for the company.


    Thanks for your comments.

    Brian
    Ebenezer Enterprises
    http://webEbenezer.net
     
    , Jun 11, 2014
    #37
  18. Guest

    No. I guess this refers to checksums? I'm open to adding that.
    I use receiver-makes-right.

    http://www.researchgate.net/publication/3615393_Receiver_makes_right_data_conversion_in_PVM
    No. Do you have some links on these items?
    I think it makes sense since a lot of strings aren't very long.
    It may be a dozen bytes every time a message is sent.

    I can use the internet as much as I like, but I looked at
    a plan recently that had a 3G/month limit. That's about
    100M/day. The archive I have to download is now 20,801 bytes.
    I've worked to keep its size down and am glad to have done so
    if more limited plans are coming.?


    Brian
    Ebenezer Enterprises
    http://webEbenezer.net
     
    , Jun 11, 2014
    #38
  19. Ike Naar Guest

    Under those conditions you can download your archive 200 times per hour,
    which seems plenty.
     
    Ike Naar, Jun 11, 2014
    #39
  20. Guest

    There's also the rest of the web site, my own web searching
    and some other traffic, including VOIP traffic. I don't know
    what it adds up to, but it would reduce the 200 number a lot.


    Brian
    Ebenezer Enterprises
    http://webEbenezer.net
     
    , Jun 11, 2014
    #40
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.