A little bit of knowledge and ranting

This and That

Thanks Jono

| Comments

Thanks, Jono, for being this awesome Community Manager of Canonical/Ubuntu.

EoM

Dealing With Disrespect - a Review

| Comments

Normally I don’t write book reviews, but this time I have to, because it hit me personally.

As most of you should already know, Jono Bacon released another Book with the title ‘Dealing with Disrespect’ I don’t know if the review is being allowed by Amazon, so I publish it here as well:


Review

“Dealing with Disrespect”

by Jono Bacon

First of all a full disclosure:

The Author, Jono Bacon, is a long standing colleague of mine, while working on the Ubuntu project. I am not, in any way, affiliated with his employer (Canonical), and sometimes (not all the times) I really don’t share his views and/or opinions.

Personal, I see him as a friend, not a close one, but more like ‘Brothers in Arms’. We share the passion of OpenSource and we do like Ubuntu OS, Heavy Metal and Pints of Beer. And especially we like to be a Dad of the most adorable and awesome Sons, we ever wished for.

I owe him a lot, because he (and some other community members, but he in particular) pulled me back into the Ubuntu Business a couple of years ago, and I am very thankful for this.

When Jono revealed his new writing 2 days ago, I started directly to read it, because, believe me or not, I was wondering if he was refering to me to some extend, because I can be exact the same guy who he pictures in his latest book. The disrespectful, the ranting and rambling guy, the angry ‘OpenSource’ guy, who sits too many hours per day in front of the computer, and reads a lot of nonsense from people who think they are the smartest guys on this planet.

Someone, who is passionate, angry and full of ramblings when it comes to some positions in our technical world, and sometimes speaks up, too loud.

Thankfully, he chose other examples, but I found myself in his book, which is not really charming.

Well, honestly, Jono hit ‘Bulls Eye’ with his detailed description, between the various aspects of how to read the different comments, responses or posts in our technical world.

His statement

"The trick here is to determine the attributes of the sender and the context."
(PDF, Page 8, 'Dealing with Disrespect')

is the essential message (he extends this later to the four important ‘ingredients’ sender, content, tone, context).

Old Internet people like me, who still know the ‘UseNet’, we know how hard this can be. How many times, we read UseNet Posts, which were in our eyes and ears unacceptable, bollocks or insane, and we hit the ‘Reply’ button in our Newsreader and flamed this poor guy, we didn’t even know personally.

In these days, we never thought about the other guy, we just flamed, we insulted on a very personal level, but, believe me or not, it also came back, like a boomerang, and it really escalated. But these were those days, we all had leather as skin, and we could swallow a lot.

Today, world has changed, especially we don’t use the UseNet so often anymore, and our ‘ramblings’ can be found on Weblogs and in the ‘Comment’ section of those or on Web-Forums. What and how we are saying, writing, commenting nowadays is more publicly exposed than 20 years back. The people got softer, we are trying to be more friendly to each other, we are using mostly a conjugation of the word ‘Good’, even to say, that something was really bad.

What was missing all the time, was a guide, on how to deal with those, who are not ‘nice’, who are not socially well conditioned, people who don’t speak the political correct english/language of choice.

Until now.

Now, Jono wrote exactly this missing guide. On how to deal with those people. And Jono just didn’t write about it, he has the experience, working as ‘The Community Manager’ of Ubuntu. He already dealt with those. He knows what he is/was writing about

And he knows, that not all of these people are anti-social, hateful or disrespectful.

Many of those people are smart, and in real life really friendly people. It just needs some experience to deal with them, and Jono gave us now the right guide to learn from it.

I really beg you, to read this little guide of Jono, because you can learn from it. If you are Community Manager, or you have to deal with a very loud community, or even when you are the rambling guy. It’s worth a read. A lot to learn and to understand.

This book finally tries to solve issues, which can’t be fixed technically.

And thanks to Jono, I hope it will make the technical messsed up world a little more enjoyable.

Thanks for Ubuntu 14.04 LTS

| Comments

So at last it’s here. Ubuntu 14.04 LTS

And I have to say ‘Thank you’ for pushing this out.

I am running Trusty Tahr for a long time now, while it was still in development on my workstation. And it’s one of the best releases so far.

Even during development only some glitches were encountered, but were easily workarounded, and this is actually pretty amazing.

When you followed Ubuntu for some years now (and to some extend also invovled in pushing software to it), you know that this wasn’t always the case.

We had a couple of really serious hickups, but this release was very handsome. I think Canonicals push towards automated QA and the upload pocket behaviour change were the right things to do.

Thanks Guys, for delivering this amazing release. You really can celebrate and drink a lot of booze and have a good meal (well, now that Jono is the definitive Ubuntu Smoker King, he could serve some delicious pulled pork or whatever he is able to smoke ;))

Again, thank you, you all know who you are. You guys are amazing. Rock On!

Network Engineers, We Are Looking for You!

| Comments

PlayStation now

So, we have a Datacenter Engineer Position open, and also a Network Engineer Position.

And as pre-requisite, you should be able to travel through Europe without any issues, you should read/write/speak English, next to your native language.

When you

  • are comfortable to travel
  • are familiar with routers and switches of different vendors
  • know that bonding slaves don’t need a safe word
  • know that BGP is no medical condition
  • know how to crimp CAT 5/6/7
  • know the differences between the different types of LWL cable connections
  • have fun working with the smartest guys in this business
  • want to even learn something new
  • love games
  • love streaming
  • love PlayStation (well, this is not a must)

Still with me?

You will work out of our Berlin Office, which is in the Heart of Berlin.

You will work directly with our Southern California Based Network Engineering Team, with our Datacenter Team and with our SRE Team.

The Berlin team is a team of several nationalities, which combines the awesomeness of Spanish, Italian, French and German Minds. We all love good food and drinks, good jokes, awesome movies, and we all love to work in the hottest datacenter environments ever.

Is this something for you?

If so, you should apply now.

And applying for this job is easy as provision a Cisco Nexus router today.

Two ways:

  1. You point your browser to our LinkedIn Page and press ‘Apply Now. (Please refer to me, and where you read this post)
  2. Or you send your CV directly through the usual channels to me (PDF or ASCII with a Profile Picture attached) and I put you on top of the stack.

Hope to see you soon and welcome you as part of our Sony/Gaikai Family in Berlin

I know some people are afraid of LinkedIn so here is the official job description from our HR Department.

Job Description:

As a Network Engineer with deployment focus you will be responsible for rollout logistics, network deployment process and execution. You will work closely with remote Network Engineers and Datacenter Operations to turn up, configure, test and deliver Network platforms across POPs and Datacenters.

Principle Duties / Responsibilities:

  • Responsible for rollout logistics and coordination
  • Responsible for network deployment processes
  • Responsible for network deployment execution
  • Deployment and provisioning of Transport, Routing and Switching platforms

Required Knowledge / Skills:

  • Comfortable with travel
  • Comfortable with optical transport, DWDM
  • Comfortable with various network operating systems
  • Comfortable with some network testing equipment
  • Comfortable with structured cabling
  • Comfortable with interface and chassis diagnostics
  • Comfortable with basic power estimation and calculation

Desired Skills and Experience

Requirements:

  • BA degree or equivalent experience
  • 1-3 years working in a production datacenter environment
  • Experience with asset management and reporting
  • Knowledge of various vendor RMA processes to deal with repairs and returns

  • Keen understanding of data center operations, maintenance and technical requirements including replacement of components such as hard drives, RAM, CPUs, motherboards and power supplies.

  • Understanding of the importance of Change Management in an online production environment
  • High energy and an intense desire to positively impact the business
  • Ability to rack equipment up to 50 lbs unassisted

  • High aptitude for technology

  • Highly refined organizational skills
  • Strong interpersonal and communication skills and the ability to work collaboratively
  • Ability to manage multiple tasks at one time

Up to 50% travel required with this position.

We Are Hiring

| Comments

PlayStation now

Normally I don’t write this type of post, but I know what’s coming up here, and we need people.

As long as you have a European Passport and/or a Visa which entitles you to travel across Europe without issues, you are already interesting.

You are even more interesting when

  • you like working in a fast paced environment
  • you like working with Hardware
  • you are not afraid of moving several hundreds of racks (yes, racks, not servers) of baremetal
  • you like working in an environment where OpenSource is one of the main drivers
  • you like working with a the smartest people in our business
  • you like automation
  • you like being in a Datacenter
  • you like gaming
  • you like streaming
  • you like traveling
  • you read/write/speak English (technically and socially)
  • you like Sony PlayStation (oh well, that’s a plus but not a must ;))
  • you are not afraid

If most of this applies to you, we want to hear from you.

You’ll work from Berlin, Germanies Capital. Our office is in the Heart of Berlin, one of the nicest places in this City.

We are a team of French, Italian, Spanish and German People.

You’ll work closely with the US Southern California Based team and as well with the EU SRE Team.

If you think you are the right person, what are you waiting for?

Applying for this job is easy as installing Ubuntu.

Two ways to apply:

  1. You apply for the job on our LinkedIn Page and refer to Me (Stephan Adig) (you can also mention where you read this post)
  2. Or you send me an email with all your details and your CV (PDF or ASCII and Picture Attached) and I’ll put you in top of the stack.

Anyways, I know some people are scared of LinkedIn so here is the official job description from our HR Department:

Data Center Operations Engineer

Job description

Gaikai (外海?, lit. “open sea”, i.e. an expansive outdoor space) is a company which provides technology for the streaming of high-end video games.[2] Founded in 2008, it was acquired by Sony Computer Entertainment in 2012. Its technology has multiple applications, including in-home streaming over a local wired or wireless network (as in Remote Play between the PlayStation 4 and PlayStation Vita), as well as cloud-based gaming where video games are rendered on remote servers and delivered to end users via internet streaming (such as the PlayStation Now game streaming service.[3]) As a startup, before its acquisition by Sony, the company announced many partners using the technology from 2010 through 2012 including game publishers, web portals, retailers and consumer electronics manufacturers

Gaikai is looking for a talented Data Center Operations Engineer to be based in our Berlin office. This position is for an experienced candidate who will work within the Data Center Operations team and have hands on responsibility for ensuring our production datacenter environments are operating efficiently. This position will work closely with the System Engineering and Network Operations teams and provide hands on support for them. The primary responsibility of this job role is to rack and cable new hardware, upgrade existing servers and network equipment and keep accurate inventory information for all systems. You will also be responsible for assisting in the development of processes and procedures related hardware deployment, upgrades and break/fix issues. Key Responsibilities:

  • Support existing hardware in multiple datacenter locations
  • Plan and execute installations in multiple datacenter locations in a timely manner
  • Ensure accurate inventory information for multiple datacenter locations
  • Work closely with Data Center Operations team to track orders and deliveries to multiple datacenter locations
  • Work with the Director of Data Center Operations on datacenter status reports for Senior Management for each datacenter location
  • Refine and document support process for each location including the handling of RMA requests

Desired Skills and Experience

Requirements:

  • BA degree or equivalent experience
  • 1-3 years working in a production datacenter environment
  • Experience with asset management and reporting
  • Knowledge of various vendor RMA processes to deal with repairs and returns
  • Keen understanding of data center operations, maintenance and technical requirements including replacement of components such as hard drives, RAM, CPUs, motherboards and power supplies.
  • Understanding of the importance of Change Management in an online production environment
  • High energy and an intense desire to positively impact the business
  • Ability to rack equipment up to 50 lbs unassisted
  • High aptitude for technology
  • Highly refined organizational skills
  • Strong interpersonal and communication skills and the ability to work collaboratively
  • Ability to manage multiple tasks at one time

Up to 50% travel required with this position.

A Great Loss

With surprise I read Marks article when I woke up last Friday. And surely I was shocked.

It makes me sad to see Upstart being abandoned (at least for Ubuntu) and that we are forced to use systemd after 14.04 LTS.

It took me a while to swallow this, and this post is a try to express my concerns. This can be controversial for some people, so if you are not in the mood of reading a controversial post, please stop here and press the ‘Back’ button of your browser or scroll up or down.

Business

Don’t get me wrong, I appreciate the work of all contributors of systemd, but I fear right now we are depending on one single entity named RH. Just because they are paying the main drivers of systemd.

So, what happens when you remove one important part of a nicely build machine? … It will break.

This can happen to systemd as well.

Honestly, I don’t want to disgrace the committers and contributors to systemd, but I have the feeling, that the main drivers of this project did build up a great knowledge of all the needed parts of a working Linux boot up process.

Removing this knowledge slows down the process of development and improvements.

RH is a business driven company, so if it doesn’t make sense (anymore) for RH to invest into a certain project, dedicating some expensive human resources, then they will remove those assets and/or money investments. Means, removing the main drivers.

So what happens than?

Especially now, in the “OpenSource” business, we have at least 3 competitors, and at least 2 of them are fighting for “World Domination”.

And we already know, that sometimes the collaboration between two commercial entities can be pretty cumbersome, especially when their business models are diverting/clashing and/or their ideas and visions are not really aligning.

I am asking myself:

  • How can we make sure, that a crucial part of a distro is not in the hands of one commercial entity?
  • How can we make sure, that systemd will be a project, which is not depending on only one company?

Moving the whole systemd project (and all payed human resources involved) into a non-profit organization would make sense to me. Companies can become Members of this non-profit, can invest money into this entity, the non-profit can pay human resources, and the people working for the non-profit will deliver the software we all need.

People working for this non-profit are not allowed to work directly with the members, they need to be independent. The board of the non-profit can receive ideas and wishlists from members, and use those ideas/improvements as backlog list for the project.

Does this sound insane? Or could it be a way to “streamline” the collaboration process between all parties?

What about the other (non-commercial) distros out there?

So, let’s say Fedora, RHEL 7, SuSE, Debian and Ubuntu are all using systemd.

Most likely all derivatives of those distros will use systemd as well.

But what about distros like Gentoo? Right now, Gentoo is using OpenRC as their main init system. And from my experience during the last weeks, when I dived back into Gentoo, it’s a real cumbersome process substituting OpenRC with systemd (mostly when you want to run a gnome 3 desktop, and you already have a running system).

For me, it would make sense when Gentoo is also changing their init system to systemd, to be more streamlined with the other major distros. But really, it needs to be discussed and a decision needs to be made. But this time, it shouldn’t be handled like the discussion we saw in Debian-land.

I know there is already a debate going on inside the Gentoo Community, but to make my point here, while OpenRC is a good and reliable init system, Gentoo should know now, that they are also losing a battle. Gnome 3 as as desktop depends on some parts of systemd, and breaking all those parts into separate projects, doesn’t make sense anymore, because the majority of the mainstream distros decided to go with systemd.

I think this is true for all the other distros out there which are not really backed by commercial sponsors.

The future…

Now, most mainstream distros are running/will run systemd as their main init system.

With this in mind, there is now a monopoly of one project, which is mainly backed by one commercial entity. A project which is one of the important parts of a running Linux System.

My fear is that this monopoly will be used (one way or the other) to hurt other distros which are not under the roof of this commercial entity. Especially those distros which are under another roof of another commercial entity.

The idea of moving this project into a separate non-profit organization would make sense, to prevent this from happening.

Right, it could just be me who thinks like this, it could be that I already saw so many barking dogs biting, while the society says, barking dogs don’t bite.

But honestly, for me this situation feels wrong.

Going to SCaLE 2014

| Comments

I finally made it.

SCaLE 12x

  • Hotel: Hilton Los Angeles Airport
  • Event: SCaLE 12x, Los Angeles
  • Arrival Date: 2014-02-20 Around 8pm PST
  • Departure Date: 2014-02-22 whenever I have to be at the Airport for travelling back to Germany

I know some people from the Ubuntu world are already at the location, so if you want to go out for a drink, and discuss some things, please let me know through the usual channels.

I am really looking forward to listen to Elizabeths talk and eventually talk to her later about some SysAdmin businesses.

Also Cloudstack people are around, most prominently also from my former employer Citrix Online. So, I think there is an opportunity to socialize a lot.

Furthermore, if you are interested in working as an SRE somewhere in OC, CA or looking for an opportunity to work in Germany, like Berlin, please let me know. I know some good places ;) Much better if you have your CV and contact details at hand.

See you at SCaLE 12x in Los Angeles.

It Never Rains in Southern California…

| Comments

… totally not true

but what is true…

Work Life Balance

is that I am here for one month already and I am totally excited.

As mentioned in one of my last posts, I am working now for Sony Europe, especially for a company which was aquired by Sony. We are working closely with the Sony Playstation Team.

And Guys, it’s a blast.

I would really like to write something about what we are doing, and especially how we are doing it, but sadly I would kick my own ass out of this adventure, so I won’t reveal anything.

What I can say is this:

This month was full of new experiences. A very different approach to our discipline. And somehow I am feeling at home.

Our people here are very enthusiastic about their product, you can see that every day. The proudness, focus and knowledge is special here.

The work environment is more than awesome. Yes, StartUp feeling, for sure, but that is not it.

People are discussing new ideas, and how we can approach challenges in a very different way. Different from the traditional SysAdmin approach.

Being an SRE here means, not only knowing your system and being able to fix stuff in the SysAdmin way, but also to improve the overall quality of the system, which also means, that we are coding a lot of tools by ourselves to improve our work, reporting quality drops to other departments and debugging issues in third party software.

Furthermore, the bond between SRE and Development/Engineering is very tight. Means, whichever bug SRE finds, in OS, third party software stacks or in-house developed software, we will fix them ourselves, or we will report our findings directly to Development/Engineering (of course via bugtracker :))

The answers are coming fast, and the bugfixes, too. Faster than I was expecting.

That brings me to my next surprise. I never saw so many people working with Linux on a Workstation. This is really surprising. Don’t get me wrong, you’ll find here a lot of different computers and OSes, mostly Apple MacBooks and other types of Laptops, mostly dual booting, but at least every SRE and Developer has a Workstation with Linux running on it. Pretty awesome.

Yes, the vast amount of OpenSource Software here is incredible and surprising.

Anyways, I am so excited, and I am proud to work on this project. It will be a success, I have no doubts.

One last statement, what we are doing here, is revolutionary. It will change the way of todays Gaming experience, believe me. I am already dogfooding and even when I am more a casual gamer, I am impressed about the quality.

So, when you are into Gaming, look out for announcements from Sony in 2014.

OpenSource

Python Sphinx Logo

And there is still time to do some other things. Like fixing Python code for the Python Sphinx Contrib Project.

While working on a Python Project inhouse, I needed to use the sphinxcontrib-httpdomain module, sadly it wasn’t Python3 compatible.

Until 2 days ago :)

I worked on changing this, but without looking at some Python Helpers, which would have made the work more easy. After filing the pull-request, Upstream said thanks, but I should have a look at python-six, a Python Library which makes the transition a lot more easier than manual coding.

I did that, and ported the fixes to python-six and commited the changes and updated the pull-request. Upstream merged after 5 minutes, and my changes will be in the next release of sphinxcontrib-httpdomain.

OpenSSH Logo

Well, this is really special. We are using OpenSSH with Roumen Petrovs X.509 Patch. Sadly, this patch is not applied to the OpenSSH packages of most distributions. Neither Ubuntu, Debian or Fedora are carrying this patch in their repos.

So I am working on a sane solution for this and resolving this bug in Launchpad.

And to make things even more smooth for our Friends from Fedora, I am working on an RPM package for the same OpenSSH package as well.

Bulls Eye

| Comments

While I was waiting for a Firewall Change today, I thought: “Dude, learn something new!”.

So, after playing around a lot with web APIs, web frameworks etc. I finally found Eve.

When God created Eve, Python was already there!

‘Eve’ is a python web framework, based on Flask, especially made for RESTful Webservices.

During the last years, I wrote a lot of WebAPIs, mostly XMLRPC based, but I also used Ruby On Rails for RESTFul Webservices. Honestly that was overload.

Back to ‘Eve’.

Eve is beautiful, easy, and simple to use.

Example:

Python Eve Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env python
 -*- coding: utf-8 -*-

import sys
from my_settings import SETTINGS

try:
    from eve import Eve
except ImportError as e:
    print(e)
    sys.exit(1)

if __name__ == '__main__':
    app = Eve(settings=SETTINGS)
    app.run()
my_settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# -*- coding: utf-8 -*-
"""
settings.py
"""

SETTINGS = {
    'MONGO_HOST': 'localhost',
    'MONGO_PORT': 27017,
    'MONGO_DBNAME': 'linkit',
    'API_VERSION': 'v1',
    "URL_PREFIX": 'api',
    "X_DOMAINS": '*',
    "X_HEADERS": '*',
    'DOMAIN': {'links': {
        'resource_methods': ['GET', 'POST'],
        'schema': {
            'link_title': {
                'type': 'string',
                'minlength': 1,
                'maxlength': 4096,
            },
            'link_url': {
                'type': 'string',
                'minlength': 1,
                'maxlength': 4096,
            }
        }
    }}
}

As you can see, most of the configuration is done in the my_settings.py file. It defines the mongodb server, the mongo database name, etc.

So if you run this script now, you can actually fire up curl, and get this result (I already have something in my DB):

example curl command
1
2
3
4
5
6
7
8
9
curl -i http://127.0.0.1:5000/api/v1/links
HTTP/1.0 200 OK
Content-Type: application/json
Content-Length: 4927
Last-Modified: Wed, 13 Nov 2013 16:15:14 GMT
Server: Eve/0.2-dev Werkzeug/0.9.4 Python/2.7.6
Date: Wed, 13 Nov 2013 16:43:46 GMT

{"_items": [{"link_title": "Hello 1", "updated": "Wed, 13 Nov 2013 11:52:43 GMT", "created": "Wed, 13 Nov 2013 11:52:43 GMT", "link_url": "http://www.heise.de/", "etag": "3be7ff5a33800231c01b3ae6a02a7c3ff4515d69", "_links": {"self": {"href": "/links/5283680b8322c7417749a956", "title": "Link"}}, "_id": "5283680b8322c7417749a956"}, {"link_title": "Hello 1", "updated": "Wed, 13 Nov 2013 11:55:31 GMT", "created": "Wed, 13 Nov 2013 11:55:31 GMT", "link_url": "http://www.heise.de/", "etag": "f53768d84db3c1ceaf5c786732fed0e24d280ea4", "_links": {"self": {"href": "/links/528368b38322c7417749a957", "title": "Link"}}, "_id": "528368b38322c7417749a957"}, {"link_title": "Hello 2", "updated": "Wed, 13 Nov 2013 11:55:31 GMT", "created": "Wed, 13 Nov 2013 11:55:31 GMT", "link_url": "http://www.golem.de/", "etag": "70ead6d313d11d189b64a1a9dd2aaf3832fa7e25", "_links": {"self": {"href": "/links/528368b38322c7417749a958", "title": "Link"}}, "_id": "528368b38322c7417749a958"}, {"link_title": "Hello 1", "updated": "Wed, 13 Nov 2013 11:55:37 GMT", "created": "Wed, 13 Nov 2013 11:55:37 GMT", "link_url": "http://www.heise.de/", "etag": "482120452fdabd99401f87d550f082972ad31d87", "_links": {"self": {"href": "/links/528368b98322c7417749a959", "title": "Link"}}, "_id": "528368b98322c7417749a959"}, {"link_title": "Hello 2", "updated": "Wed, 13 Nov 2013 11:55:37 GMT", "created": "Wed, 13 Nov 2013 11:55:37 GMT", "link_url": "http://www.golem.de/", "etag": "f214f062b087323298d19535589393e34e12e9ce", "_links": {"self": {"href": "/links/528368b98322c7417749a95a", "title": "Link"}}, "_id": "528368b98322c7417749a95a"}, {"link_title": "Hello 1", "updated": "Wed, 13 Nov 2013 16:14:13 GMT", "created": "Wed, 13 Nov 2013 16:14:13 GMT", "link_url": "http://www.heise.de/", "etag": "56efc32ed92388487a7b1d5e4c8f941fdc6ef3c9", "_links": {"self": {"href": "/links/5283a5558322c74a4eed3574", "title": "Link"}}, "_id": "5283a5558322c74a4eed3574"}, {"link_title": "Hello 2", "updated": "Wed, 13 Nov 2013 16:14:13 GMT", "created": "Wed, 13 Nov 2013 16:14:13 GMT", "link_url": "http://www.golem.de/", "etag": "31f9afd2bec13b5c8e2f0db65a99754b099e0efe", "_links": {"self": {"href": "/links/5283a5558322c74a4eed3575", "title": "Link"}}, "_id": "5283a5558322c74a4eed3575"}, {"link_title": "Hello 1", "updated": "Wed, 13 Nov 2013 16:14:14 GMT", "created": "Wed, 13 Nov 2013 16:14:14 GMT", "link_url": "http://www.heise.de/", "etag": "6c7d5e6fc1f96e7d80281753ccd9031c7e30ba6a", "_links": {"self": {"href": "/links/5283a5568322c74a4eed3576", "title": "Link"}}, "_id": "5283a5568322c74a4eed3576"}, {"link_title": "Hello 2", "updated": "Wed, 13 Nov 2013 16:14:14 GMT", "created": "Wed, 13 Nov 2013 16:14:14 GMT", "link_url": "http://www.golem.de/", "etag": "161fe88f36fbff8ec7e5e19f4c157320baee57fa", "_links": {"self": {"href": "/links/5283a5568322c74a4eed3577", "title": "Link"}}, "_id": "5283a5568322c74a4eed3577"}, {"link_title": "Hello 1", "updated": "Wed, 13 Nov 2013 16:14:14 GMT", "created": "Wed, 13 Nov 2013 16:14:14 GMT", "link_url": "http://www.heise.de/", "etag": "d125e1c1be58d65d8d8323740e0c3f1b0c83bb7d", "_links": {"self": {"href": "/links/5283a5568322c74a4eed3578", "title": "Link"}}, "_id": "5283a5568322c74a4eed3578"}, {"link_title": "Hello 2", "updated": "Wed, 13 Nov 2013 16:14:14 GMT", "created": "Wed, 13 Nov 2013 16:14:14 GMT", "link_url": "http://www.golem.de/", "etag": "664a0196b756a1806854747d2196e2b812ec6887", "_links": {"self": {"href": "/links/5283a5568322c74a4eed3579", "title": "Link"}}, "_id": "5283a5568322c74a4eed3579"}, {"link_title": "Hello 1", "updated": "Wed, 13 Nov 2013 16:14:56 GMT", "created": "Wed, 13 Nov 2013 16:14:56 GMT", "link_url": "http://www.heise.de/", "etag": "5cb3e7a05f87ff7e2fceeb47a499683077119999", "_links": {"self": {"href": "/links/5283a5808322c74a4eed357a", "title": "Link"}}, "_id": "5283a5808322c74a4eed357a"}, {"link_title": "Hello 2", "updated": "Wed, 13 Nov 2013 16:14:56 GMT", "created": "Wed, 13 Nov 2013 16:14:56 GMT", "link_url": "http://www.golem.de/", "etag": "ca978b6ebba3c7a3193466255b6768bbd5f1e60f", "_links": {"self": {"href": "/links/5283a5808322c74a4eed357b", "title": "Link"}}, "_id": "5283a5808322c74a4eed357b"}, {"link_title": "Hello 1", "updated": "Wed, 13 Nov 2013 16:15:14 GMT", "created": "Wed, 13 Nov 2013 16:15:14 GMT", "link_url": "http://www.heise.de/", "etag": "b32872de1fef61bb8ea8c002c8ca278e89656f0d", "_links": {"self": {"href": "/links/5283a5928322c74a4eed357c", "title": "Link"}}, "_id": "5283a5928322c74a4eed357c"}, {"link_title": "Hello Stephan T.", "updated": "Wed, 13 Nov 2013 16:15:14 GMT", "created": "Wed, 13 Nov 2013 16:15:14 GMT", "link_url": "http://www.golem.de/", "etag": "279cdfb01ed7a3e59a767f7e630c0a4c7455e9f8", "_links": {"self": {"href": "/links/5283a5928322c74a4eed357d", "title": "Link"}}, "_id": "5283a5928322c74a4eed357d"}], "_links": {"self": {"href": "/links", "title": "links"}, "parent": {"href": "/api/v1", "title": "home"}}}

Pretty simple, isn’t it? Right now, there are only two HTTP Verbs supported, GET and POST. GET for retrieving the collection of links and when you pass an ID to the URL, you only get one link document. POST for adding a document to the links collection.

You can do more, and Eve gives you a good amount of configuration options to secure your API.

But this was too simple, wasn’t it?

Now playing Dart(s)

Praise da Google Empire!

Google created Dart, a simple, but powerful new language for the Web. If you know C, C++, Java and JavaScript you are glad to hear, that Dart is really easy to learn.

So, given my Python Eve example above, let’s build a simple webpage, which displays the result inside your favorite browser.

First step will be to download your Dart Language Development Environment:

Head over to Dart: Get Started and download your favorite environemnt.

Now, start it and create a new application, name the application (for this example): LinkIt

You will see several folders with code. The most important part is under the web folder.

You will find three files:

  • linkit.css
  • linkit.html
  • linkit.dart

In my simple example, I am using Bootstrap 3 and JQuery as CSS/UI Framework. So get it and move bootstrap directories and files to the web folder.

You should have something like shown in the picture:

Dart IDE File View

Now, let’s work on the linkit.html first:

Replace the contents of the file with this code:

linkit.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8">
    <title>LinkIt</title>
    <link rel="stylesheet" href="linkit.css">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <style>
      BODY {
        margin-top: 60px;
      }
    </style>
  </head>
  <body>
    <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">Project name</a>
        </div>
        <div class="collapse navbar-collapse">
          <ul class="nav navbar-nav">
            <li class="active"><a href="#">Home</a></li>
            <li><a href="#about">About</a></li>
            <li><a href="#contact">Contact</a></li>
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </div>
    <div class="container">
      <div class="row">
        <div class="col-lg-12">
          <table class="table table-bordered" id="link-table">
            <thead>
              <tr>
                <th>Title</th>
                <th>URL</th>
              </tr>
            </thead>
          </table>
        </div>
      </div>
    </div>
    <script type="application/dart" src="linkit.dart"></script>
    <script src="packages/browser/dart.js"></script>
    <script src="js/jquery.js"></script>
    <script src="js/bootstrap.min.js"></script>
  </body>
</html>

This will create a simple menubar, adjust the top margin of the body, to show the container directly under the NavBar and includes all necessary stylesheets and javascripts and of course the dart script.

We will focus on the table element with its ID: ‘link-table’.

What we want:

  • catch the table element
  • create a table body element
  • add rows to the table body and
  • inside the row, add two cell elements.

Furthermore we want

  • Read the data from the python-eve backend, we created before,
  • convert the returned json data into Dart readable variable instances
  • output the result data in the cells.

Nothing is easier than that.

Switch to linkit.dart and replace the contents with this:

linkit.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import 'dart:html';
import 'dart:convert';

class LinkTable {
  TableElement linkTable;
  TableSectionElement linkTableBody;
  TableRowElement row;
  TableCellElement cell;

  LinkTable(var sel) {
    this.linkTable = query("#link-table");
    this.linkTableBody = linkTable.createTBody();
    this.readLinksData();
  }

  void readLinksData() {
    var xhr = new HttpRequest();
    xhr
    ..open('GET','http://127.0.0.1:5000/api/v1/links/')
    ..onLoadEnd.listen((e) => requestComplete(xhr))
    ..send('');
  }
  requestComplete(HttpRequest request) {
    Map parsedMap = JSON.decode(request.responseText);
    print(parsedMap['_items'].length);
    for (var item in parsedMap['_items']) {
      this.row=linkTableBody.addRow();
      this.cell = this.row.addCell();
      this.cell.text=item['link_title'];
      this.cell = this.row.addCell();
      this.cell.text=item['link_url'];
    }
  }
}


void main() {
  new LinkTable("#link-table");
}

I don’t want to comment this source, because it should be directly understandable.

Now, run this application, there will be a Chromium browser started, and you can see the result (hopefully you started the python eve backend first ;))

And if this is not enough for you, the good guys from AngularJS ported their awesome JavaScript framework to Dart.

You can find it Angular for Dart here.

Enjoy!!!

A New Gig

| Comments

Some of you already know about it, but others (who are not following me on FB or G+) don’t, so here is the news :

I’ll be leaving Citrix Online at the end of November 2013.

The reason why, I would like to spare here, but I’ll forward you to Matt Zimmermans article, and you get the point.

Anyhow, this is not the end of the world as we know it, because I already have a new gig, and with this new gig, a lot of life changes are coming along.

First, I’ll be joining Sony Europe, working for a subdivision named ‘Gaikai’.

Second, I’ll be moving from the Karlsruhe Area to Berlin, Germanies Capital, which is a real huge step for me.

But all in all I am very enthusiastic about it.

And for some of my U.S.A. peeps here, I’ll be in CA around the LA area from December 2013 to February 2014. If you have time and are interested in meeting up, let me know, you have my eMail Address.