[usocket-devel] Portably supporting :external-format

Douglas Crosher dtc at scieneer.com
Sun Oct 22 23:27:54 UTC 2006


Erik Huelsmann wrote:
>> > So, to stay backward compatible, this is what I'd like to do:
>> >
>> > - If no external-format is given: just return the raw stream returned
>> > by the implementation (as we do now)
>> > - If an external-format is specified, create a raw stream with 'octet'
>> > element-type and wrap the returned stream with a flexi-stream,
>> > exposing the flexi-stream to the caller.
>> >
>> > How about that?
> 
>> Flexi-streams depends on trivial-gray-streams, which appears to
>> support the following implementations:
>>
>>  - Allegro
>>  - CMUCL
>>  - LispWorks
>>  - OpenMCL
>>  - CLISP
>>  - SBCL
>>
>> It doesn't appear to support ABCL or Scieneer CL. For that reason, we
>> can't simply make it a mandatory dependency, unless we want to give up
>> on those implementations. How do you propose we make it optional?

Could you simply add :external-format and :element-type arguments to the
'socket-connection function and allow implementations to return a suitable
stream?  The Scieneer CL has a well designed and fast stream layer capable of
supporting web services with many tens of thousands of connections, and
the function 'ext:make-fd-stream already supports character streams in
Unicode encodings plus a range of handy extensions such a compressed and
encrypted streams.

Flexi-streams is not suitable as a de facto standard - the design is just too
slow to be practical.  If implementations really need to use this then allow
them to do so in the usocket backend.

Regards
Douglas Crosher




More information about the usocket-devel mailing list