Welcome, Guest
Username: Password: Remember me
Visual Objects

Please use this forum to post questions about Visual Objects and Vulcan.NET
  • Page:
  • 1

TOPIC:

Using asynchronous code in VO 31 May 2022 14:54 #22658

  • KeesIC2
  • KeesIC2's Avatar
  • Topic Author


  • Posts: 49
  • Hi,

    To download a large file via ftp asynchronously I tried to use the Chilkat library example which you will find here: www.example-code.com/csharp/async_ftp_progress.asp. The documentation for the ftp class is at www.chilkatsoft.com/refdoc/csFtp2Ref.html. I have translated the C# code to VO and it does not work correctly. Very often the download is not completed, the part that is downloaded is intact but in general the last kilobytes are simply missing. Sometimes a file is downloaded ok but mostly not. It is not random, meaning that a specific file is either always correct or always incorrect. I have experimented with the code but without success, which makes me wonder if asynchronous code can work at all in VO. The strange thing is that code similar to this did work for several years in our VO application until it suddenly developed the symptoms I described, a couple of months ago. So maybe an external factor like Windows updates is involved. Does anyone have any experience with using asynchronous code in VO?

    Kees.

    Please Log in or Create an account to join the conversation.

    Using asynchronous code in VO 31 May 2022 17:37 #22661

    • SHirsch
    • SHirsch's Avatar


  • Posts: 259
  • Hello Kees,

    After some experiments with async code I ended up in creating a HelperApp where most of the dotnet stuff is handled. Our VO app creates a process with all arguments pushed in the command line, In some cases we wait for process ending, in some cases the helper app does its job an finishes without any message.
    With ftp we have sometimes problems but not reproducable. We use WinSCP with a dotnet wrapper. WinScp can also be called by command line. So there is no need for any special helper app. Maybe you give it a try.

    Stefan

    Please Log in or Create an account to join the conversation.

    Using asynchronous code in VO 01 Jun 2022 10:50 #22670

    • KeesIC2
    • KeesIC2's Avatar
    • Topic Author


  • Posts: 49
  • SHirsch wrote: After some experiments with async code I ended up in creating a HelperApp where most of the dotnet stuff is handled.


    Hi Stefan,

    Thank you for your reply. WinSCP looks interesting. We now use FileZilla which also seems to work fine, not sure if that has a command line option too. So your experiments with async in VO were also not successfull? What were the problems you encountered?

    Kees.

    Please Log in or Create an account to join the conversation.

    Using asynchronous code in VO 01 Jun 2022 13:37 #22672

    • SHirsch
    • SHirsch's Avatar


  • Posts: 259
  • Hi Kees,

    I had some issues with:
    increasing memory consumption (I am not sure if we solved this)
    uncaught crashes (not reproducable)
    dead locks (also not always, sometime after 10 executions, sometimes after 1000 executions)

    At that time I had no time to dig deeper so I created the helper app. It was working and met our needs so there was no need to investigate further. And so we still put most of the dotnet stuff there.

    Stefan

    Please Log in or Create an account to join the conversation.

    Using asynchronous code in VO 03 Jun 2022 11:12 #22680

    • ArneOrtlinghaus
    • ArneOrtlinghaus's Avatar


  • Posts: 337
  • We use also WinSCP successfully for all types of FTP/SFTP/FTPS connections for exports and imports in our programs. There are so many different FTP derivatives and WinSCP handles them all (not all automatically, but using additional options). We even succeeded establishing a comunication with an IBM AS400.

    As we started using WinSCP with VO some years ago, we still use the command line usage creating batchjobs "on the fly". But most types of FTP data exchange are batch oriented: Get me a couple of files or send a couple of files. So this is not a problem in reality. When starting with WinSCP under Dot net surely it is better to use the Dot net interface.

    Arne

    Please Log in or Create an account to join the conversation.

    Using asynchronous code in VO 25 Jul 2022 10:51 #23117

    • leon-ts
    • leon-ts's Avatar


  • Posts: 232
  • Hi guys,
    At one time, I ran into a problem in executing threads in VO (CreateVOThread). As far as I can remember now, the problem was somehow related to the GC, even if the thread function did not use dynamic memory. It looked like the GC in VO was not designed to run in threads.

    To solve this problem, my colleagues and I developed our own library of parallel tasks for VO, which works using separate processes (not threads), and also takes into account various settings of the VO global environment (paths, RDDs, and much more). Even memory variables are copied from the host process to child processes. Using processes instead of threads makes it safer to write more powerful parallel tasks, since in most cases you don't have to worry about synchronizing access to objects.

    So I have a solution (library) for VO SP3. There is also a ported version of this library in X#. If you are still interested in this topic (note that the VO library is for SP3, not the latest SP4) - let me know. I will need some time to prepare the export version of this library (English translation and removal of some specific parameters for my projects).

    Best regards,
    Leonid

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1