Recently Written · git

lisp-multithreaded-internet

Multithreaded internet for Common Lisp

git clone https://github.com/equwal/lisp-multithreaded-internet

Log | Files | Refs


README.org (1245 bytes)

1 #+TITLE:Multithreaded Internet
2 #+AUTHOR: Spenser Truex
3 #+EMAIL: web@spensertruex.com
4 
5 Concurrently download webpages. SSL supported. Dead simple.
6 * Installation
7 
8 Clone into =~/common-lisp/lisp-multithreaded-internet/= or your ASDF directory
9 for your system (check the value of =asdf:*central-registry*= for more info).
10 
11 Install quicklisp (see the [[https://www.quicklisp.org/beta/][quicklisp website]]).
12 Execute:
13 #+BEGIN_SRC lisp
14 CL-USER> (asdf:load-system :multi)
15 #+END_SRC
16 * Usage
17 To download websites using multithreading, execute:
18 #+BEGIN_SRC lisp
19 CL-USER> (multi:uri "uri1" "uri2" "uri3"...)
20 #+END_SRC
21 For example:
22 #+BEGIN_SRC lisp
23 CL-USER> (multi:uri "https://google.com" "https://yahoo.com")
24 #+END_SRC
25 Will download the google homepage and yahoo simultaneously, returning them as
26 strings in a list.
27 
28 * Issues:
29 Send a pull request if you improve it.
30 - This could not be simpler, so perhaps none?
31 - The current implementation is pretty naïve, failing to, for example, timeout.
32 - Whichever URI takes the longest to download decides how long it takes to
33   execute.
34 - It would be nice to have more control over flow in some situations.
35 - There is virtually no error checking. Even "google.com" wont work without an
36   HTTP(S) in front of it.
37