guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC] Guile-SSH channels improvement


From: Artyom Poptsov
Subject: [RFC] Guile-SSH channels improvement
Date: Fri, 24 Jan 2014 12:47:32 +0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Hi all,

as you might know I'm working on Guile-SSH library [1] that is aimed to
provide SSH protocol support for Scheme programs.  One of the data types
provided by the library is a Guile-SSH channel which can be used for
transferring data between SSH client/server.

Currently channels are implemented as simple smobs and Guile-SSH
provides a bunch of special procedures for reading/writing data.  The
problem is that the current implementation allows only to transfer
Scheme strings through channels.  Obviously that is very limiting
because it's often needed to transfer arbitrary data, not only strings.

My goal is to improve Guile-SSH channels implementation so it will
handle any kinds of Scheme data types.  So here is my RFC.

Ludovic Courtès proposed to use bytevectors for reading/writing of data
as improvement to the current implementation and he sent me a patch that
changes `channel-read' procedure so now it returns read data as a
bytevector.  `examples/sssh.scm' updated as well.  The patch was applied
on this branch:
  
https://github.com/artyom-poptsov/libguile-ssh/tree/channel-io-improvement-with-bytevectors

Meanwhile I've re-implemented Guile-SSH channels using GNU Guile port
API. [2] The work is done on `channel-to-ptob' branch:
  https://github.com/artyom-poptsov/libguile-ssh/tree/channel-to-ptob

As a consequence of using port API the most of specific procedures for
dealing with channels such as `channel-read', `channel-write',
`channel-close' and friends are eliminated, so the API became clearer.

I've write a SSH-based echo protocol implementation that uses Guile-SSH
to demostrate new API usage:
  
https://github.com/artyom-poptsov/libguile-ssh/tree/channel-to-ptob/examples/echo

Tests with transferring of u8 vectors have shown that implemented ports
works nicely.

I'm going to merge changes from `channel-to-ptob' branch for the next
Guile-SSH 0.5.0 release if no one has objections on it.  Of course,
any comments are welcome.

Thanks.

- Artyom

[1] https://github.com/artyom-poptsov/libguile-ssh
[2] 
https://www.gnu.org/software/guile/docs/docs-1.8/guile-ref/I_002fO-Extensions.html

-- 
Artyom Poptsov <address@hidden>
Home page: http://poptsov-artyom.narod.ru/  JID: address@hidden
Nizhny Novgorod Linux Users Group (NNLUG) member: http://nnlug.ru/
CADR hackerspace founder: http://cadrspace.ru/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]