Jump to content



Photo

[Tut--Example Code] Asynchronous Threading In Ubot 5.5 And 4.20 :)

Asynchronous Threading Asynchronous Threading v5.5.9 Threading 5.5 Threading 4.20 Threading

  • Please log in to reply
9 replies to this topic

#1 Code Docta (Nick C.)

Code Docta (Nick C.)

    Member for Hire

  • Fellow UBotter
  • PipPipPip
  • 1269 posts
  • LocationIn a Python or UBot IDE or ubotdocta.com
  • OS:Windows 7
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 18 December 2014 - 04:52 PM

Hey Ladies and Gent's,

 

Introducing

 

Asynco

 

A Technique in Threading...

 

 

thread-docta-pro-edition.png

 

 

ubot-advanced-threading-boot-camp-550-b-

 

Updated and some example codes, read this.

 

Basically what this does is:

 

  1. splits a list into a bunch of other lists
  2. spins up threads based on how many lists there are
  3. each thread loops through their respective lists until complete
  4. combines all list into one

Say you have 1000 usernames and passwords. You tell the bot to split the list into 100 each. This will create 10 threads and each thread will loop through 100 items (UN's and PW's or URL's).

 

Creating threads is an expensive task, so your resources are spent in creating them. Asynchronous Programming helps to do more with less resources.

 

In this example I will demonstrate just this from both sides and you can come to your own conclusion.

 

The bot will make  DB's and join them to create a data set. Why to not one?

In case someone wants to know how it's done. Yes, I certainly could have made just one.

 

The two databases are (1000)usernames,passwords and the other are (200)proxies. In the bot you can play with these values if you like. The joining demos how to assign the proxies to a larger list.

 

Then just enter the amount to split the list by. The higher the number, less threads are created.

 

Hit run!!!

 

Plugins used:  

Advanced.File.dll     Kev123

Bigtable.dll    Kev123

Diagnosticfunctions.dll     Kev123

StringManagementPlugin.dll       Aymen

All are free and available in the BST forum
 

Give it a whirl with different values, lemme know what you think!!!!!!

 

Enjoy,

 

CD

 

Working on some real world examples...so stay tuned.

Attached Files


UBot Expert Tutorials

 

ubot-docta-header-ubot-expert-store.png

 

UBot expert tutorials and documentation at ubotdocta.com


#2 Rich

Rich

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 542 posts
  • OS:Windows 7
  • Total Memory:More Than 9Gb
  • Framework:v4.0
  • License:Developer Edition

Posted 18 December 2014 - 05:37 PM

Thanks for the insight



#3 a2mateit

a2mateit

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 1759 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 18 December 2014 - 07:39 PM

This is EXACTLY how I have been threading for quite some time now!

 

Makes the crashes happen less frequently, and generally makes threading ALOT more stable.



#4 giganut

giganut

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 521 posts
  • LocationLost In Space!
  • OS:Windows 8
  • Total Memory:8Gb
  • Framework:v4.0
  • License:Developer Edition

Posted 19 December 2014 - 09:15 AM

Looking good TC as always, thanks for the exsample. :)



#5 Code Docta (Nick C.)

Code Docta (Nick C.)

    Member for Hire

  • Fellow UBotter
  • PipPipPip
  • 1269 posts
  • LocationIn a Python or UBot IDE or ubotdocta.com
  • OS:Windows 7
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 19 December 2014 - 09:21 AM

Thanks for the insight

You are welcome!

 

 

This is EXACTLY how I have been threading for quite some time now!

 

Makes the crashes happen less frequently, and generally makes threading ALOT more stable.

That's exactly why I am sharing it now and not some weeks/months from now!

So everyone can benefit from this knowledge.

 

Feel free to share yours here or in another thread.
Since you have been doing it for some time now you must have some really good examples to share with those that are struggling.

 

Knowledge is power and sharing is caring!! :)

 

Indeed tis more stable.

 

CD


UBot Expert Tutorials

 

ubot-docta-header-ubot-expert-store.png

 

UBot expert tutorials and documentation at ubotdocta.com


#6 deliter

deliter

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 595 posts
  • OS:Windows 8
  • Total Memory:More Than 9Gb
  • Framework:v4.0
  • License:Developer Edition

Posted 09 February 2015 - 10:46 AM

I can hardly make out any of that code,still don't get threading but thanks man



#7 Code Docta (Nick C.)

Code Docta (Nick C.)

    Member for Hire

  • Fellow UBotter
  • PipPipPip
  • 1269 posts
  • LocationIn a Python or UBot IDE or ubotdocta.com
  • OS:Windows 7
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 09 February 2015 - 12:25 PM

I have been working on some examples that should help.

 

Coming soon...

 

This code is just splitting the list into smaller chunks and putting each chunk into a thread.

 

Each thread has its own set of variables and list so they are not able to have cross thread contamination. In other words no thread locking needed to prevent other threads from changing values while another thread is using it. So each thread is a separate bot totally independent of the others.

 

CD


UBot Expert Tutorials

 

ubot-docta-header-ubot-expert-store.png

 

UBot expert tutorials and documentation at ubotdocta.com


#8 jamesfar

jamesfar

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 511 posts
  • OS:Windows 8
  • Total Memory:More Than 9Gb
  • Framework:v4.0
  • License:Developer Edition

Posted 14 July 2015 - 05:22 PM

where is the real world example?

The best proxies provider so far.
* Fast and Great Support. * No software restriction.

* It is favourite proxies provider on GSA forum. * Almost 2000 positive reviews on fiverr. * More than 1000s active clients

 

Try It !


#9 the_way

the_way

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 555 posts
  • OS:Windows 8
  • Total Memory:3Gb
  • Framework:v4.0
  • License:Developer Edition

Posted 14 July 2015 - 05:42 PM

Wow you must be building some super bots with this,


nnUV65W.png


#10 Code Docta (Nick C.)

Code Docta (Nick C.)

    Member for Hire

  • Fellow UBotter
  • PipPipPip
  • 1269 posts
  • LocationIn a Python or UBot IDE or ubotdocta.com
  • OS:Windows 7
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 15 December 2016 - 10:01 AM

I updated the code and it does not require the string management plugin any more.

 

You can get it here...

thread-docta-pro-edition.png

 

And some example sources here...

ubot-advanced-threading-boot-camp-550.pn

 

Just click the images.

 

Regards,

CD


UBot Expert Tutorials

 

ubot-docta-header-ubot-expert-store.png

 

UBot expert tutorials and documentation at ubotdocta.com






Also tagged with one or more of these keywords: Asynchronous Threading, Asynchronous, Threading, v5.5.9 Threading, 5.5 Threading, 4.20 Threading

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users