On Wed, Feb 16, 2011 at 12:48 PM, Peter Wood <pw...@christianbook.com> wrote:
> Hi Uri,
>
>> https is just http over an ssl socket with a different port than
>> http. you can use IO::Socket::SSL for that. but the problems you will
>> run into are wide and varied which is why LWP is so large. if you know
>> your http transactions will be very basic and not need help, it is
> easy
>> to write a simple module. but it is so easy to get things wrong and
> when
>> it gets more complicated, you will want LWP.
>
> The requests are going to be in the form of POST requests using
> structured URLs with an optional POST body payload, the responses will
> be JSON. I feel like that's simple enough to warrant a barebones module.
> That being said, I should probably write a simple socket module and do
> some tests to compare it to LWP to confirm that LWP has as much overhead
> as I think it does.

Absolutely test first.  The often heard refrain, "I think the standard
answer has a bunch of overhead that I want to avoid" is NEVER
appropriate until you have demonstrated that you have an actual
performance problem that needs solving.  If you don't, then use the
standard wheel and worry about being productive.

Premature optimization is the root of all evil and all that.

An interesting study that is referenced in _Code Complete_ found that
when different teams of programmers were given the exact same problem
and told to optimize for different things (speed of development,
maintainability, memory use, performance, etc), by and large they came
up with solutions that were best for the particular thing they were
asked to optimize for.  That is not surprising.  What was surprising
is that the team that was asked to optimize for maintainability came
in second on most of the other categories, while the team that was
asked to optimize for performance came in dead last on most of the
other categories.

_______________________________________________
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to