[Twisted-Python] twisted and gprs
johna at johnaherne.co.uk
Tue Jan 9 01:20:12 MST 2007
>> Thanks for the info.
>> You are right. The IP addresses are not unique. It is the combination of IP/PortNo that is unique if I understand the network people correctly. They share about 10 IPs with everyone.
> Not even that. At best ports are random. Ports are 16 bit integers
> (and some ranges are reserved). So if you include somehow the client
> IP, you've got a problem.
> OTOH, client IPs as they arrive on the server (gateway IP so to say)
> plus ports should be unique.
>> I'll run some more tests on how long the firewall is designed to keep its associations. And as well I'll check with the network operators.
> The problem here is, that you need to consider:
> *) your app will get deployed on some other network.
> *) the network people change their config (e.g. because the gateway
> has problems to remember all it's associations).
> *) if you have not an insider connection to the real responsible, most
> network operators won't be able to give you that information.
>> I'll also check re the costings for keepalives.
> Just take a look at the rates for GPRS. In Europe, they are billed
> usually at increments of 100KB. So making a connection timeout and
> reestablishing the GPRS session costs you on average 50KB that you
> could use for application level keep alives.
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
You are probably right about the cost of keepalives. I'll be setting up
some sort of test for it.
And switching networks will no doubt prove a problem. But I have a
feeling they all work on the same basis, so I may be ok if I get the
basic protocol right.
One issue with the PDAs is as follows:--
One connection to the server is to set up a link the server can use to
push data to the PDA. The PDA will wait on this connection for data to
be sent through.
So it is the server that needs to know if this connection is down. The
server will need to send the keepalives. If the connection is gone, the
server will mark the unit as gone-away and wait for it to reconnect.
That will present a problem to send keepalives to 100 units and check
responses. This will take a fair amount of time especially if some of
them have dropped out. So I might need to have a lower rate of keepalive.
The PDA as client will send its data and status info to another server
as simple http posts. If it can't find the server it will just timeout
and the user will need to resend or reconnect.
So I was looking at using twisted for the part where the server was
pushing data to the PDA based on events occurring elsewhere. I was
hoping that twisted would give me a basic comms framework that did the
nuts and bolts and I could plug my application into.
Is that a good possibility.
More information about the Twisted-Python