[SVHMPC] OpenMoko light web server

Matthew S. Hamrick mhamrick at cryptonomicon.net
Tue Apr 17 19:44:09 CEST 2007


Yup.. that's a good idea. I have a philosophic issue with leaving  
request/response connections open, but I can probably get over it.  
The current jowles design assumes a single thread of execution, but  
it shouldn't be that difficult to add a ring thread and a SMS receive  
thread.

-Cheers
-Matt H.

On Apr 16, 2007, at 9:36 PM, Tim Newsom wrote:

>
> On Mon, 16 Apr 2007 13:58, Matthew S. Hamrick wrote:
>> Okay.. a few points:
>>
> <snip>
>> Q. javascript? on a phone? Isn't that going to suck down the power?
>>
>> A. in a word, yes. But I think the main problem will not be the added
>> overhead of using javascript, it's going to be the frequent request /
>> response. In the old days when we bundled ORBs with browsers, we  
>> could
>> execute java (and presumably have a javascript interface) that would
>> receive asynchronous messages from the server. Why is this important?
>> Because the phone (on the other side of the http interface) is  
>> going to
>> ring or receive an sms message or the signal is going to go up or  
>> down.
>> And these are things that occur outside the context of a client
>> request. So, if you want to see if the phone just rang, you have to
>> keep pinging the web server every second or so, and if it responds  
>> with
>> "I'm ringing," you fire off the javascript that draws the "I'm  
>> ringing"
>> icon on the interface. All in all this is pretty substandard.
>>
>
> Ok.. Well this is probably somewhat browser specific, but in the
> XMLHttpRequest methods there is a synchronous or asynchronous flag.
> Synchronously will behave in the normal request response method and  
> wait
> for a return before continuing to execute... Async will allow the code
> to continue executing and then fire the response once it sees it.  I
> don't know if there are timeouts or not and I have not played around
> with it much, but it seems like you could build several request
> objects... One might be dedicated to the ringing function.. Then  
> place a
> timer on it and if there is no response by the timeout you could  
> reset.
> All the request would do is ask if the phone rang and wait.. Then your
> cgi code could sit for the period of the timeout waiting for either a
> request (to cover the situation of the phone ringing between requests)
> or responding when the phone rings...
>
> This should be more like the subscription model where you ask to be
> notified and at any point it could happen.  But, like I said, it  
> may be
> browser specific. /shrug
> Just something to look into maybe.
> --Tim
>
> _______________________________________________
> SVHMPC mailing list
> SVHMPC at telefono.revejo.org
> http://telefono.revejo.org/mailman/listinfo/svhmpc_telefono.revejo.org





More information about the community mailing list