B4J Question Best way to handle multiply task by the app

bogdanc

Active Member
Licensed User
Longtime User
Hello!

What is the best way to run on one app many queries to:

  1. ping server
  2. posting files
  3. queering the DB.
  4. checking the speed etc.
I just looking for some idea of threading etc.

On the moment I have created couple subs and I do the queries on timer interval.
Maybe is a better way to handle it.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
OkHttpUtils2 is asynchronous. This means that it will not slow down other parts of your program.
You can also use the asynchronous database methods (though it is only required if the queries are slow).

There are many possible ways to organize your program. Personally I prefer to use multiple classes. Each one for a specific task.
 
Upvote 0

bogdanc

Active Member
Licensed User
Longtime User
OkHttpUtils2 is asynchronous. This means that it will not slow down other parts of your program.
You can also use the asynchronous database methods (though it is only required if the queries are slow).

There are many possible ways to organize your program. Personally I prefer to use multiple classes. Each one for a specific task.

Yes I think to use a separate classes for each module.

Is it a way to check speed of writing to DB byt okHttpUtils2?
 
Upvote 0
Top