343 reputation
29
bio website
location Boulder, CO
age
visits member for 3 years, 5 months
seen 2 hours ago

Systems Analyst & Programmer for direct marketing cooperative database.


Dec
19
comment Shared & exclusive locking
I can understand, from the description that you've included, how this type of lock provides the behavior I'm seeking. You've provided me with a name for the concept, which was what I expected from a forum for conceptual questions about software development. You mentioned rwlock, though, which (as I understand it) pertains to POSIX thread locking. Are there POSIX services that provide Write-preferring RW locks for interprocess coordination? Or should I pursue the question of implementation in a different forum?
Dec
16
comment Concrete types - as described by Stroustrup - C++ Programming Language 4th ed
@JamesAnderson Actually, in general, I find his prose surprisingly readable - spare, to the point, written in the first and second person, and almost conversational. :) This was the first place that I got stuck.
Dec
16
comment Concrete types - as described by Stroustrup - C++ Programming Language 4th ed
One of his criteria for a concrete type is that you can create one on the stack. I'm guessing that you can't create an abstract type on the stack because its size can't be determined. (Similarly, I believe, you can't make a container of base class objects - e.g. your animals - and expect to be able to add derived class objects to it, because they'll be truncated [wrong word]).
Sep
11
comment Seeking xinetd alternative for forking concurrent servers in Linux
See above. I duplicated xinetd functionality - spawn multiple concurrent instances. Load will be 10-20 connections at most.
Sep
11
comment Seeking xinetd alternative for forking concurrent servers in Linux
I cant really answer all your questions here. The socket-using infrastructure was already written; the service(s) would have to be launched at startup if they were to handle connections directly. As it turned out, I wrote what I needed in Perl (which itself has to be launched at startup). The passing of the opened socket descriptor, something unnecessary with xinetd's STDIO, was something I did with a command line argument provided by the launch daemon. (BTW, "compelling arguments" are sometimes "because the CTO and Operations say so")
Aug
25
comment Efficiently “moving” data upward through a communication stack
I expect (1) 700 messages/sec, and (2) under 1MB/sec. (3) C++ (non-GC). (4) We have to process 2.5M messages/hour, which is where I got 700 per sec. Totally agree on measure first / optimize second. ("TL;DR:" ?)
Aug
25
comment Efficiently “moving” data upward through a communication stack
I was wondering whether there might be some way of doing this. my_buffer would have to be larger (right now I reclaim buffer space after step 2) and I'd have to write my own split algorithm (I think) rather than using boost::algorithm::string::split.hpp. That might be a good way of doing it.
Aug
25
comment Efficiently “moving” data upward through a communication stack
I had a go at reading that link. Totally over my head.
Aug
6
comment Seeking xinetd alternative for forking concurrent servers in Linux
@gnat: Thanks. I'm unclear what's meant by "tool" in this case -- for example, is xinetd considered a tool? Is there perhaps a better forum for this question; e.g. SO or Unix/Linux?
Aug
6
comment Seeking xinetd alternative for forking concurrent servers in Linux
Well, @gnat, check it out. Any better?
Aug
1
comment Are there security implications to using dynamically-assigned TCP port numbers?
Good point; what do firewalls do about FTP, which uses (as I understand it) the same technique?
Jul
17
comment How to provide a ubiquitous object without including it in every parameter list
I like your thinking here. Unfortunately, one of the arguments presented for logging directly from the low-level component was to support a logging level that might include DEBUG, in which case successful events might be logged. The need for this level might not be restricted just to the development phase. I have a hard time refuting this... so we're going with a global object.
Jul
13
comment How to provide a ubiquitous object without including it in every parameter list
I'm struggling to understand the concept of the Factory in general. In the first approach, why is typeof(MyClass) being passed? In the second approach, is a "Factory" involved at all? I'm liking this answer, esp. the 2nd since it appears I can make up a dummy Log class for testing purposes, but am having trouble understanding the notion of a Factory.
May
10
comment Seeking advice on design of application protocol
Thank you for such a thorough and thoughtful answer. I have some followup questions but I'm not sure how that fits into SE's format, since comments are limited in size (and hard to format). My biggest concern is with whether there should be one layer enforcing, say, the request/reply protocol (plus maybe the session setup/teardown), and a higher "presentation" layer responsible for unwrapping the request, validating it against a metadata definition of its layout, and presenting to the application pure data, perhaps in the form of a hash table.
May
9
comment Seeking advice on design of application protocol
See update above.
Apr
22
comment Protocol for closing a socket connection
I debated whether this belonged here or on SO. The link you gave doesn't completely answer my question, which I think is more of a general programming/protocol question than just the specifics of close and shutdown.
Apr
22
comment Protocol for closing a socket connection
Very clear explanation! One question: although I like CLOSE/CLOSE_OK, it sounds as if I (the client) could just issue shutdown(OUTPUT) and wait to receive EOF, while the server, on reading my EOF, could send <final_message> + EOF. Or are there circumstances under which the server could receive EOF without my having intentionally caused it by issuing shutdown or close?
Jan
2
comment Design question about a concurrent forking server
@miraculixx: I answered your question; does it change your answer any? (My view is that it's "complicated" because of requirements for database integrity.)
Dec
28
comment Design question about a concurrent forking server
Throughput is top priority - we process hundreds of thousands of input records and lookup against tables with a billion rows. The managers will (eventually) be heavily optimized to keep memory caches, etc. Configuration - we may want to distribute the managers across different physical servers. Scalability? I don't know - it's pretty big as it is, although we might want to have more than three or four clients running at the same time.
Dec
28
comment Design question about a concurrent forking server
You made me realize that it's very possible that we'll eventually need to write another client program which has a slightly different overall purpose, but requires precisely the same service being provided here to carry out its mission! And you're correct - none of this needs to be done by the clients. (I think the motivation here is mostly "premature optimization".) Thanks for your reassurance.