Reputation: 37
Hey guys I have looked at the best ways to do this. I want to make sure I understand correctly.
If I want:
http1 http2 http3 http...
To be sent at exactly the same time. I should set these up into a thread and then start the thread? I need to make sure it is exact same time.
I think this can be done in Java but Im not familiar with it. Thanks guys for any help you can give!
After reading up more on the process I dont think this was super clear. Will the async processing send these packets at the same time so they arrive at the destination at the same time? From reading different articles it seems like the async is just that.
I believe for what Im looking for, I would need to use a synchronous method like multiprocessing.
Thoughts?
Upvotes: 0
Views: 271
Reputation: 5046
You question is not totally clear to me but have you looked at Twisted? It's an event-driven networking engine written in Python. If you're not familiar with event-driven programming, this Linux Journal is a good introduction. Basically instead of threads, Asynchronous I/O is used with the reactor pattern (which encapsulates an event loop).
Twisted has multiple web clients. You should probably start with the newer one, called Agent (twisted.web.client.Agent), rather then the older getPage.
If you want to understand Twisted, I can recommend Dave Peticolas's Twisted Introduction. It's long but accessible and detailed.
Upvotes: 1