0

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?

1 Answers1

1

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.

jimhark
  • 4,938
  • 2
  • 27
  • 28
  • 1
    This seems like it should be a comment to me. – Danny Jan 17 '13 at 17:58
  • @Danny, I'm continuing to add to this answer. I wanted to get something in quickly. – jimhark Jan 17 '13 at 18:03
  • My main goal is to have them sent at same time. I have not looked at twisted, still reading different methods but doesnt seem like many say if its possible to send at identical times. – toyotajon93 Jan 17 '13 at 18:17
  • You can do that with Twisted. It's not the only way, but if you're using Python, it's one popular way. – jimhark Jan 17 '13 at 18:19
  • Any good read on twisted? Im pretty python proficient but not an expert. – toyotajon93 Jan 17 '13 at 18:22
  • I found http://stackoverflow.com/questions/2632520/what-is-the-fastest-way-to-send-100-000-http-requests-in-python going to read more looks like a lead. – toyotajon93 Jan 17 '13 at 18:28
  • @toyotajon93, is there anything else I can do to make this answer more acceptable to you? – jimhark Feb 14 '13 at 21:02