distribution installation called static-install • It is much simpler, safer, faster than traditional one (i.e, executing Makeﬁle.PL) • cpm support static-install • I wrote a blog post about static install
programming paradigms • Multi Thread • I don’t think it is good idea to use thread in perl5. Oops. • Event Driven • This is a good choice. But once we adopt event-loop, we cannot use synchronous code anymore. This means that we cannot relay on cpanminus code. Oops. • Multi Process • Let’s use this
questions are: • Q1: How do we pass data from the master to workers and vice versa? • Q2: The master need to know that workers ﬁnish their jobs as soon as possible. How do we achieve this? worker worker worker master process
• Idea1: ﬁles • Other process does not detect ﬁles are changed quickly. It appers inotify is "slow". • Idea2: TCP/IP • A Good choice. Because master and worker processes are in the same host, we don’t have to use TCP/IP necessarily. • Idea3: pipes • Let’s use this We should prepare 2 pipes for master -> woker and woker-> master
(= ﬁnished) workers here (internally, we do select pipes!) Modularize connection between the master and workers as Parallel::Pipes module And send job to the ready worker This only 11-line code makes cpm fast!
Traditionally we install CPAN modules into one speciﬁc directory. So, after install, we cannot see which distribution a module come from and it is hard to re-use distributions • On the other hand, MIYAGAWA has introduced a concept "central repositories" in his project Carmel • Let’s keep each distributuions separately • Once cpm implement it, for example, cpm can easily install only runtime dependencies