Results 1 to 7 of 7

Thread: Asynchronous Operations?

  1. #1
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,189

    Asynchronous Operations?

    One of the needs of many business apps is the ability to set off a lengthy process from the UI that reports back to the UI when done (or failed). There are many different scenarios: can you give a brief overview of what will, and won't, be available in each mode of operation (desktop vs. web/mobile vs. native mobile)?

    thanks,

    Hank

  2. #2
    Lianja Support Team lianjasupport's Avatar
    Join Date
    Feb 2012
    Location
    Boston USA, Wokingham UK
    Posts
    1,259
    We will blog this.

  3. #3
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,189
    And you did blog it, at http://www.lianja.com/resources/blog...sks-in-lianja- (for those reading this thread). And very cool.

    Question: will it work on Windows? (I know, I could test, but that will take longer than you typing yes or no .)

    Question: is it possible to get a values, or values, or object back from the spawned prg directly, or would one have have to use an intermediate store of whatever kind to access once the task completes?

    Question: is it possible to pass parameters to the PRG being spawned?

    ER: is would be very nice to be able to set up an eventhandler and forget about it after that.

    thanks,

    Hank

  4. #4
    Lianja Support Team lianjasupport's Avatar
    Join Date
    Feb 2012
    Location
    Boston USA, Wokingham UK
    Posts
    1,259
    Yes all platforms. (beta8 refresh 4).

    Arguments. Not yet will add a --args switch.

    Having a built-in class with event callbacks is a good idea will look into that.

  5. #5
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,189
    Fantastic (as always ).

    --args will be for sending or also for getting back values/objects? The use case I have in mind is the process fails, and returns the error information.

    A use case for the callback (and timers have always been a pain, frankly) is heads-down data entry where mucho processing is needed to fill in foreign values which will display in the grid. So the row is marked (color) and disabled, until the callback, when the data (hopefully passed from the process as a record object, but XML would do in a pinch) is passed back. This way, the user can add rows as fast as they can add the basic information (e.g., sku, uom and qty), and when they are done, everything will be there for their review and adjustment.

    BTW: is Lianja spawning threads or processes? I.e, is it parallel processing?

    thanks,

    Hank

  6. #6
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,360
    Blog Entries
    22
    Processes. Self contained executable instances that won't bring anything else down if they fail. On x-core CPUs the OS takes care of all the CPU scheduling anyway. Never been a fan of threads.

    On linux we support message queues. Windows does not have this (rather nice feature). Message queues allow you to run a "server" that just sits there waiting for work to do do, does it then gives back the results.

    We do have the ability to serialize and deserialize objects and dynamic arrays (yes I know fox does not have dynamic arrays; in Lianja they are just like PHP associative arrays and act as a key/value store).

    You may have to write some custom code to do what you want until we come up witha good cross platform solution for returning objects etc across process boundaries. Later on will investigate the options.

    Now in saying all that Lianja also supports pipes...

    It is also worth mentioning that the fopen(), fgets() functions can also take "http://wherever.com/yourwebservice" rather than just a regular filename as well.

  7. #7
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,189
    OMG: it's like the discussions Frank Camp and I would have (Frank's one of the brightest devs I've met). I'd say "wouldn't it be great" and the next morning, typically, it would be there. Tough things maybe a few days. I'd love to have the two of you in the same room, just to listen. I'd have a silly-ass grin on my face just watching the competition of ideas -- Frank is Dutch, and so doesn't leave any unsupported idea go unchallenged. My role in our discussions is to point out the user reality, users being of course mere mortals like myself.

    What got me was the fopen() stuff. Fantastic.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us