PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WEBDEV 2024 → periodically upload of XML-file
periodically upload of XML-file
Started by Stijnv, Jan., 25 2005 12:38 PM - 8 replies
Posted on January, 25 2005 - 12:38 PM
Hello,

I am a Windev/Webdev-newbie.
I have a Windev-aplication that will upload a XML-file each day, or even a couple of times per day, to a Webdev-server.
In my Webdev-application I have a process that converts this file to hyperfiles. I would like to run this process for example each hour. Is this possible?

thanks.
Posted on January, 25 2005 - 5:50 PM
In the initialisation-code of my Webdev-project I start a thread with the procedure. In the procedure itself i have put my actions to read the XML-file in an infinite loop and at the end of each loop i have "Multitache(-60000)" (wait 10 minutes).
This seems to work, but will it work when i deploy my project?
Will this process keep running or will it start up at each session?

thanx
Posted on January, 25 2005 - 5:55 PM
Hi,
It is possible of course.
And assuming you have Windev9 and Webdev9 applications, the whole process can be managed by Windev itself. By programing a back&front office structure, you give your IT services the easiest way to update in real-time and periodically the remote database. This is one of the most significant advantages that offers the new PCSoft version9.

Bye,

PJ
Posted on January, 26 2005 - 10:31 AM
I work with windev8 and webdev7.
but do you think the solution I explained in my second message will work?
I'm not really that familiar with webdevelopment... when I test my project, the process in the initialisation-code of the project is in an inifnite loop and it keeps running when I test my webpages. But will it keep running when I deploy my project on my Webdev-server and the apllication is started? Or will it only run when a client starts a session?

thanks
Posted on January, 26 2005 - 12:02 PM
Programing and running this process through Webdev is not a good idea. Let me explain myself :

Each time a user is being connected to your web site a new session and therefore a new thread is created. It means that if 1000 users are connected at the same time to your web site, 1000 threads will be running at the same time which cost a lot in resource to your server. It is obvious that you will get it crashed many times...

The best thing to do is to program a Windev application. Deploy it onto your web server (or your application server) and run it as a permanent service.

Hope to helping you,

PJ
Posted on January, 26 2005 - 12:59 PM
I also have some global variables in the initialisation-code of the project. I would like to use these variables to remember some values during one session, but are these variables global to the entire application? When several clients open a session at the same time will they work with the same values? Because that is not what i would want...

please help
merci
Posted on January, 27 2005 - 10:06 AM
Nothing to worry about that !
Different users can't use the same gobal values in a same server application like Webdev, .NET, PHP, JSP, etc... What a mess if that was possible !

PJ
Posted on January, 27 2005 - 1:05 PM
Hi,

I think you have an other solution:

In your Windev application, just after you uploaded the xml file, you
can use the HTTPRequete() function with the URL of your Webdev
application completed with a parametter like "?Update=ok"

In your WebDev application, in the project initialisation code, you add
a few code lines where you test this parameter and run your update
function...

By that way, you don't need to use a thread or something equivalent,
and your WebDev application will always be updated...

Good dev'

Stijnv a formulé la demande :
I work with windev8 and webdev7.
but do you think the solution I explained in my second message will work?
I'm not really that familiar with webdevelopment... when I test my project,
the process in the initialisation-code of the project is in an inifnite loop
and it keeps running when I test my webpages. But will it keep running when I
deploy my project on my Webdev-server and the apllication is started? Or will
it only run when a client starts a session?

thanks


--
Guillaume
Posted on January, 27 2005 - 5:08 PM
Thank u very much for the info!