Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

multiple threads in web applications?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    multiple threads in web applications?

    I've searched documentation and the forum and am getting partial and sometimes conflicting answers about what's possible with the AA app server.

    I am running a python file to push some data from an AA application to another system and process the response. It's working if I loop through the requests I need to send, but I need a way to do this for bulk requests so that it performs more quickly.

    Is multi-threading possible on the Application Server? If so, does anyone have sample code to help me understand how it works differently than looping?

    Thanks in advance.

    #2
    Re: multiple threads in web applications?

    What comes to server performance you can check your servers performance tab. So application server supports multi-threads.

    But I suppose you are actually asking does xbasic support multi-threading in web application. Currently not. You can test it with loop.

    Comment


      #3
      Re: multiple threads in web applications?

      thanks Kenneth.

      Actually I'm running this application from IIS so I don't think the same settings are present...

      Yes I'm looking for the latter answer. I want 30 api calls to happen simultaneously instead of 1 by 1 in a loop.

      That's disappointing but I guess I'll survive and/or look for ways to do it outside Alpha.

      Actually, what would happen if I called a javascript function to loop through records in a list and do ajax callbacks on individual records? That would theoretically run them simultaneously, yes?

      Comment


        #4
        Re: multiple threads in web applications?

        I'm guessing you found the xbasic object you can use for making XHR API calls (not sure i have the right terminology here), but when using the object you have to wait for a response or timeout before using the object again.
        What about creating a queue or array of say 10 of these objects and dividing up the api calls between them. When all the objects are busy, you'd have to pause for a while. I think you'd want a separate desktop Alpha application, so you don't burden your actual web application server.

        Comment


          #5
          Re: multiple threads in web applications?

          Originally posted by christappan View Post
          I've searched documentation and the forum and am getting partial and sometimes conflicting answers about what's possible with the AA app server.

          I am running a python file to push some data from an AA application to another system and process the response. It's working if I loop through the requests I need to send, but I need a way to do this for bulk requests so that it performs more quickly.

          Is multi-threading possible on the Application Server? If so, does anyone have sample code to help me understand how it works differently than looping?

          Thanks in advance.
          The answer is unfortunately more complicated than you would like (an probably also based on an incomplete understanding of what you are trying to do), but nevertheless, I will try to provide an answer:
          Xbasic does support multiple threads, but if you write multi-threaded Xbasic in code that handles an Ajax response it will likely be detrimental to the server performance.
          So we recommend that you do not do this.

          What we do recommend is something like this

          a) you have an Ajax callback that executes an Xbasic function.
          b) your Xbasic function then invokes some code written in another languages (could be some .net code, a Node.js script, Python, etc).
          c) Xbasic will block while this other code executes.
          d) If this other code executes efficiently (i.e. maybe it makes uses of multiple threads), then the amount of time that Xbasic is blocking is minimized.

          So instead of having your Python code return to Xbasic and having Xbasic continue to process data, do all of the work in Python and then only return to Xbasic when the task is complete.


          This is the technique we use internally in the Alpha Server. For example, in the case of reports that reference images on S3, we have a very efficient piece of code written in C that downloads the report images from s3 to local files. it does this by spawning multiple threads. Xbasic blocks while this is happening and then once the images are all downloaded, the report is printed.

          Comment

          Working...
          X