Questions tagged [twisted]

Twisted is an event-driven networking engine, written in Python and implementing many different protocols.

Twisted is a multi-protocol, event-driven, liberally-licensed open-source networking engine written in Python. It is useful for implementing both clients and servers, and scales up to large websites and down to embedded devices. Twisted makes it easy to implement custom network applications.

3385 questions
224
votes
14 answers

A clean, lightweight alternative to Python's twisted?

A (long) while ago I wrote a web-spider that I multithreaded to enable concurrent requests to occur at the same time. That was in my Python youth, in the days before I knew about the GIL and the associated woes it creates for multithreaded code…
jkp
  • 70,446
  • 25
  • 98
  • 102
181
votes
4 answers

When to use Tornado, when to use Twisted / Cyclone / GEvent / other

Which of these frameworks / libraries would be the best choise for building modern multiuser web application? I would love to have an asynchronous webserver which will allow me to scale easly. What solution will give the best performance /…
Wojciech Danilo
  • 10,776
  • 13
  • 60
  • 118
97
votes
2 answers

Caveats of select/poll vs. epoll reactors in Twisted

Everything I've read and experienced ( Tornado based apps ) leads me to believe that ePoll is a natural replacement for Select and Poll based networking, especially with Twisted. Which makes me paranoid, its pretty rare for a better technique or…
David
  • 16,423
  • 8
  • 63
  • 95
88
votes
6 answers

Threads vs. Async

I have been reading up on the threaded model of programming versus the asynchronous model from this really good article. http://krondo.com/blog/?p=1209 However, the article mentions the following points. An async program will simply outperform a…
user277465
85
votes
2 answers

Python twisted: where to start

I am trying to start learning twisted for socket servers creation. I want to add some useful features (like auth, and maybe some other). Maybe someone can point me to a good tutorial which will help me to start (+ maybe some other ideas)
Oleg Tarasenko
  • 8,244
  • 17
  • 64
  • 97
83
votes
2 answers

What's so cool about Twisted?

I'm increasingly hearing that Python's Twisted framework rocks and other frameworks pale in comparison. Can anybody shed some light on this and possibly compare Twisted with other network programming frameworks.
Anton Gogolev
  • 107,051
  • 37
  • 191
  • 278
72
votes
3 answers

What is the difference between event driven model and reactor pattern?

From the wikipedia Reactor Pattern article: The reactor design pattern is an event handling pattern for handling service requests delivered concurrently to a service handler by one or more inputs. It named a few examples, e.g. nodejs, twisted,…
Howard
  • 17,155
  • 33
  • 104
  • 173
67
votes
3 answers

Why is there a handshake failure when trying to run TLS over TLS with this code?

I tried to implement a protocol that can run TLS over TLS using twisted.protocols.tls, an interface to OpenSSL using a memory BIO. I implemented this as a protocol wrapper that mostly looks like a regular TCP transport, but which has startTLS and…
Jean-Paul Calderone
  • 45,622
  • 5
  • 85
  • 111
65
votes
2 answers

What are the use cases of Node.js vs Twisted?

Assuming a team of developers are equally comfortable with writing Javascript on the server side as they are with Python & Twisted, when is Node.js going to be more appropriate than Twisted (and vice versa)?
pmn
  • 1,520
  • 2
  • 13
  • 15
61
votes
7 answers

Why do we need to use rabbitmq

Why do we need RabbitMQ when we have a more powerful network framework in Python called Twisted. I am trying to understand the reason why someone would want to use RabbitMQ. Could you please provide a scenario or an example using RabbitMQ? Also,…
fear_matrix
  • 4,377
  • 9
  • 40
  • 62
48
votes
3 answers

How do I add two integers together with Twisted?

I have two integers in my program; let's call them "a" and "b". I would like to add them together and get another integer as a result. These are regular Python int objects. I'm wondering; how do I add them together with Twisted? Is there a…
Glyph
  • 29,525
  • 9
  • 79
  • 112
39
votes
4 answers

Is TCP Guaranteed to arrive in order?

If I send two TCP messages, do I need to handle the case where the latter arrives before the former? Or is it guaranteed to arrive in the order I send it? I assume that this is not a Twisted-specific example, because it should conform to the TCP…
Smashery
  • 49,979
  • 30
  • 90
  • 123
38
votes
2 answers

Twisted server crashes unexpectedly while running django

I am running a django application on twisted using the django-on-twisted scripts from this site. All requests are served by an nginx server which reverse proxies relevant requests to twisted. I have a url setup for an API, which basically just…
tapan
  • 1,756
  • 2
  • 17
  • 31
36
votes
2 answers

Django Push HTTP Response to users

I currently have a very simple web application written in Django, and I would like to implement something like a callback/push notification service in my application. For example: When one user(client) uploads a photo to the server, the server…
evkwan
  • 653
  • 2
  • 9
  • 16
34
votes
3 answers

How to write a Twisted client plugin

I have used twisted to implement a client. It works fine. Now I want to be able to pass command line arguments to it, so I need to implement a twisted plugin. I have performed many searches to find resources that would show how to convert the…
user823743
  • 2,034
  • 1
  • 19
  • 28
1
2 3
99 100