Pineapple Team' Post

Offloading To Workers – A Hands-On Example

Services offload their computationally expensive tasks into workers. Think of software that converts video from its original format to a web standard. This kind of job can be considered long-running, even for state-of-the-art hardware. The web app can’t convert the video, it doesn’t have access to the software and, even if it did, we’d have little control over what ends up on our servers. The service used by the app could convert the video, but it would take valuable processing time shifting though millions of requests.

Read More

The Callback Syndrome In Node.js

When starting out in event-driven programming, you often find yourself amazed at how it works. It is pretty much what it feels like when you discover loops or conditional statements. As you progress, it becomes obvious that the overuse of the new paradigm will most likely prevent anyone else from successfully going through your code. This article dissects the problem of asynchronous control flow in JavaScript and suggests a simple solution using closures.

Read More

Dynamic Methods in Static-Typed Languages

One of the great benefits of dynamic-typed languages is that they are able to add functionality to an object on run-time. For example, you can create an object and then add functions to it, giving it the desired behavior, without a complex inheritance structure. Moreover, when calling the object’s methods, the client can determine whether the object supports a certain operation or not.

Static-typed languages do not come with this advantage. Creating objects that share some behavior can be done by inheritance, yet this restricts the combinations of behaviors an object can have (unless it relies on multiple-inheritance, which has some tricky effects).

Read More

Learning Through Exposure – It Started with an Internship

It’s a commonly accepted fact that in order to succeed in something, you have to surround yourself with people and ideas that push you in the right direction. To that effect, I want to make it clear that, when you become a 4PSA Clouder, nothing can stop you from becoming the next rock star in software.

The Early Years

When I started writing code for a living, everything seemed freakishly complex. Why? Because there was no one around to guide me through the rough terrain of learning different APIs at once, to point out the mistakes in my design, and offer advice on how to code better and faster.

Read More

REST Best Practices: Managing Concurrent Updates

In a previous article, we described how to choose a HTTP method when implementing operations that affect resources. Today, we are going to explain how to implement services that manage concurrent operations on a resource and how clients should use such services.

The Problem

Sometimes, Apps must handle concurrent updates on a resource. Just imagine an application that acts like a Wiki, where users read, write, and edit articles.

Read More

REST Best Practices: Choosing HTTP Methods

We do a lot of REST in the Pineapple team. We love REST. Why? There are many reasons:

  • It is standard, so that creating services always follows a pattern
  • Developing clients is super easy, in all programming languages
  • Programmers can easily understand it
  • Testing (of all types) can be easily automated
  • Because it relies on HTTP, it’s highly scalable infrastructure wise
  • We can choose the preferred data format for sending and receiving information – usually JSON 🙂

Read More