1. Managing multiple eu processes
- Posted by cp Aug 09, 2010
- 1066 views
Looking for some guidance on using multiple eu processes to interact with a multithreaded server via its api. I realize Eu is not multi-threaded therefore one option may be to execute multiple eu processes on demand?
My thought is to have a main control program (prog A) use system() to execute another eu program (program b) that does the interaction with the server api. How can I monitor/control how many of those are running and if they completed successfully or failed.
Is this even a good idea? Is their a better way? or should I program this in a product that is multi-threaded?
Thanks
2. Re: Managing multiple eu processes
- Posted by jimcbrown (admin) Aug 09, 2010
- 1132 views
Looking for some guidance on using multiple eu processes to interact with a multithreaded server via its api. I realize Eu is not multi-threaded therefore one option may be to execute multiple eu processes on demand?
My thought is to have a main control program (prog A) use system() to execute another eu program (program b) that does the interaction with the server api. How can I monitor/control how many of those are running and if they completed successfully or failed.
Is this even a good idea? Is their a better way? or should I program this in a product that is multi-threaded?
Thanks
What kind of API is this? Just because a server is multithreaded doesn't mean that a client has to be. Usually it's a multithreaded server with one thread servicing a single threaded client, one at a time.
The current Euphoria standard library for 4.0 comes with a pipeio library (std/pipeio.e) that allows for starting child processes and communicating with them.
3. Re: Managing multiple eu processes
- Posted by cp Aug 09, 2010
- 1068 views
It's a C api. The client is given a unique thread at login and client uses that same thread until logout. The client depending on profile can login multiple times and therefore process multiple threads. This is what I need to be able to do, login multiple times call the api to execute certain api calls simultaneously, status those operations. I need to status those processes and when they complete, start other ones. I need to manage the number of threads/logins I have active calling the api to maintain performance.
4. Re: Managing multiple eu processes
- Posted by jimcbrown (admin) Aug 09, 2010
- 1168 views
It's a C api. The client is given a unique thread at login and client uses that same thread until logout. The client depending on profile can login multiple times and therefore process multiple threads. This is what I need to be able to do, login multiple times call the api to execute certain api calls simultaneously, status those operations. I need to status those processes and when they complete, start other ones. I need to manage the number of threads/logins I have active calling the api to maintain performance.
It sounds like std/pipeio.e is exactly what you need.
5. Re: Managing multiple eu processes
- Posted by cp Aug 09, 2010
- 1072 views
It's a C api. The client is given a unique thread at login and client uses that same thread until logout. The client depending on profile can login multiple times and therefore process multiple threads. This is what I need to be able to do, login multiple times call the api to execute certain api calls simultaneously, status those operations. I need to status those processes and when they complete, start other ones. I need to manage the number of threads/logins I have active calling the api to maintain performance.
It sounds like std/pipeio.e is exactly what you need.
I'm on 3.1.1 now and not in a position to upgrade this app to 4.x at the moment. Is there a way to do this in 3.1.1 effectively?
6. Re: Managing multiple eu processes
- Posted by jimcbrown (admin) Aug 09, 2010
- 1179 views
It's a C api. The client is given a unique thread at login and client uses that same thread until logout. The client depending on profile can login multiple times and therefore process multiple threads. This is what I need to be able to do, login multiple times call the api to execute certain api calls simultaneously, status those operations. I need to status those processes and when they complete, start other ones. I need to manage the number of threads/logins I have active calling the api to maintain performance.
It sounds like std/pipeio.e is exactly what you need.
I'm on 3.1.1 now and not in a position to upgrade this app to 4.x at the moment. Is there a way to do this in 3.1.1 effectively?
On Windows, you can use http://www.rapideuphoria.com/capture.zip
I'm not aware of a Linux library for EU that does the same.