[drupal-devel] OT: Binary data.

Gordon Heydon gordon at heydon.com.au
Tue Mar 15 20:41:31 UTC 2005

On Tue, 2005-03-15 at 08:24 -0600, Mark wrote:
> Gordon Heydon wrote:
> I have experience interfacing with a PICK system.  It was running on an 
> ancient Digital Unix box without a modern compiler, so without a serious 
> upgrade, very few options existed.  I ended up writing a minimalistic 
> HTTP server in C that spoke via UNIX file sockets to a PICK process.  
> The beauty of this solution for me was that I could accommodate a 
> clueless PICK developer.  All she had to do was open a "file" and read.  
> When a newline came in, she would process the data packet. I did all of 
> my heavy logic in a Python script on a remote server (yours would be a 
> drupal server).

There are some commercial products which allow you to interface a pick
system to the web such as a product that I do alot of work with from IBM
called RedBack which interfaces with their PICK products UniData and
UniVerse. It is actually quite a big area, making up 40% of their SMB
business. The problem is that it only talks to jsp and asp. so I life is
hell, as I have to do alot of work with redback.

> Since then, I know PICK was movinig toward Linux support, and you might 
> be able to use php to write to/read from a Unix file socket from a local 
> apache/php server.  I was sending financial transaction data using this 
> connection method, and there was a 2-step transaction confirmation 
> system built into it.  Your needs may not go this far, but such a design 
> is possible.

Yes it has very good linux support, and runs very fast. The biggest
problem is a serious lack of php support.

> If your needs are simple and the PICK server is on the same box as your 
> drupal server, you can go straight into file sockets and talk directly 
> to it from drupal.  My knowledge of PICK and its is about 6 years old, 
> so my advice might be somewhat dated and there may be better options 
> available.

The biggest problem is that the person who designed the protocol doesn't
really know PICK and it bad handing of binary data, or how to design a
socket protocol. He put in a single binary int into a text stream. I am
still shaking my head.

> Good luck with this project,
> -Mark

Thanks for this. and Thanks to everyone for their suggestions. I think I
am going to need to write a function to convert it myself.

Gordon Heydon <gordon at heydon.com.au>

More information about the drupal-devel mailing list