ADS Local Server and simultaneous requests

Avatar de Usuario
ricardo arraes
Mensajes: 87
Registered for: 3 years 5 months
Brazil

Mensaje por ricardo arraes »

Hey Wilson!

not really...

I never really developed anything with hbnetio, so I would have to take a closer look at it.

But, I'm also not sure that it would be worth it, because this application is a webservice, so I gotta somehow listen for requests coming from the web and return the right response whenever it's called. Do you think hbnetio would be worth it in this situation?
The work always comes before the belief

Cristobal
Site Admin
Mensajes: 315
Registered for: 3 years 6 months
Spain

Mensaje por Cristobal »

Wilson, estoy deseando verlo funcionando lo que comentas
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces

wilsongamboa
Mensajes: 12
Registered for: 3 years 5 months
Ecuador

Mensaje por wilsongamboa »

Buenas tardes
Ricardo y Jefe
finalmente ha de acceder la info desde y hacia la web a una server o algo donde este alojada o la base de datos o el ads server o ambos, la idea pongo un HBNETIO y hago todos los trabajos de aperturas consultas altas bajas etc de mysql ADS MSSQLSERVER ORACLE SQLITE MSACCESS de lo que sea en ese programa y la pagina web solo me hace peticiones y le envio las respuestas de esa forma tendremos separados y bien conformados los trabajos entre la web y los datos
En mi caso particular ( hablo de mi realidad ) tengo
Un Windows server con Advantage Database server de unos 300 usuarios con tablas dbf uso driver ADSNTX y FREE TABLES con un programa en caracteres
ahora estamos haciendo un software de despacho y entregas de camiones con Charly el esta programando el Front End ( asi se dice ?) con mod_harbour + mercury + tweb + etc y en sus paginas solo hace llamadas al server hbnetio que esta en ecuador ( el esta en espana ) de esta forma
net:trk_GetViaje(cToken, cViaje) y yo le recibo y le envío un hash a el directamente como regreso de esa funcion ( corre hecho un avion )
Imagen
y recibo la data ( esta representada en json por las rutinas del Charly )
Imagen
dentro del codigo harbour es transparente con eso
- todos los trabajos de bases de datos consultas etc se realizan en el server hbnetio
- en la pagina no hay nada todo se tiene en el server donde esta en produccion
bueno mas tarde regrso si tienen mas consultas
saludos
Wilson
No tiene los permisos requeridos para ver los archivos adjuntos a este mensaje.
Última edición por wilsongamboa el Mié Abr 14, 2021 3:54 am, editado 2 veces en total.

wilsongamboa
Mensajes: 12
Registered for: 3 years 5 months
Ecuador

Mensaje por wilsongamboa »

no se como mostrar el diagrama perdon la ignorancia
No tiene los permisos requeridos para ver los archivos adjuntos a este mensaje.

wilsongamboa
Mensajes: 12
Registered for: 3 years 5 months
Ecuador

Mensaje por wilsongamboa »

hasta nos enviamos un Token !! ja ja ja me rio porque yo no tenia ni idea de todo esto la magia esta en Charly con el se esta haciendo todo esto
saludos

ramirezosvaldo
Mensajes: 127
Registered for: 3 years 5 months
Mexico

Mensaje por ramirezosvaldo »

Estimado Wilson

A mi forma de ver creo que no solucionaría mucho el problema ( que ya tiene solución ) de Ricardo.

Wilson, corrigem si estoy mal

Tu tienes un modharbour instalado, con una pagina web la cual es accesada por teléfonos u otros dispositivos vía navegador.

Bien, ahi en modharbour tu te conectas a otro server ( local o remoto ) vía hbnetio ( Sockets ),

Tu tienes en la misma maquina o en otra un Socket Server, el cual responde a las peticiones, ahi abres dbf, sql, ads o lo que queiras.

Hasta aqui creo que debe ser la configuración; Pero creo que el problema de concurrencia el cual nos comento ricardo seguiría.
Se tendria que poner algún semáforo para nos ejecutar varias veces o esperar que una tarea termine.

Simple comentario.


Mis mejores saludos
Osvaldo Ramirez

wilsongamboa
Mensajes: 12
Registered for: 3 years 5 months
Ecuador

Mensaje por wilsongamboa »

Ramiro buenos dias
gracias por tu interés
Bueno mi idea va para que en hbnetio yo trabajo la concurrencia como lo hago en el programa normal que todos manejamos
saludos
Wilson

Cristobal
Site Admin
Mensajes: 315
Registered for: 3 years 6 months
Spain

Mensaje por Cristobal »

De eso ( concurrencia ) se ocupa el servidor ADS
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces

Avatar de Usuario
ricardo arraes
Mensajes: 87
Registered for: 3 years 5 months
Brazil

Mensaje por ricardo arraes »

Hey Osvaldo and Wilson!

thank you guys for all the help and suggestions.

what Wilson is explaining about hbnetio is extremely insteresting indeed!
But, as Osvaldo said, and as I was suspecting... maybe it's going to take us to same problem, which is:

the same user/connection, opening the same table, at the same exact time.

I got your point Wilson, and at some point I was having pretty similar ideas, but the concurrency when it comes to desktop applications has some different scenarios:

1- desktop application through network

when we got a network connecting some hosts to a server, each host is a different connection/user to access the ADS database. I'm not a ADS expert, so correct if I'm wrong, but a host will open and manipulate the table/file locally.
Now, when we are talking about a web server, everything is being processed in the same server, eventhough there are different processes created by Apache, it's still the same server. So the concurrency here is different.

2- A desktop application does not open two files at the same time

usually, when we are developing desktop applications, we open tables like this:

OPEN TABLE...
OPEN TABLE...
....

but this is not quite "concurrency", in fact we are openning table sequentially and this is not what happens when we got many simultaneous requests getting to the web server.


Probably the best way to simulate this issue with a desktop application, would be executing two instances of the desktop application and executing simultaneously the same function to open the same table... but that's unusual and sometimes it's not even possible to open two instances of the same application :D
The work always comes before the belief

Avatar de Usuario
ricardo arraes
Mensajes: 87
Registered for: 3 years 5 months
Brazil

Mensaje por ricardo arraes »

Cristobal escribió: Mié Abr 14, 2021 2:52 pm De eso ( concurrencia ) se ocupa el servidor ADS
Cristobal,

ADS Remote Server seems to deal with this situation...

but ADS Local Server has not the same concurrency and sharing management, unfortunately
The work always comes before the belief

Responder