What is Heroku and What is it Used For? Heroku’s simple setup makes it an ideal tool for limited budgets or businesses beginning to test opportunities in the cloud. Konstantin Rusev Java Developer What is Heroku? Heroku is a cloud service platform whose popularity has grown in recent years. Heroku is so easy to use that it’s a top choice for many development projects. With a special focus on supporting customer-focused apps, it enables simple application development and deployment. Since the Heroku platform manages hardware and servers, businesses that use Heroku are able to focus on perfecting their apps. And not the infrastructure that supports them. More time goes towards ensuring that users receive the highest quality experiences as possible. What Cloud Provider Should You Use? How does cloud development control expenses and reliably scale application delivery? When Do Businesses Decide to Use Heroku? Before one can fully appreciate the benefits of Heroku, it’s helpful to understand the larger story of cloud computing and where Heroku fits in. What is Cloud Computing All About? Cloud computing is an information technology paradigm. It’s a model for enabling ubiquitous access to shared pools of configurable resources, such as computer networks, servers, storage, applications, and services. Cloud services can be rapidly provisioned with minimal management effort on the business’s part. The cloud is an attractive option for businesses with a variety of needs. But the particularities of the business model and project needs will determine which cloud service provider they end up using. Where Heroku Fits into Cloud Computing Heroku, a Platform-as-as-Service solution, is generally easy-to-use. But it’s most beneficial to businesses in specific situations. Heroku has a free service model for small projects. Also, tiered service packages exist for cases where more complex business needs must be addressed. Understanding Service-Oriented Architectures Service-oriented architectures are the essence of cloud computing and can be separated by their purpose. The most noteworthy categories are Infrastructure-as-a-Service (IaaS), Platform-as-a-Service (PaaS) and Software-as-a-Service (SaaS). Infrastructure-as-a-Service IaaS architectures provide storage, networks, computing power, and other base computing resources where service users are able to deploy and run arbitrary software. The software can include Operating Systems (OS) and applications. In this model, users do not manage or control the underlying cloud infrastructure. Instead, they have control over operating systems, storage, deployed applications, and possibly some pieces of networking components. Examples of IaaS architectures include Amazon Web Services and Microsoft Azure. Platform-as-a-Service PaaS architectures typically include operating systems, programming-language execution environments, libraries, databases, web servers, and connectivity to some platforms. Users of PaaS services are able to deploy consumer-created or acquired applications onto the cloud infrastructure. Businesses using PaaS have control over the deployed applications, but have limited access to configuration settings for the application-hosting environment. They also have limited access to configuration settings of resources provided by the PaaS. The users do not manage or control the underlying cloud infrastructure including network, servers, operating systems or storage. Instead, their developers focus on managing the applications supported by the deployed platform. Google App Engine, Apache Stratos, and AWS Elastic Beanstalk are all examples of PaaS offerings, and each service eases developers’ work as they develop, test, and deploy their application. Software-as-a-Service SaaS services offer users use of the provider’s applications running on a cloud infrastructure. The applications are accessible from various client devices through either a client interface, such as a web browser, mobile applications, or a program interface. The users have limited access to application configuration settings in some cases. But they do not manage or control the underlying cloud infrastructure including network, servers, operating systems, storage, or even the application’s capabilities. The access to services in the group of SaaS is much more restricted than the access to PaaS or IaaS groups of services. Important examples of SaaS used by many businesses are HubSpot, Google Apps, and GoToMeeting. Why Budget-Conscious Businesses Favor the Cloud The advantages of these services include ability for easy scaling, accessing, management, integration, allocation, maintenance, and tariffing to name a few. Business leaders can easily evaluate their costs since many of the services are paid for on a monthly basis. That contributes to simple prediction of future costs when technical teams analyze, plan, and develop projects for clients. What is Heroku Used For? The Heroku cloud service platform is based on a managed container (called dynos within the Heroku paradigm) system. It has integrated data services and a powerful ecosystem for deploying and running modern applications. Heroku Accommodates Many Development Languages Heroku supports several programming languages that are used as a web application deployment model. As one of the first cloud platforms, Heroku has been in development since June 2007. Back then, it supported only the Ruby programming language. But now it also supports Java, Node.js, Scala, Clojure, Python, PHP, and Go. This means a variety of developers can look to Heroku for an inexpensive way to scale their application, no matter their preferred development language. Heroku Supports Diverse Solutions Heroku also provides custom buildpacks, where developers can deploy apps in any other programming language. For this reason, Heroku is a polyglot platform. It lets the developer build, run, and scale applications in a similar manner across all programming languages. Polymorphism and scalability are reasons why Heroku is often seen as a preferred platform amongst developers. Heroku Dynos Enable Easy Development and Better Usability Applications that are run on Heroku typically have unique domain names, which are used to route HTTP requests to the correct container. Applications as services use application containers. Containers are designed to package and run services. Each of the application containers is а smart container on a reliable, fully-managed runtime environment. Application containers — referred to as “dynos” in the context of the Heroku platform — are spread across a “dyno grid.” This consists of several servers. The Dyno manager maintains and operates the created dynos. All this means is that since Heroku manages and runs applications, there’s no need to manage operating systems or other internal system configurations. Heroku Lets Developers Scale Applications Instantly This is accomplished either by increasing the number of dynos or by changing the type of dyno in which the app runs. When the application can scale so easily, the user can always expect more speed when using that application. The simple way to scale applications makes working with Heroku easy and convenient. Projects created in Heroku are bound to repositories in GitHub. Heroku’s integration with GitHub provides automated builds and deploys of the latest version of code. GitHub is a trusted repository of source code, so Heroku’s integration with GitHub and other tools helps developers optimize their efforts and save stakeholders time and money over the course of development projects. Getting Started With Heroku Heroku provides very helpful and comprehensive tutorials and documentation. Inside Heroku’s GitHub repository, users are able to find examples in all programming languages that Heroku supports. Heroku provides analogous tutorials for every supported programming language. Regardless of the differences in commands, development environments, servers, behavior, and compilers, the results of the tutorials are the same. This shows the simplicity of accessing and making the most of Heroku’s capabilities. 4 Steps to Launch Your Heroku Solution By following the steps in the first tutorial, the developer will be able to use base commands to create, access, commit, deploy, and monitor an application. Authentication is required to allow both the Heroku and Git commands to operate. Log in using the email address and password you used when creating your Heroku account. heroku login The following three commands are required when creating a project using Heroku, adding the project into Git space, and opening the main web page of the deployed project. Heroku create Git push heroku master Heroku open These two commands present the opportunity to check and change the count of used dynos. Heroku ps Heroku ps:scale web=1 With this Heroku command you can access information about your app’s performance once it’s up and running. Heroku logs –tail These are only a few of the commands that help to get a project started. There is much more to discover in the general tutorials for Heroku. The first tutorial is simple yet powerful for those with limited skills and development budgets. Other examples of tutorials on Heroku’s website relate to projects with specific programming languages or groups of technologies. Clear and convenient examples provided by Heroku are very useful for the first steps on the platform. We used one of these examples to teach a group of high school students how to begin a Heroku-based project. Even though the students had no programming experience, they successfully learned how to deploy and run a “Hello, world” application with Heroku. This attests to just how accessible Heroku is. Comparing Heroku With Other PaaS Cloud Platforms Whether migrating to the cloud, storing files, or deploying software via the cloud, understanding how to make proper use of cloud computing services continues to dominate conversation in the IT industry. The following tables present some supported operating systems and pricing models for some of the more popular PaaS platforms like Heroku. You Can Run Linux OS on Heroku The table “Supported Operating Systems” shows three of the more well-known families of operating systems and provided support by the analyzed platforms. The Linux OS is supported by all PaaS platforms, because it is cheap and easy to set up. Windows OS created by Microsoft is in second place. MacOS is in third place and only Cloud Foundry PaaS supports it. Heroku supports one of the most popular operating systems and its leaders strive to evolve the platform alongside the Linux OS. The best development teams bear the applications and limitations of these tools in mind when they plan projects and select platforms for clients. Priced Packages vs Free Trials of Popular Cloud PaaS Applications Different PaaS platforms offer different price and service models depending on the business’s intended use and duration of its use of cloud services. Only the Cocaine cloud platform, which is created by Heroku’s founder Andrey Sibiryov, has totally free access. These free access tiers are usually only for small and test projects. These service models are very useful for the development process. They equip developers with the resources to easily produce a proof of concept for applications before pursuing full development. Clients can test their ideas using a free cloud platform before engaging the teams and resources required by a fully-formed solution. Watch Out for These Issues in Heroku Cloud While working with Heroku, developers may encounter some platform specific issues. Two examples are listed below. The Dynos Sessions The same dynos (a collection of lightweight Linux containers) that provide the environments in which to develop and deploy Heroku applications can cause developers some headaches. Each container is completely independent of the others. A container is unaware of the existence of sessions running in other containers. If an application has a session and a specific user is authenticated, then each user request will be sent to the specific container for the application usually in a “Round-robin” fashion. That means a container and the users who used it do not know about the existence of other containers. When a subsequent request arrives from the user, then the request is sent to one of the containers. If the request is sent to a container that does not participate in the communication with the customer, then this container cannot process the message. One of the possible solutions is to tune the sessions to “sticky.” This will plan the distribution of messages only to containers that are tied to the source of the initial of communication. Мore information about sticky sessions in Heroku is available here. Memory Use in Heroku Sometimes applications based in Heroku can have issues supporting software that requires a lot of memory. Large enterprise applications that use a lot of resources and memory. The great thing about Heroku is that it offers a free memory pack. But if the application needs even more memory, the product owner will have to budget funds to acquire that memory. And costs to scale memory capacity in Heroku get expensive quickly. To reduce the cost of buying memory, customers should consider optimizing their business applications. A possible route is to alter the application so that it uses less memory. Turning on Garbage Collector more often is also an option. To manipulate the memory usage, developers can tune values for some of the environment variables. More information for environment variables is available here. How Should Your Business Approach the Cloud? How does cloud development control expenses and reliably scale application delivery? Why Heroku is Right for Businesses Just Getting Started Heroku is a cloud platform that lets companies build, deliver, and monitor simple applications quickly and without endless infrastructure headaches. The platform is suitable for startup companies, projects, and clients who want to test a first version of their product before investing a lot of money in hardware and infrastructure. Heroku offers simple cost calculation for business leaders, thanks to the cloud’s pay-per-use model. For companies in the earliest stages of business and product development, Heroku can be just the right solution for validating ideas and the quality of early coding efforts. Image Source: Unsplash, Ales Krivec Tags DevelopmentCross PlatformCloud & DevOps Share Facebook LinkedIn Twitter Cloud Computing How does cloud development control expenses and reliably scale application delivery? Download Share Facebook LinkedIn Twitter Sign up for our monthly newsletter. Sign up for our monthly newsletter.