FROM : kubernan
DATE : Fri Nov 01 18:04:34 2002
I just solved the performance problem, but i don't know
if the solution is a good idea.
old code : The client application opens a DO connection to the server
in the awakeFromNib
This connection is available for all methods of the window controller
that
creates a new request.
new code : Now, i create a new DO connection in each method call. Each
request has
its connection to the server and the synchronous response returns now
immediately.
Thx again for your help.
K.
Le vendredi, 1 nov 2002, ` 16:55 Europe/Paris, Lindsey Spratt a icrit :
> Kubernan (is this a first name or a last name?),
>
> Design snippet:
> mainController
> that runs in loop and receives client request
>
> For each new request, check it and if the request
> is in error, returns the error (synchronous).
>
> If the request is available, create a new instance
> of my own object and call a method in this instance.
>
> In the new instance : create a new thread that do the stuff
> for the client request. In the thread, informations of the work
> are sent to the client using -(oneway void).
>
> Is the main thread of the server waiting for the new thread that
> services the client request to finish, or is it possible for the
> server to spawn a thread to solve a client request and *while that
> spawned thread is running* to get the next client request and spawn
> another thread to service it, and so on? It's hard to tell from your
> design sketch, but if the server main thread waits on the new
> request-serving thread, this would be a problem.
>
> Cheers,
> Lindsey Spratt
> http://homepage.mac.com/lspratt
> _______________________________________________
> cocoa-dev mailing list | <email_removed>
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Fri Nov 01 18:04:34 2002
I just solved the performance problem, but i don't know
if the solution is a good idea.
old code : The client application opens a DO connection to the server
in the awakeFromNib
This connection is available for all methods of the window controller
that
creates a new request.
new code : Now, i create a new DO connection in each method call. Each
request has
its connection to the server and the synchronous response returns now
immediately.
Thx again for your help.
K.
Le vendredi, 1 nov 2002, ` 16:55 Europe/Paris, Lindsey Spratt a icrit :
> Kubernan (is this a first name or a last name?),
>
> Design snippet:
> mainController
> that runs in loop and receives client request
>
> For each new request, check it and if the request
> is in error, returns the error (synchronous).
>
> If the request is available, create a new instance
> of my own object and call a method in this instance.
>
> In the new instance : create a new thread that do the stuff
> for the client request. In the thread, informations of the work
> are sent to the client using -(oneway void).
>
> Is the main thread of the server waiting for the new thread that
> services the client request to finish, or is it possible for the
> server to spawn a thread to solve a client request and *while that
> spawned thread is running* to get the next client request and spawn
> another thread to service it, and so on? It's hard to tell from your
> design sketch, but if the server main thread waits on the new
> request-serving thread, this would be a problem.
>
> Cheers,
> Lindsey Spratt
> http://homepage.mac.com/lspratt
> _______________________________________________
> cocoa-dev mailing list | <email_removed>
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Lindsey Spratt | Nov 1, 01:24 | |
| kubernan | Nov 1, 11:06 | |
| Lindsey Spratt | Nov 1, 16:55 | |
| kubernan | Nov 1, 18:04 |






Cocoa mail archive

