I have running webserver built with mini framework Bottle.
Using SqlAlchemy as ORM to my mariadb.
I have few threads which are checking state and triggering some events.
I also have a thread where I listen to tcp. Getting data and adding to database.
I where using raw socket. Got stack with limits. It was down when few clients where connected at the same time. As I read there is listen around 5 max. Depending on system.
No I wrote simple Twisted server. And using it. I will test it tomorrow with real clients. At this moment I am testing it with 2 or 3 clients. Thats not big deal.
I also connecting to my server with telnet to see easily what it is echoing back. Rarely it closes connection without echo.
My question was deos transport.looseConnection closes conenction not waiting for writing data to client. I already read about that looseConnection will wait until it does not read all received data.
theology: it's using select to do the things, much like twisted would if it used select.
RandomNoob
mmattice: unfortunately "it does not allow you to use the ORM"
mmattice
oh, boo
RandomNoob
mmattice: do we have alternatives to twisted? I just need tcp server which will accept lots of connections and will not freeze or die :D
mmattice
what's "lots of connections"?
RandomNoob
at least 1500 clients connecting via tcp sending byte data
in every 2 minutes
mmattice
What're you doing with that data that you need an ORM?
ccxQ has quit
clokep joined the channel
terrycojones joined the channel
teratorn
RandomNoob: transport.write() queues the data to be written as soon as possible. calling transport.loseConnection() will only close the connection after all queued data has been written
RandomNoob
teratorn: Thank you.
mmattice: In that thread ORM used only for saving data into db. No problem with sqlalchemy as it has scoped_session and for every dataReceived I am opening session and closing it. As sessions are short lived. There are few posts and comment that sqlalchemy directly cant work with twisted but at this moment I do not have any problems. Lets wait for tomorrow. I will write here my tests results .