First let me say I'm a noobie so I accept that my question might be naive and/or stupid, and I apologize.
I built a php middleware server to connect with a remote MySQL database. Typically we need to download between 10 and 200 rows and insert into a local database. Then user editing happens. Then they get uploaded and re-inserted into the master.
The way I wrote the code, I decided against XML or JSON. Instead, an http POST request for data from the client is turned into an INSERT statement by the middleware ...
For example: one screen lets you search by last name, and if you enter the name "Smith" the middleware returns this string (in UTF-8):
INSERT INTO `customer` (`customerkey`,`firstname`,`middlename`,`lastname`,`address1`) VALUES ('124', 'Byrl', 'L.', 'Smith', '607 W. Spring St.'), ('2854', 'Bonnie', 'L.', 'Smith', '560 N. Nixon'), ('3501', 'Ben', '', 'Smith', '2578 Shawnee Rd.'), ('4113', 'Beverly', 'J', 'Smith', '1737 Leland Ave'), ('4891', 'Barbara', 'Ilene', 'Smith', '851 E. High St.') ETC. ETC.
This gets piped straight into SQLite to make a local cursor (dataset) for further processing.
Now to get to the point, I was extremely interested in Erel's RDC webserver. I got it working with no problem which is amazing considering how dumb I am. It seems very fast processing requests, typically 2ms on a localhost database. But then you have a binary object which has to be read, and decoded, and looped and processed and interpreted, and inserted row by row... and all this takes time. So it seems to me that the php system is faster overall because as soon as it comes back from the middleware it just goes straight into the database with no massaging needed.
Now I have great faith in Erel (or I wouldn't be here) so I'm assuming I have some fundamental misunderstanding about the proper way to handle the object returned by RDC. There must be a quicker, easier way to get it into SQLite. What am I missing please? (PS yes I have read the tutorial. All 10 pages.) Thanks. Derek.
I built a php middleware server to connect with a remote MySQL database. Typically we need to download between 10 and 200 rows and insert into a local database. Then user editing happens. Then they get uploaded and re-inserted into the master.
The way I wrote the code, I decided against XML or JSON. Instead, an http POST request for data from the client is turned into an INSERT statement by the middleware ...
For example: one screen lets you search by last name, and if you enter the name "Smith" the middleware returns this string (in UTF-8):
INSERT INTO `customer` (`customerkey`,`firstname`,`middlename`,`lastname`,`address1`) VALUES ('124', 'Byrl', 'L.', 'Smith', '607 W. Spring St.'), ('2854', 'Bonnie', 'L.', 'Smith', '560 N. Nixon'), ('3501', 'Ben', '', 'Smith', '2578 Shawnee Rd.'), ('4113', 'Beverly', 'J', 'Smith', '1737 Leland Ave'), ('4891', 'Barbara', 'Ilene', 'Smith', '851 E. High St.') ETC. ETC.
This gets piped straight into SQLite to make a local cursor (dataset) for further processing.
Now to get to the point, I was extremely interested in Erel's RDC webserver. I got it working with no problem which is amazing considering how dumb I am. It seems very fast processing requests, typically 2ms on a localhost database. But then you have a binary object which has to be read, and decoded, and looped and processed and interpreted, and inserted row by row... and all this takes time. So it seems to me that the php system is faster overall because as soon as it comes back from the middleware it just goes straight into the database with no massaging needed.
Now I have great faith in Erel (or I wouldn't be here) so I'm assuming I have some fundamental misunderstanding about the proper way to handle the object returned by RDC. There must be a quicker, easier way to get it into SQLite. What am I missing please? (PS yes I have read the tutorial. All 10 pages.) Thanks. Derek.