Re: [U2] Handle multi request

Peter Cheney <[email protected]> Fri, 7 Mar 2014 06:27:55 +0000
Newsgroups gmane.comp.db.u2.general
Message-ID <[email protected]>
Hi Christo,

Thankyou for your reply and welcome to the list! I hope you enjoy this fantastic community of ours.

With some small differences, you have described almost exactly what I have created.
I am using file triggers on the client end to place items in a queue.
Once the queued items are processed, indexes on the various (translated) keys are created they’re moved to a log.
The communications is done by UV basic socket functions: opensocket(), writesocket(), readsocket(), and closesocket().
Other functions used are: protocollogging(), getsocketinformation(), setsocketoptions(), and getsocketoptions().
The client/server communications also have a “heartbeat” function to determine if the link is alive or not.
Most of the data we send back and forth is XML but there is one case where raw attribute data direct from a UV file is transmitted.
This was made necessary by the complex structure of the fields within some files data resulting in it being too hard to convert to XML.
The communications is also en/decrypted via the encrypt function.
I will also need to audit our results and create various reports and this is yet to be done but I have most of the structure in place so just have to write the code.
I’m releasing a beta version to test on 17th and there’s still plenty of work left for me to do.

Cheers and thanks.
Peter



Peter Cheney
Ultracs Developer
t 07 3017 8837 | f 07 3002 8400
e [email protected]
w firstmac.com.au

From: Van Rooyen, C. (Christo) [mailto:[email protected]]
Sent: Friday, 7 March 2014 15:11
To: Peter Cheney
Subject: Handle multi request

Peter,

This is the first I respond on this mailing list.

I have developed a method where I use shared folders to receive requests for information.
It works on the basis of a “request” folder with a “commit” folder.
To return the result I place it in a “result” folder and commit it in the “done” folder.
I use D3 on RedHat Linux.
I have a Phantom that poll the commit folder for any file placed. Using the filename it read the request in the request folder with the same name.
The process then removes the filename from the commit folder.
After processing it, it will place the result in the “result” folder, and let the incoming requestor know by committing it in the “done” folder.
I have a clean-up process that removes any unclaimed results older than a week.
For audit purpose, the requests are archived.
In all cases the filename is the same.

I have a header in the request telling the process what to do and use an inscription section for any data passed.

With this method you can have any client system in any environment that can either use FTP, SAMBA, NFS, Apache with PHP, e.c.t. to place request to the folders.

I use this method also for outgaining requests to a VB app running on a Windows server that handle my PDF mailing of invoices and statements.

It is fast, and as long as the folders are accessible the requests can be placed. I use a controlling phantom that spawn a phantom for each requests received.
If your phantom is not running, you won’t miss out on requests coming in. it will just process them the moment the phantom restart.
We use this for most of the communication between the systems. Mainframe to UNIX to Windows and so on.

Regards,
Christo van Rooyen
Systems Analyst / Designer II - Nedbank Limited (South Africa)


********************
Nedbank Limited Reg No 1951/000009/06. The following link displays
the names of the Nedbank Board of Directors and Company Secretary.
[ http://www.nedbank.co.za/terms/DirectorsNedbank.htm ]
This email is confidential and is intended for the addressee only.
The following link will take you to Nedbank's legal notice.
[ http://www.nedbank.co.za/terms/EmailDisclaimer.htm ]
********************

 -------------------------------------------------------------------------------
Note: 
This email (inc all attachments) is for the use of the intended recipient(s) only.
Privileged or confidential information may be contained in this communication. If you have received this email in error, please notify the sender immediately and then delete all copies of this message from your computer network. If you are not the intended recipient, you must not keep, use, disclose, copy or distribute this email without the author's prior permission. If you are the intended recipient and you do not wish to receive similar electronic messages from us in future, then please respond to the sender to this effect. 
We have taken precautions to minimise the risk of transmitting software viruses, but advise you to carry out your own virus checks on this email and its attachments. We do not accept liability for any loss or damage caused by software viruses and do not represent that this transmission is free from viruses or other defects. 
Firstmac Limited (ABN 59 094 145 963) (AFSL 290600) 
 -------------------------------------------------------------------------------
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users