muspellsson / wub

Automatically exported from code.google.com/p/wub
0 stars 0 forks source link

How do I implement a client socket connection #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
To connect to oure db_module we connect with a socket with async
datatransfer so we need vwait to serialize the query but in the Site
package you rename the vwait.

Why jou do that?
How can I make a client socket connection with vwait from the wub server to
oure db_module on a other server?

Thanks Marc

Original issue reported on code.google.com by marc.zie...@gmail.com on 29 Dec 2009 at 6:04

GoogleCodeExporter commented 9 years ago
Being a network server, Wub needs to enter the event loop, and uses [vwait] to 
do
that.  Once [vwait] has been executed, it's almost always an error to use it 
again.

Rather than [vwait], your db app could use [trace variable] to fire an event on 
the
change of the variable.  Better still, your db interface could just generate an 
event
itself, since (one presumes) it is itself event-driven.

A client socket connection doesn't, itself, require [vwait].  It's presumably 
only
using [vwait] to enter the event loop.  So it should just work.

BTW, you may want to look at the [Httpd Suspend] and [Httpd Resume] commands, if
you're using page requests to fire off asynchronous db access.  It'll allow you 
to
process other pages while the db processing is occurring.

Original comment by mcc...@gmail.com on 4 Feb 2010 at 11:20

GoogleCodeExporter commented 9 years ago
I guess my answer was sufficient :)

Original comment by mcc...@gmail.com on 8 Jun 2010 at 8:08