]> git.treefish.org Git - fex.git/blob - doc/SEX
Original release 20150120
[fex.git] / doc / SEX
1 SEX is a F*EX companion: Stream EXchange
2
3 You can imagine SEX as network wide UNIX pipes with a relay between. This
4 can be usefull for piping data from A to B where A and B cannot establish
5 a direct connection, but both can connect by HTTP to the SEX-server. SEX
6 is a synchronous service in conjuction to F*EX which is asynchronous.
7
8 For seamless integration into the UNIX tool chain, there are the
9 shell-tools sexsend and sexget.
10
11 Using web browsers for sexing will not work, because they cannot handle
12 streams in a pipe. So far, there are only the UNIX clients. Feel free to
13 implement other clients for other operating systems :-)
14
15 Authentication is the same as with F*EX.
16
17 Example:
18
19 root@lanldap:/var/log: tail -f syslog | sexsend framstag@rus.uni-stuttgart.de
20
21 framstag@blubb:/tmp: sexget | grep ldap
22
23
24 If you need encryption, then use the standard UNIX toolbox and add a
25 appropriate program to the pipe, for example: openssl bf
26
27
28 Tips for using SEX for file exchange:
29
30 I have a lot of (administrative) accounts on even more hosts, where I have
31 to exchange a lot or big files. These hosts often cannot make direct
32 tcp-connects to each other, because of IP-filters, firewalls or missing
33 server software. Only outgoing connections are possible.
34
35 Therefore NFS, ssh or even ftp are no option.
36
37 Since today my solution was F*EX:
38
39 1) on source host send the files within a container to the F*EX-server:
40
41         fexsend -a container.tar file1 file2 ... .
42
43 2) read or copy the FEXURL with mouse
44
45 3) on destination host get container.tar from F*EX-server and extract it:
46
47         fexget FEXURL 
48         tar xvf container.tar
49         rm container.tar
50
51
52 Backdraws:
53
54 - a lot of manually work
55 - creation of container.tar needs (a lot of) time
56 - container.tar needs (too much) disk space on source and destination host
57   and on the F*EX-Server
58   
59
60 Small solution:
61
62 Usage of xx (wrapper for fexsend) eliminates manually handling of
63 container.tar. But it will be still created, only automatically.
64 The ressource problems are still there.
65
66
67 The new sexy solution:
68
69 I use SEX (Stream EXchange) instead of FEX (File EXchange)!
70
71 There is no more a temporary container.tar, but the files are transfered
72 as a stream with the new client sexxx!
73
74 An example (*):
75
76 On the source host:
77
78         root@obertux:~/bin# sexxx .
79         streaming:
80         ./
81         ./autopatch
82         ./subsys
83         ./pwsync
84         ./cspread
85         ./fspread
86         ./spread
87         ./iptconf
88         ./esxbackup
89         ./esxlist
90         ./getxx
91         ./rscreen
92
93
94 On the destination host:
95
96         framstag@flupp:/tmp: sexxx
97         extracting from stream:
98         drwxr-xr-x root/root         0 2010-08-06 12:48 ./
99         -rwxr-xr-x framstag/users  170 2010-01-20 13:26 ./autopatch
100         -rwxr-xr-x root/root       336 2006-02-02 15:15 ./subsys
101         -rwxr-xr-x root/root       278 2010-01-18 23:38 ./pwsync
102         lrwxrwxrwx root/root         0 2009-11-03 15:49 ./cspread -> spread
103         lrwxrwxrwx root/root         0 2009-11-03 15:49 ./fspread -> spread
104         -rwxr-xr-x root/root     10354 2010-02-12 14:49 ./spread
105         -rwxr-xr-x root/root      1380 2010-01-14 08:54 ./iptconf
106         -rwxr-xr-x root/root       116 2010-05-04 18:36 ./esxbackup
107         -rwxr-xr-x root/root       344 2010-05-06 13:33 ./esxlist
108         -rwxr-xr-x root/root        93 2010-08-06 12:32 ./getxx
109         -rwxr-xr-x 1000/users      173 2009-11-26 13:40 ./rscreen
110
111
112 Now I can transfer any files from a new installed (VM) server to my
113 admin workstation behin a firewall. Or the other direction.
114
115
116 (*) The example above has only a few kB, but one can use sexxx for many GB
117     or even TB!
118     On my VMs I get a throughput of 90 MB/s.
119