Desktop apps and Web - what makes sense?

Sten-Erik Björling s-e.bjorling at enviro.se
Thu Aug 12 16:47:10 UTC 2021


Hi all.

Below a REST API call and its called method - is active on my server - handles depending on the licensed size between 50 - 200 calls a second… Server - MacPro 2013 12 core - the call triggers a 7-table join.

The REST call:

http://envirodata.se:5012/api/DVDRental_R2_v10/restservices/ActorSalesByCategory/

The method:

Calculate inActorID as randintrng(1,200)

Do ipoSalesAnalysis.$ActorSalesByCategory(inActorID,ilActorSalesResults)

Do irwActorStatsResult.Data_List.$merge(ilActorSalesResults)

Do $cinst.$addhttpresponseheader('content-type','application/json')
Do $cinst.$sethttpstatus(200,'OK')
Do $cinst.$sendhttpcontent(ilActorSalesResults,kTrue)

Quit method irwActorStatsResult

The instance process object performs a sql operation against the Postgres server utilising worker objects and session pools. The instance list and row vars are defined by schemas.

The performance I think are good enough for most use cases that Omnis developers encounters.

Take care, all the best…

Stene

____


> 12 aug. 2021 kl. 18:31 skrev Doug Easterbrook <doug at artsman.com>:
> 
> hi Greg:
> 
> We developed our REST api a while back.  Then, when we ware Euromnis about 3/4 years ago, I sat in on Jason’s presentation on making rest api’s in omnis.
> 
> To my recollection, it seemed very simple.  effectively, something like
> - open the port
> - create a task that would listen
> - name the method in the task as the API end points
> - then just use them



Sten-Erik Björling
Enviro Data
Kyrkogatan 5A 2 tr
SE-972 32  Luleå
Sweden

E-Mail: s-e.bjorling at enviro.se
Mobile: +46-70-655 11 72
Wire: @stenerikbjorling
Skype: stenerikbjorling
iChat: stene at icloud.com
FaceTime: stene at icloud.com
whereby.com: stenerikbjorling
Hotmail / Messenger: stenerikbjorling at hotmail.com
GMail: stenerikbjorling at gmail.com
______

This email and any files transmitted with it are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, please note that any use, distribution, or reproduction of the contents of this email is strictly prohibited and may be unlawful. If you are not the intended recipient, please notify the sender by return email and destroy all copies of the original message including any attachments thereto. Thank you.

Please note that we take reasonable precautions to prevent the transmission of viruses; however, we cannot guarantee that this email or its attachments are free from viruses. We only send and receive emails on the basis that we are not be liable for any loss or damage resulting from the opening of this message and/or attachments.



More information about the omnisdev-en mailing list