How we changed the university studies in Poland

In 2009 when I was still studying computer science in Krakow polish universities were very different to each other. The ways students gathered and exchanged their knowledge and learning resources were different as well. However they all had a common characteristic. Despite our broad access to Internet, they were kept in a closed circles, difficult to locate, uncatalogued and usually thrown away after one year when no longer needed by certain group.

So year after year, students kept starting from scratch, gathering knowledge, mailing links, PDFs, words, writing study notes, copying them, distributing by mms, closed forums and then throwing them away when they were no longer needed. It punched us as well, as computer science students we had our own, shiny forum. As a group we figured out there is no point in wasting hundred people effort to gather and catalog knowledge. We just invited our younger friends to join the forum – and by this they inherited our archives and efforts.

forum-inf

Obviously this worked fine for any student of our computer science major, but not outside of it. At that time me and Marcin also studied Marketing at the Krakow University of Economics and everything we needed to learn was usually… emailed between students and lecturers. In fact email was so deeply rooted in people’s minds that they didn’t even think about moving to forum (which at that time required some non-basic computer skills to set up correctly). Of course there were online places where students could upload their notes, but they provided no additional motivation to use them, apart from the fact that you were helping  someone to build their knowledge base out of your sources.

Here came the idea – give people an email-like tailored experience to collaborate, talk, organize events, but also let them keep this knowledge for their future, younger friends. And then maybe let them share knowledge between courses, majors or even universities.

When mailgroupowy.pl (mail4group.com) was founded in 2011 we quickly gained a lot of support and users willing to jump on board. They still had their emails, but they also got forum-like categorization and ability to tag, sort and search their knowledge base efficiently. All set up for them at no charge in seconds, just like email.

Four years later mailgrupowy.pl has over 300 000 registered users in Poland and gathered over 1.2 million community-reviewed study materials which are shared and accessible to everyone. They’ve been found by more than 5M people in Poland. According to similarweb this knowledge archive is ranked around #900 site in the country, which is really nice for a higher education related portal.

similar-web

But the most satisfying part is that when you start attending a university course, you no longer are left with a long, arduous task of finding your way around. Whether your group joins our communication platform or not, you still can benefit from browsing the archives. And they are not just a random knowledge written by one person. They are accumulated archives of consecutive years of students trying to figure out their efficient learning. What is more, we have come up with an engine that suggests study notes based on what courses and teachers/professors you have picked, so that you don’t even have to search.

mailgrupowy preview

We leave managing this knowledge pool to our community, where moderators also make sure all copy right claims are properly and timely handled, now concentrating mainly on good infrastructure and ways to provide better suggestions. The archive keeps growing and is kept up to date each day, so we’re looking at it being even better in the future.

This model has worked well in Poland where portal was very strictly tailored to the needs of students. We see some successes on other markets such as India and Turkey now. There is an excellent tool like ours ‘passai direto’ available in Brasil, another one called Koofers in US and some other local tools available on other foreign markets.

While historically universities sought to ensure equal access to study materials by placing materials on reserve in libraries, or by posting materials on their individual website, times have changed. These documents are no longer difficult to locate, not catalogued appropriately, or unavailable when needed. I am really happy that a side project of four software ninjas has grown to have the privilege to help students achieve their academic objectives – by making them spend less time searching and rewriting, so they have more time to do things that matter.

 

Linux containers to use in a startup

To me it is important to have a sustainable server startegy that will allow me to move my environment from server to server quickly. What is more everyone needs a new machine with exactly same set of attributes. It usually takes a good hour to set up everything without virtualization and the problem gets bigger and bigger the more your traffic increases.

What I use for a small protals is usually LXC. It is very lightweight, you can have 2 or more virtual containers on one machine and still access all files connecting to the parent machine via SSH or a program like winSCP.

To create/destroy LXC container

sudo lxc-create -t user -n C1
sudo lxc-destroy -n C1

To clone existing container

sudo lxc-clone -o C1 -n C2

Files created in container C1 in directory /home/user are then visible on a host machine in  var/lib/lxc/CN/rootfs/home/user/, which is very convenient.

To start your container

sudo lxc-start -n C1 -d

If you want to start a container and connect to it immediately run:

sudo lxc-start -n C1

When sudo lxc-ls returns the container in a second line it means that it’s been run and you can connect to it. There’s two methods to do that:

  • ssh <container's IP> – you need to check your IP using ifconfig when being in a container
  • sudo lxc-console -n C1

To stop existing container:

sudo lxc-stop -n C1

For reference how to rename your containers: http://www.bonusbits.com/main/HowTo:Rename_LXC_Container

Now the interesting part, to move your conatiner to another host you’ll most like do something like

  • lxc-create -n <new container>
  • rsync -avzr [old host:]"/var/lib/lxc/<old container>/*" [<new host>:]/var/lib/lxc/<new container>/ --exclude 'home/ubuntu/instance/' --exclude 'home/ubuntu/build/' --exclude 'nohup.out' --exclude "*.log*"
  • @rsync -avzr [old host:]/data/lxc/<old container>/rootfs/home/ubuntu/code/.metadata [<new host>:]/var/lib/lxc/<new container>/rootfs/home/ubuntu/code/
  • in file [<new host>:]/var/lib/lxc/<new container>/config change all occurences of <old container> to <new container>, add bew IP and new hwaddr
  • in file [<new host>:]/var/lib/lxc/<new container>/rootfs/etc/hostname zmień <old container> to <new container>
  • in file [<new host>:]/var/lib/lxc/<new container>/rootfs/etc/hosts change <old container> to <new container>
  • in file [<new host>:]/etc/hosts add an entry <new container>
  • lxc-start -n <new container>
  • Add a file to autostart on host: ln -s /var/lib/lxc/<new container>/config /etc/lxc/auto/<new container>.conf
  • If you want to forward any port (most likely 25) run iptables -t nat -A PREROUTING -p tcp --dport 25 -j DNAT --to-destination <container's ip>:25.
  • If you're using any load balancing on nginx add this to your config on load-balancer:/etc/nginx/sites-enabled/routing

References

Command lists and a guide: https://help.ubuntu.com/12.10/serverguide/lxc.html
Introduction link: https://www.ibm.com/developerworks/linux/library/l-lxc-containers/