Skip to main content

the avatar of Sankar P

AWStruck

tldr: 

A long post about my experience with implementing a quiz software in my college, a decade ago and wondering how easy things have become now due to AWS.

Prelude

In 2002 (iirc) (thirteen years ago, as of composing this post) when I was in college, we had an inter-collegiate technical symposium, where Online Quiz was one of the events. A Microsoft Visual Basic 6.0 (which I personally consider to be one of the best software ever developed) application was developed in-house and installed on about 50 computers, where various contestants from different colleges could come and take the test. However, as Murphy predicted, due to various virus issues, the software failed spectacularly. Some answers/responses got corrupt, accumulation of responses from different machines proved faulty, the scoring went awry in some corner cases, etc. Overall, the application turned out to be total chaos. However, since India is populous, we were able to throw more people at the problem and finish the event, with a lot of manual effort, inspite of a few unhappy participants.

In the planning phase for the subsequent edition of the symposium two years later, a software development committee for formed. It would do all the software for the entire event,  (like creating a website, developing flash/swish videos, software for the individual events, etc.). The quiz event had two rounds, a preliminary round where all the appearing colleges contested and a final round where six (or probably more) top colleges from the previous round were selected. An eloquent person was made incharge of the quiz event. I proposed to the person that we do the software for the preliminary rounds ourselves, instead of depending on the committee. The committee was already swamped with work and they were happy to get rid of a piece that has more chances of failure. Some adventurous people (like Antony) expressed their interest in joining the project. Thus it all began.

The Adventure

Much to the amusement of my roommate Bala, I started with planning the architecture and design on paper (complete with UML diagrams, etc.), instead of starting with coding as is the norm for us those days. Much later I came across an interesting quote by Alan Kay, "At scale, architecture dominates material". Having learnt from the mistakes of the previous years, I made some decisions.

* The software should follow the web (client-server) model, that is getting popular. At least this is an excuse to learn some new (then) technologies, like JSP, Javascript, Tomcat etc.
* The server machine becomes a single point of failure for the entire system. It could prove to be a performance bottleneck to, as our machines were all having a humongous 32 MB of RAM. There was one 64 MB ram in our lab which I planned to use as the server. In our hostel, some had a machine with luxurious 128 MB of RAM, which I was planning to borrow if the need comes.
* The single point of failure, the server should not be susceptible to virus attacks. So we should experiment installing Solaris or this thing called Linux (There was no Ubuntu then).
* Internet was a luxury and for the entire college we had access to it in about three computers, only in the evenings. So anything that requires too much internet access for development is automatically rejected.
* The software should scale at any cost, for at least 200 parallel connections
* We should regularly backup the sources in different machines, in case the development boxes gets a virus attack. We had no idea of version control systems then.
* We will be using Mysql/oracle or some real database instead of writing to files. MS Access was ruled out automatically as Visual Basic was eliminated already. In hindsight, sqlite would have been an excellent choice.
* The quiz webpage when saved on the client browser should save the file along with the answers chosen/typed.
* Each quiz session will last for about 30 minutes. There will be username/passwords generated for each unique participant.

We developed the JSP webapp running in Tomcat in a few weeks. We used the generous help of my classmates to throughly test the correctness of our scoring system. As with any manual system, it was prone to errors. A tester made a mistake in scoring and we broke our head trying to find a non-existent bug in our code for a few hours. This testing also helped us get the load numbers for the current system, with about 30 concurrent users. We had some performance monitoring hooks written in our code for this.

We survived multiple virus attacks during the development, because of the distributed source backup techniques that we have employed. At one stage, we even burnt our sources in a CD when the administrators decided to Norton Ghost all the hard disks in our lab, with a fresh Windows XP image, to minimise the virus effects.

I learnt the magical world of performance monitoring, database indexes, high availability, connection pools etc. during this project. I learnt much more in this single experiment than the almost half a dozen papers we had on software engineering, process management, quality assurance etc. taught by lecturers with no real world knowledge and questionable scoring practices. Some of the fascination that I acquired with database engines has still not subsided.

Having finished the coding one week prior to the event, we focussed more on scaling and testing. I prepared a backup server, another high-RAM machine in case our main server went kaput. Much to the jovial criticisms of my friend Sangeeth, we tested our system, the night before the event, for 2000 parallel users and it worked well without breaking a sweat. This is such a silly number in today's figures, but we were easily satisfied then with low numbers in both server performance (and salary). Almost all the front end code was handwritten Javascript with no frameworks / libraries (as mostly none existed or we were not aware). I was satisfied with what we have done, irrespective of however the results may turn out to be the next day.

Having lost a good sleep due to the stress testing the previous night, I woke up late and missed the delicious Pongal in our hostel for breakfast. Ruing about the missed breakfast caused a weird stare from the rest of the team. I rushed for the preliminary quiz event ahead of time and two among us did a final test on the last day. We planned on using some Rational test suites for automated testing but could never get to that, thanks to all the virus related frequent re-installs of the base operating system.

The participants came in numbers, attended the event. Surprisingly for us, a lot of people did not use the half-an-hour duration and finished much earlier, even with negative questions. The event chief too had a moment of doubt, if we have prepared the questions easy. But looking at the instant results in the server and the high percentage of low marks taught the lesson that many people have come to the event to have fun and not to seriously compete or win.

Before we could ruminate on that philosophical thought, a participant had a problem. Her network cable went broke and she could not submit her quiz. I felt bad that I should have implemented auto-save for responses as soon as people make a choice. I intentionally avoided that to reduce load on the server. I was about to ask if the person could take the test from a different machine. But the inimitable event-head the presence of mind, to ask the participant to save the quiz on the same computer and that we will evaluate that offline. Antony did the scoring and that particular person turned out to be a topper. This particular event taught me a lot about presence of mind and how we should always plan for failure in computer systems, how ever thorough we test. The scalability as expected was never found to be a problem.

After the event is finished, our lab admin, Marshal joked that we should start a company with this quiz software, as we have done it as a generic survey software where questions can be added. We laughed at the suggestion and moved away. The event was successful. Some of the software developed by the committee for some other events were affected by the recurring virus problem. But I went and slept like a log on a temporary bed made of three office chairs, next to my classmate Saktheesh who was working on a closing video for the event.

The Present

The long story above is not to just narrate my/our work, but also to highlight how much approachable the programming / technology landscape has become. A quiz / questionnaire software can be implemented today (2015) in probably a few hours, thanks to the large number of frameworks (such as Rails, Django, etc.). In fact, most of the tutorials have better code that you can merely copy/paste than what we have implemented a decade ago. The most striking thing today, however, is not the story of coding, but the story of deployment.

Anyone with an internet connection, a basic course on programming and decent googling skills can program any service easily today. What is even more fascinating is that such a software can be very easily deployed on the internet, served to the whole of the world, complete with a domain name, auto-scaling, DoS prevention etc. in just a few clicks. This is all made possible through Amazon Web Services. There are other players like Google, Heroku etc. but it is AWS that is way ahead of any other players and provide more services. The reach of AWS is what made me choose the title of this blog post.

AWS has done more to spur the startup ecosystem. The social impact of AWS is much higher than what Google did for online Ads, Microsoft did for PCs. Disruptive companies like airbnb, slack, netflix (which was just an online video rental service 7 years ago) can exist today, only because their devops, installation and maintenance of machines could be outsourced to AWS. They could not have grown to such 800 hundred pound gorillas if the AWS infrastructure was not available, in such a short time. Sure, there are some companies like Uber, Whatsapp that do not use AWS, but they would not have got funded easily if not for the startup scenario, which was formed with AWS as the backbone.

The Future

I have been visiting various buildings in Bangalore trying to find an office space for Zenefits India, as I am the first engineer here. All the places have a Server Room, which is not used by any of the startups. Almost all the startups use a Mac for developer machine and have their deployment servers in AWS (or some public cloud). The office spaces of Bangalore have not caught on with the trend. We are hiring btw, so if you consider yourself an extremely good engineer and one of the best at what you do in your job, do apply.

Most of the new services offered by Amazon, such as Amazon Lambda, DynamoDB etc. and also things like Containerisation, have made development of scalable applications, easier. Developers need not worry about failover systems, HA system, clusters etc. any more. I wonder what kind of an impact this will have on the job market. I wonder how long it might take job positions like mysql admins, sysadmins, devops engineers, DBAs to become as old/obsolete as, say mainframe programmers are considered today (2015). Perhaps it may not be soon but it is very much possible soon. Ubiquitous applications like SAP, Office etc. are also now cloud first and it will only become more cloud focussed in the future.

I wonder how much of system software research will be affected in the long term. Many of the modern day young bright minds (students from prestigious colleges and universities) are working in webapps, joining startups and doing their own companies, instead of working on projects with high entry barriers like the Linux Kernel, LLVM etc. (at least in India).  Perhaps, we would have started the quiz project that we did as a company (somewhat like surveymonkey) if we had enough exposure then. I may not have done that but some students smart with a business acumen, would have.

There are very interesting research problems in distributed systems that include both Databases and OSes. Most of the present day systems are just distributed systems constructed over Linux / POSIX systems. However, there is a potential for a DOSIX (along the lines of POSIX) API purely designed for large-scale, cross-geo distributed systems. It will be interesting to see what kind of research happens in this direction. In the recent past, We have a new distributed consensus algorithm Raft after decades of using Paxos. More such re-inventions are bound to happen soon, may be on novel things like non-blocking, distributed garbage collection etc.

a silhouette of a person's head and shoulders, used as a default avatar
a silhouette of a person's head and shoulders, used as a default avatar
darix posted at

FFI and Requires

FFI is a method to interface with native libraries, which is becoming more and more popular in many scripting languages. Unlike with native extensions though, we have nothing that links the shared library. As such our requires generator for shared libraries doesn’t kick in and we get no requires on the shared library package.

To make matters worse with the shared library policy the soversion is dependent on against which distro you build against.

a silhouette of a person's head and shoulders, used as a default avatar

Linux Presentation Day + Leap 42.1 release party in Munich

On Saturday we had the openSUSE Leap 42.1 release party in Munich, which I announced a couple of days ago. We had around 20 participants there: about 10 openSUSE users and also about 10 GNU/Linux users from the Linux Presentation Day – people that just started using Free Software and wanted to know more about openSUSE, GNU project, Open Source in general and of course celebrate with us the new release 🙂

But at the beginning I had no idea where we can meet in Munich. On Wednesday I asked in our German ML about location and Marcus advised Linux Presentation Day. Two minutes later I sent email to Linux Presentation Day event’s organizers and asked about separate room with beamer and power sockets. We got everything what we asked about. Thanks a lot for collaboration!

After that, on Friday (when I was sure about location and room was reserved for us) I come to Nuremberg to take openSUSE promotion material like USB flash sticks, DVDs, stickers, green “Leap” T-shirts and openSUSE beer. It’s not so far away from Munich. I think, about half of eighth I was at SUSE Office and Richard gave all “release party stuff” (last time, when I organized openSUSE 12.1 release party in Göttingen, I got all these stuff via post, with the exception of beer of course).

I had a talk about openSUSE project in general: the talk was targeted primarily for those who never heard about OBS, Leap or openQA. I tried emphasized the role of the community in openSUSE project.
I got many questions about systemd, SUSE impact on the openSUSE and quality of the “Enterprise Core” part which will be used in the Leap. I enjoyed talking with many that showed up and received as main feedback from many of those that I talked with.
If you’re going to invite “everybody” to your release party, you don’t need to talk so much about infrastructure or development model of openSUSE, I guess. That’s important and interesting for developers and Free Software evangelists maybe, but not for users, who are still not sure about contributing. For such users it’s more important how good this version as a desktop system than how easy to use submit request in OBS or which programming language should they use for implementation of tests for openQA or something like this.

By the way, at Linux Presentation Day we met one journalist from linux-user.de. So, I think my post will not be the only one about this event 🙂

I want to thank Richard and Doug for openSUSE stuff, Linux Presentation Day organizers for hosting us in the VHS building and… thanks to all who joined us! See you next time and have a lot of fun 🙂

more photos.

the avatar of Klaas Freitag

ownCloud Chunking NG Part 3: Incremental Syncing

This is the third and final part of a little blog series about a new chunking algorithm that we discussed in ownCloud. You might be interested to read the first two parts ownCloud Chunking NG and Announcing an Upload as well.

This part makes a couple of ideas how the new chunking could be useful with a future feature of incremental sync (also called delta sync) in ownCloud.

In preparartion of delta sync the server could provide another new WebDAV route: remote.php/dav/blocks.

For each file, remote.php/dav/blocks/file-id exists as long as the server has valid checksums for blocks of the file which is identified by its unique file id.

A successful reply to remote.php/dav/blocks/file-id returns an JSON formatted data block with byte ranges and the respective checksums (and the checksum type) over the data blocks for the file. The client can use that information to calculate the blocks of data that has changed and thus needs to be uploaded.

If a file was changed on the server and as a result the checksums are not longer valid, access to remote.php/blocks/file-id is returning the 404 “not found” return code. The client needs to be able to handle missing checksum information at any time.

The server gets the checksums of file blocks along the upload of the chunks from the client. There is no obligation of the server to calculate the checksums of data blocks that came in other than through the clients, yet it can if there is capacity.

To implement incremental sync, the following high level processing could be implemented:

  1. The client downloads the blocklist of the file: GET remote.php/dav/blocks/file-id
  2. If GET succeeded: Client computes the local blocklist and computes changes
  3. If GET failed: All blocks of the file have to be uploaded.
  4. Client sends request MKCOL /uploads/transfer-id as described in an earlier part of the blog.
  5. For blocks that have changed: PUT data to /uploads/transfer-id/part-no
  6. For blocks that have NOT changed: COPY /blocks/file-id/block-no /uploads/transfer-id/part-no
  7. If all blocks are handled by either being uploaded or copied: Client sends MOVE /uploads/transfer-id /path/to/target-file to finalize the upload.

This would be an extension to the previously described upload of complete files. The PROPFIND semantic on /uploads/transfer-id remains valid.

Depending on the amount of not changed blocks, this could be a dramatic cut for the data that have to be uploaded. More information has to be collected to find out how much that is.

Note that this is still in the idea- and to-be-discussed state, and not yet an agreed specification for a new chunking algorithm.

Please, as usual, share your feedback with us!

a silhouette of a person's head and shoulders, used as a default avatar

openSUSE 42.1 Leap :: Release Party in Munich

openSUSE 42.1 Leap was released about week ago and it is looking good. Now we have community enterprise system. I would like to thank everyone who contribute to openSUSE project and help to make it better.

Of course, we should have openSUSE release party! openSUSE community haven’t had release parties in Munich for a while (since I live in Munich I think we never had it here).

So, what is release party about? Well… like usual: Linux geeks meet together, speak about features in new openSUSE version, news in Free Software world, drink beer and… of course have a lot of fun 😉

A few days ago I started discussion about release party with Linux Presentation Day organizers and it seems that problem with location is solved now. We will get small meeting room with power sockets and beamer there. That is exactly what we need. I also asked Doug and Robert about some “promotional material”, openSUSE beer and TShirts. Tomorrow (Friday) I’m going to go to SUSE office in Nuremberg to take it (beer can not be trusted to anybody).

Do you want be a part of it?
* November 14, Saturday
* I start my presentation at 12:00 AM. I’m going to talk (presentation) about OBS, Leap and openSUSE project in general.
* vhs-Zentrum, Münchner Str. 72, Eingang rechts, 85774 Unterföhring
* Don’t forget to bring your good mood and friends 😉

Everybody are very welcome! If you have any questions about openSUSE, GNU project or Free Software, feel free to come and ask.

the avatar of Martin Vidner

Git: Single Line History

You get a bug report from a user:
/usr/lib/foo/bar.rb:432:in `doit': undefined method `[]' for nil:NilClass (NoMethodError)
but in bar.rb at the line 432 there are no square brackets. The user must be using an older version of the script. Can we find out which one without asking them?

Git can help. This code will go back in history and show the line how it appeared during the past. It's a history of a single line, kind of like "git blame" but in a different dimension.

FILE=lib/foo/bar.rb
LINE=432
git log --format=format:%H $FILE \
| while read COMMIT_ID; do
    echo -n $COMMIT_ID:$FILE:$LINE:
    git show $COMMIT_ID:$FILE | sed -n "$LINE{p;q}"
  done \
| less 

Have I reinvented the wheel? What is its name?

a silhouette of a person's head and shoulders, used as a default avatar
the avatar of Martin Vidner

Arabic Text Bugfix

Can you spot the difference?

Before:
 After:
If this rings a bell but you can't quite remember why, here's an English version of the screen, and the spoiler for the puzzle is below it:
Spoiler: The line containing "passwd" is clipped at the (left) end, showing only "المحا" instead of "المحلي۔". This bug got popular in the YaST team because the localization testers dutifully reported every instance of a truncated label so the bug accumulated 22 duplicates. It only happened for the Arabic script which made it a bit more challenging to work with, but luckily I know the script and a few words.

Thanks to Max Lin who pointed me to a problem between the Qt UI library and the HarfBuzz text shaping engine, the problem is now fixed.

the avatar of Bruno Friedmann

Proprietary AMD/ATI Catalyst fglrx rpms released for LEAP 42.1

Since the last few months, we all know that the new openSUSE Leap 42.1 is on its road.

But fglrx drivers were missing. Even with the 15.9 release in September.

Warnings

There’s really no warranties the drivers will work, for you!

If you are satisfied with the open-source radeon drivers, don’t risk to break your computer

All the trouble present in 15.9 will be there, like the failing gnome3 gdm start, see previous article from Sebastian, his scripts also available on the raw-src directory on the mirror, allow you to apply a quirk patch.

I’m considering the release of thoses rpms as experimental, they work for some, and sometimes are convenient. But they can also create kernel segfault on some configurations.
If you are in trouble start your openSUSE in rescue mode with nomodeset on boot line, and then zypper rm fglrx related packages, reboot and you should safely return to free radeon.

Story

Today, while packing my stuff for the SUSECON15 in Amsterdam, I was pleased on irc to have feedback of users
who were able to run fglrx Tumbleweed packages on their Leap 42.1

I’ve then start a Leap vm and hack a bit Sebastian Siebert’s script for 15.9 to add support for Leap.
The drivers build, and install correctly. I’ve also updated the one-click installer for people using this
technology.

Leap being available only for x86_64 bit plateform, the driver follow the same available arch.

Links to the new repository openSUSE_Leap_42

Have fun!

the avatar of Bruno Friedmann

Cleanup on OBS – Bacula packages to adopt

I was one of the creator and maintainers of bacula packages on obs (Story started 4 years ago).
Since then (+3 years) I’m using another tool called Bareos, and have no more interest
nor time to maintain those packages.

Since sometimes, bacula project has released two main major version. (7.0 and 7.2).
Nobody has taken care of the packages available on obs Archiving:Backup, nor have
proposed an update. [1]

Those packages have never been submitted to Factory, and proposed to any released openSUSE version.
From one of the last upstream announcement Bacula project will deliver directly prebuild packages for major distributions.

So if you’re interested to take ownership of those, raise your hands now (ask maintainer status with obs interface).
I will let a grace period of one month before sending a delete request.

Have fun!