#1 2021-12-21 02:03:35

mmtvvip
Member
Registered: 2021-12-21
Posts: 2

in SOA,how to submit all records in batch at one time from the client?

I use Lazarus / FPC development tool, and the client uses TBufdataset to cache data. I mainly have two problems:

1. How to define the parameters passed in by the interface? Is it defined as array of TSQLRecord?

2. How is the execution result of each record fed back to the client?

There may already be an answer (because it is a common demand), but I haven't found the right resources yet.


Thank you for your help!

Offline

#2 2021-12-21 07:37:57

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,337
Website

Re: in SOA,how to submit all records in batch at one time from the client?

1. You use whatever you need to transmit the data.
But everything will be serialized as JSON over the wire.

2. You define results or out variables to the client.
If the process is blocking too long, consider using interface callbacks to notify the process ending, or use a polling method.

Check https://synopse.info/files/html/Synopse … #TITLE_456
And also https://synopse.info/files/html/Synopse … #TITLE_244 to properly define a record/array definition for FPC, which lacks extended RTTI for the records, for its JSON layout.

Offline

#3 2021-12-21 08:11:33

mmtvvip
Member
Registered: 2021-12-21
Posts: 2

Re: in SOA,how to submit all records in batch at one time from the client?

Thank you AB.

I am a novice of mormot. I have a reply from the master, Let me know that my idea is basically feasible. In addition, the callback or polling method also extends my thinking.

thank again!

Offline

#4 2021-12-21 10:10:58

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,337
Website

Re: in SOA,how to submit all records in batch at one time from the client?

If I understand correctly what you mean, the "reply from the master" is just a "result" or "out" parameter for a SOA interface service method.

Offline

Board footer

Powered by FluxBB