[Lazarus] Send a ResultSet (encrypted) between 2 servers

Joost van der Sluis joost at cnoc.nl
Thu Feb 10 13:57:40 CET 2011


On Thu, 2011-02-10 at 09:11 -0300, Marcos Douglas wrote:
> On Thu, Feb 10, 2011 at 7:56 AM, Graeme Geldenhuys
> <graemeg.lists at gmail.com> wrote:
> > Op 2011-02-10 12:43, Marcos Douglas het geskryf:
> >>
> >> Right... and about the way to send these ResultSet packages, what would you use?
> >
> > I don't know how others implement n-tier apps with FPC, but I would
> > probably us something as implemented in tiOPF [http://www.tiopf.com],
> > seeing that we already use tiOPF for all our object persistence. We
> > don't currently use n-tier apps at work, our encryption is inside a
> > client app reading encrypted content from a file and feeding it to a
> > Flash component.
> >
> > It would be nice if somebody could post a wiki link, or create a short
> > wiki article if one doesn't exist yet - and showing how n-tier apps can
> > be implemented using FPC (and not with tiOPF). I have seen this question
> > asked numerous times over the years of using FPC. Is WebServices the
> > only option available to FPC developers, or is there something like
> > Delphi's Midas too?
> 
> +1
> 
> See, Joost, not all are WebService. I forgot the Delphi Midas, simpler
> than WebServices, not?

Midas is a web-service. (At least when is uses port 80)

But if you want to use something Midas-like, you can just build it
yourself, as I wrote before.

Load the data into a TBufDataset. Then write the data to a stream. (You
may choose the format: xml (midas-compatible) or binary)
Then encode that stream, and send it using tcp/ip. 

If you want to know what packages you need for this:

Database: sqldb
Encoding: choose whatever you want, Graeme mentioned Blowfish
tcp/ip: choose whatever you want, I mentioned lNet, Synapse and Indy

Further it's easy:

You need a server, which listens to port 80 (use Indy, lNet, Synapse)
and when it retrieves data decrypt is, and load it into a TBufDataset
using a stream.

And you need a client, which loads the data from a TBufDataset, encrypt
it and opens a connection to the server on port 80 (use Indy, lNet,
Synapse) and sends the data.

This is what Midas does for you. If you don't want to use an existing
WebService, you have to code this yourself. 

Joost






More information about the Lazarus mailing list