<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>I like to think that we’re two peas in a pod. (I don’t know why I use so many English idioms on the listserv. I swear that I don’t actually use them in my every day life.)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’m not sure how easy it is to split a package up with DEB packages but it’s so easy with RPM packages. I feel like there’s no harm in trying. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I haven’t been motivated to code outside of work hours for a while now, but maybe I would if I had that koha-libs package. I like the idea of spending free time working on little services that can live in their own Docker containers. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>(Actually, I already have something like that for Shibboleth. You can’t install it on Ubuntu 18.04 due to broken dependencies, so what I do is have a Docker container running Debian and do everything with Shibboleth in there, and I just proxy from the Docker host that runs Koha to the Docker container to do the auth. I then pass back a one-shot auth token to authenticate back into Koha. Works a treat. If I had access to the Koha core libs, I’d be able to do it even more seamlessly…)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>David Cook<o:p></o:p></p><p class=MsoNormal>Software Engineer<o:p></o:p></p><p class=MsoNormal>Prosentient Systems<o:p></o:p></p><p class=MsoNormal>Suite 7.03<o:p></o:p></p><p class=MsoNormal>6a Glen St<o:p></o:p></p><p class=MsoNormal>Milsons Point NSW 2061<o:p></o:p></p><p class=MsoNormal>Australia<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Office: 02 9212 0899<o:p></o:p></p><p class=MsoNormal>Online: 02 8005 0595<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> Renvoize, Martin <martin.renvoize@ptfs-europe.com> <br><b>Sent:</b> Wednesday, 21 April 2021 4:49 PM<br><b>To:</b> David Cook <dcook@prosentient.com.au><br><b>Cc:</b> Mason James <mtj@kohaaloha.com>; Koha Devel <koha-devel@lists.koha-community.org>; Tomas Cohen Arazi <tomascohen@theke.io><br><b>Subject:</b> Re: [Koha-devel] Packaging idea (for decoupling systems, Docker, etc)<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>This is another area where I think our thoughts align David.  I've also wanted to split his into even smaller units for a while..  a clear example is our move to background jobs. I see those as prime targets for horizontal scaling.. but as you've highlighted, at the moment to get the library of core code you may want to write a job you need to install the whole app.. koha-libs would certainly help with that<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Tue, 20 Apr 2021, 2:12 am , <<a href="mailto:dcook@prosentient.com.au">dcook@prosentient.com.au</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><p class=MsoNormal>Hi Mason,<br><br>[FYI this started as a response and turned into a stream-of-consciousness.][Also really keen to hear from Tomas and Agustin about their work with Docker/Kubernetes/Helm/etc.]<br><br>The idea with "koha-core" was to separate out the third-party systems away from the core application. In this case, "koha-libs" would be about separating the core libraries away from the core application. <br><br>Consider that the "koha-core" package contains the full Koha application (including code, templates, images, other assets, etc) and its application dependencies (e.g. at, cron, daemon, starman, sudo, unzip, xmlstarlet, yaz, mysql-client). My latest koha-core package alone was 38MB. A "koha-libs" package would probably be measured in terms of KB.<br><br>I'm thinking about the absolute minimum required to run things like the SIP server or some other service/microservice (e.g. z3950-responder, REST service, etc). The koha-libs package would need to contain the Koha .pm files and koha-libs would depend on koha-perldeps. <br><br>In theory, over time, some of the libraries and dependencies would probably move out of koha-libs and koha-perldeps to live in the individual services, but I don't have a full vision for that yet.  <br><br>You could think about a koha-libs package as a Perl API rather than a HTTP API, which could be used by Koha's existing background services, and it could be used by new separate services.<br><br>I have a vision for creating a service that depends on koha-libs, points at a koha-conf.xml file, and then implements its own functionality separate from the main Koha codebase. <br><br>It could allow for a lot of power and flexibility. <br><br>--<br><br>That said, maybe I'm thinking too small and too Debian-focused. Maybe a CPAN distribution of Koha/ modules makes more sense (or both koha-libs and a CPAN distribution). Apparently we could use the cpanfile to specify the dependencies for the CPAN distribution too. Then you could install it on any suitable OS/container. In a container environment, you could always install the Koha/ modules and dependencies on a volume, and then share that volume with your containers. That would have some pros and cons. <br><br>I'm mostly just brainstorming. Thinking about how we can re-organize things to take advantage of modern technology. But then to what end?<br><br>One advantage of Docker is to run different versions of the same software on the same virtual machine...<br><br>While I was thinking about 1+ containers per Koha library, maybe we do just go with a 20.05 Koha container, a 20.11 Koha container, a 21.05 Koha container. I suppose each of those versions could have multiple containers though. For example, a SIP server container, a Z39.50 responder container, a Zebra indexer container, a Zebra server container, etc. Technically speaking, if we planned the volumes right, the Koha "etc" config and "share" and "var" volumes could all be shared across those containers. Of course, that means that all the containers have to be running on the same host. At the scale of most Koha libraries, that would probably be fine. I suppose the main change here would be to the debian scripts and koha-common init script...<br><br>--<br><br>Overall, I suppose though most vendors would win from improved multi-tenancy. Having 100 Starman instances for 50 Koha libraries where only 3 libraries might have requests at a time is massive overhead. <br><br>I imagine improved multi-tenancy coupled with multiple versions per host via Docker... that would be a nicer setup. <br><br>Preloading Koha::REST::V1 and getting its work done in the master starman process rather than the child processes would be better too...<br><br>Ok, that's enough ranting for me for now heh. Too many ideas and never enough time.<br><br>David Cook<br>Software Engineer<br>Prosentient Systems<br>Suite 7.03<br>6a Glen St<br>Milsons Point NSW 2061<br>Australia<br><br>Office: 02 9212 0899<br>Online: 02 8005 0595<br><br>-----Original Message-----<br>From: Koha-devel <<a href="mailto:koha-devel-bounces@lists.koha-community.org" target="_blank">koha-devel-bounces@lists.koha-community.org</a>> On Behalf Of Mason James<br>Sent: Friday, 16 April 2021 3:50 PM<br>To: <a href="mailto:koha-devel@lists.koha-community.org" target="_blank">koha-devel@lists.koha-community.org</a><br>Subject: Re: [Koha-devel] Packaging idea (for decoupling systems, Docker, etc)<br><br>hi David<br><br>i think we may already have this functionality with the 'koha-core' package?<br><br><br>On 15/04/21 3:32 pm, <a href="mailto:dcook@prosentient.com.au" target="_blank">dcook@prosentient.com.au</a> wrote:<br>><br>> Hey all,<br>><br>> What do people think about creating a “koha-libs” package which just contains Koha’s libraries (ie C4/, Koha/, etc)?<br>><br>> I’m not as familiar with DEB packaging as I am with RPM packaging, but I recently did it with a RPM-based project I manage. It allowed me to easily create other services with the same dependencies. I created these other services in other Docker containers, and I was able to use my core application libraries without having to install the entire application in every container. I share the application configuration file between them and that’s it.<br>><br>> It’s not a perfect solution. Really what I want is app-service1, app-service2, app-service3, and app-common with app-common containing the shared libraries. But I like it as an intermediate step.<br>><br>> And I would be lying if it didn’t have pros and cons. One con is updating a library in app-libs, when I need a change in app-service1, and then making sure that all my deployments have the right updated library. More overhead than just having a monolithic application. On the other hand, if I want to make a change just to app-service1, I can just update it without having to affect any other parts of the application. That added overhead also gives incentive for writing cleaner testable code which does the right thing in the first place.<br>><br>> Anyway, just food for thought.<br>><br>> David Cook<br>><br>> Software Engineer<br>><br>> Prosentient Systems<br>><br>> Suite 7.03<br>><br>> 6a Glen St<br>><br>> Milsons Point NSW 2061<br>><br>> Australia<br>><br>> Office: 02 9212 0899<br>><br>> Online: 02 8005 0595<br>><br>><br>> _______________________________________________<br>> Koha-devel mailing list<br>> <a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br>> <a href="https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>> website : <a href="https://www.koha-community.org/" target="_blank">https://www.koha-community.org/</a> git : <br>> <a href="https://git.koha-community.org/" target="_blank">https://git.koha-community.org/</a> bugs : <br>> <a href="https://bugs.koha-community.org/" target="_blank">https://bugs.koha-community.org/</a><br><br>_______________________________________________<br>Koha-devel mailing list<br><a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br><a href="https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>website : <a href="https://www.koha-community.org/" target="_blank">https://www.koha-community.org/</a> git : <a href="https://git.koha-community.org/" target="_blank">https://git.koha-community.org/</a> bugs : <a href="https://bugs.koha-community.org/" target="_blank">https://bugs.koha-community.org/</a><br><br><br>_______________________________________________<br>Koha-devel mailing list<br><a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br><a href="https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>website : <a href="https://www.koha-community.org/" target="_blank">https://www.koha-community.org/</a><br>git : <a href="https://git.koha-community.org/" target="_blank">https://git.koha-community.org/</a><br>bugs : <a href="https://bugs.koha-community.org/" target="_blank">https://bugs.koha-community.org/</a><o:p></o:p></p></blockquote></div></div></body></html>