What is Apprenda, Logically Speaking?

Apprenda is an application server and container for .NET and Java applications where application components and Tenants are both first-class citizens of the architecture. Apprenda aggregates Windows and Linux infrastructure into a single logical layer that is a self-service computing platform for one or more Development Teams. An application running on Apprenda is one that is composed of some number of traditional ASP.NET UIs, Windows Communication Foundation (WCF) web services, Windows Services, Java Web Applications packaged as WARs, and SQL Server-based or Oracle-based databases. Apprenda provides an execution fabric for your application components of all types, server farm management for a network of peer-based nodes, an inheritable distributed architecture that makes your .NET or Java application a scalable, highly-performant entity, and a management system for dealing with the various intricacies of an application’s lifecycle over time. Additionally, Apprenda offers various APIs and frameworks that provide capabilities such as message brokering, distributing caching, and application metering. More specifically, Apprenda provides:

  • A multi-machine application server and runtime for hosting and managing .NET and Java applications.
  • Instrumentation and transformation engines that virtualize your application’s components across Tenants so that you can achieve high efficiency. This means that parts of your application, such as your database, can be written as if they were for one Tenant (e.g., storing row data naively with no notion of tenant ownership), but, when running on Apprenda, will concretely behave in a multi-tenant fashion (e.g., your database will be instrumented to support multiple Tenant data storage in a way that is transparent to your application queries).
  • A User and Tenant management layer that your applications can leverage so that the idea of Users and account information can be shared across applications.
  • An API and set of associated services that provide fundamental building blocks for User/account management, and provisioning (either by you or through pre-built storefront widgets that allow your Tenants to self-provision), caching and message brokering, among other things
  • Enterprise-class server mechanics such as automatic high availability, linear scale-out across your server farm, and failure isolation for both Windows and Linux machines.
  • A set of web portals and tools to manage your applications and Tenants.

The best way to think of Apprenda is from a stack-wise point of view. Apprenda is analogous to an operating system, an application server like IIS or Tomcat, or any other pure software layer that sits above physical resources (such as hardware or a network) and acts as a host and execution backdrop for an application that lives on top of it. In the case of an operating system, everything from memory subsystems to disk access and thread scheduling is provided as a set of services to the applications built for the OS. When you write code, you implicitly assume that the OS will take care of fundamental and difficult problems for you, and that the hardware resources are abstracted away from your code to some extent. Runtimes like the .NET CLR or the JVM provide further value through more abstraction for a large subset of applications being developed. Apprenda is similar in both form and spirit to an operating system or runtime.

Apprenda provides a set of implicit and explicit services to your application from both an architectural and feature point of view. Apprenda leverages separation of concerns, as most infrastructure-specific concerns are dealt with automatically or through simple interactions between your application and an API, while application-specific concerns (such as the business problems your application is trying to solve) are dealt with by you and your code. Much like an operating system or other application container, Apprenda can host and manage multiple applications simultaneously.

Having a conceptual “layered” understanding of Apprenda is important. Figure 1 provides this layered view of Apprenda where clear demarcations can be seen between your application components, Apprenda’s explicit API accessed services, and Apprenda’s kernel (try not to take kernel literally as in a traditional operating system, but only analogously to middleware such as Apprenda), which provides an architecture that your application implicitly inherits. As an example, your application inherits partitioning within application components so your single-tenant data model can be multi-tenant without much effort. Although this sounds magical, it’s no different than your .NET or Java application inheriting capabilities such as memory management from the CLR and JVM, respectively. The end goal is that a developer will spend as much time as possible writing the application code using standard technologies, and as little time as possible on sticky architecture issues or boilerplate auxiliary systems required of nearly every modern web application.

Let’s dig into a brief description of the major kernel and business services identified in Figure 1 (to be clear, these descriptions serve simply to introduce some detail into the picture, and are not meant to be comprehensive, since the specifics are covered elsewhere in the Apprenda Platform documentation). These descriptions should give you a general idea of the specific technical functions Apprenda takes over in your application’s architecture. After reading these brief descriptions, you should be able to answer the question “Do I need to build X?” but will not yet have enough detail to know how to use it.

Apprenda Kernel

The Apprenda kernel is a collection of runtime components responsible for managing network resources, providing an abstraction layer for those resources, and providing a number of facilities that are directly and implicitly instrumented into a hosted application’s runtime. Typically, functions at the Apprenda kernel are described as “low-level” since they are complex functions hidden from applications, but can be influenced through configuration or customization..

  1. P2P Web Service Distribution Fabric: Apprenda provides a custom distributed hosting container that can dynamically deploy and host instances of your web service across a server farm, dynamically configure endpoints, and register those communication endpoints with Apprenda for runtime lookup. Rather than calling specific instances of a web service, WCF proxies within Apprenda are dynamically configured to target logical definitions of web services so that requests can be distributed across many instances of your web service. Apprenda does this through direct peer relationships without centralized intermediaries.
  2. Application Component Multi-tenancy Engine: Apprenda acts as a hosting container to relatively plain .NET and Java application components (ASP.NET, WCF, WAR and SQL Server or Oracle assets). The components, aside from requiring that they conform to certain patterns and configuration approaches, are built in a traditional fashion where the code and data is not partitioned but is instead aware of only a single tenant using it at a time. This is normal, since most business web applications have been traditionally installed by customers on their own intranet, creating affinity between them and their instance physically. Apprenda takes these standard application components and creates “virtual partitions” within the components, allowing a single instance of any component to be shared by multiple tenants. This should not be confused with OS virtualization. Quite literally, Apprenda will do things like modify your database structure to support multiple Tenants, or manage UI isolation by dynamically creating virtual websites for each Tenant.
  3. Application Versioning & Deployment Manager: Apprenda provides tools to manage deployment of your application components (UIs, web service, databases) and tracks changes in deployment through a versioning system. When you first upload your application to Apprenda through its application management web portal, Apprenda stamps it as your first version and creates a versioning log roll, allowing you to create new versions through which you can publish and deploy delta-based upgrades and/or bug fixes to specific application assets (think DLLs, WARs, images, database definition alterations). Apprenda will record version information and coordinate a full rollout across your Apprenda-managed network infrastructure.
  4. Server Provisioning System: Being able to aggregate servers into a single application component hosting fabric would be useless if Apprenda didn’t allow you to introduce new servers to expand capacity. Through Apprenda’s desktop and web-based provisioning tools, you can easily add new capacity to a Apprenda network by pointing Apprenda to a standard Windows and/or Linux machine and instructing it to provision that server as any combination of web, application, or database server.
  5. Failure Detection and Recovery Services: As a host environment, Apprenda is intimately involved in monitoring certain parts of your application. Specifically, Apprenda focuses on detecting failures at the application tier, logging unhandled errors with as much context as possible, and recovering failed web services on a different part of your network if need be, without the other tiers of your application being affected by the dynamic reconfiguration. Apprenda focuses squarely on application-level issues, and is not a replacement for traditional infrastructure monitoring tools, which complement an Apprenda instance quite nicely.
  6. Context Track & Flow System: Given that Apprenda provides an inheritable multi-tenant architecture, knowing the “who” and “what” of everything is critical to ensure proper multi-tenant execution. From the point of entry (HTTP, SOAP, or other), Apprenda tags all requests and application calls with contextual information of the calling Tenant and User, and maps that across tagged application components that provide contextual notions around what is being accessed by whom. Because of this, Apprenda can properly do things like store one’s data in one data partition and then retrieve it at a later time, or provide programmatic access through the API (see the subsection titled ‘Contexts’ later in this document for more details). Apprenda relies on IDs and unique text aliases to identify context. For example, every application must be defined with a unique alias on an Apprenda instance, as must every Tenant.
  7. Authentication & Authorization System: Apprenda provides optional authentication and authorization perimeters around applications hosted on top of it, including login screens and SOAP-level authorization and tokens for remote calls into your web services running on Apprenda. This authorization can be used in conjunction with Apprenda’s native user system or by harnessing an existing user store through configurable plugins for systems such as Active Directory, standard LDAP, or any other user store. In both cases, Apprenda leverages application subscriptions as access control certificates that dictate application level authorizations.
  8. HTTP & Database Scale-Out Services: Web sites and databases deployed to Apprenda are treated as “partitions” where one or more Tenants can share a partition (even if they weren’t built for sharing, Apprenda’s multi-tenancy takes care of this for you). As your capacity needs change, Apprenda allows you to dynamically introduce new partitions across servers and move Tenants to those partitions, giving your standard web applications trivial access to a complex architecture.

Apprenda Business Services

While the Apprenda Kernel provides a number of low-level architectural features and abilities, the Apprenda Business Services capture a set of high-order business workflows and functions as web services, management portals, and APIs, all of which are accessible to you, the Developer, as a full commercialization framework.

  1. Logging Services: When your application code is deployed dynamically to one of many servers, the simple act of logging information from that code can create an unmanageable amount of data across many, many files. Furthermore, since your code executes under the context of your Tenants, you’d certainly be interested in knowing who was using your application when the log information was generated, or be able to separate logs generated under one Tenant context from another. Through the Apprenda API, you can post log messages that are captured in a centralized log store and augmented with all available contextual information, allowing you to search logs and get results for lookups like “All logs for this specific tenant on this specific application.” Furthermore, standard appenders exist and are automatically configured for you if your application uses any of the popular logging frameworks such as Log4j or NLog. 
  2. User Profile & Role System: Apprenda provides an out-of-the-box User system and Role system, where Users are aggregated under Tenant accounts, and Tenants can define Roles to which their Users belong. As a result, you don’t worry about building user registration and authentication systems, login screens, or SOAP authentication for web service requests entering your Apprenda instance. All of this is provided as part of Apprenda, and is tied to metering and context systems. It also means that you can define Role-based access to functionality in your application through the Apprenda API.
  3. Metering Services: Tracking specific events and usage requires a metering infrastructure. For example, if subscribers are expected to be held accountable in some way for the number of reports they’ll generate in your application, being able to answer the question of “How many reports did business unit X generate this month?” is critical. The Apprenda API exposes specific functionality for posting and retrieving metered events to and from Apprenda.
  4. Tenant Account Profiling System: Tenants are first-class citizens in Apprenda from an architecture point of view, but are also first-class citizens from a business perspective. Because of this, Apprenda provides your Tenants with their own management portal (which you can brand to look like your own) to manage profile and account information such as defining Users, Roles and locations (most of which is accessible to your application via API calls)
  5. Tenant Provisioning System: An application deployed to Apprenda is not useful unless Tenants can gain access to it. Apprenda provides a provisioning system that allows for the “onboarding” of new Tenants to your system. Provisioning can be exposed in a self-service fashion through a web browser or kept private so only people within your Organization can create new Tenant accounts. Furthermore, the provisioning system can be customized through a number of means, including supplying Apprenda with provisioning SQL scripts that it can execute for each Tenant that is granted access to your application.
  6. Subscription Management System: Subscriptions serve two primary roles in Apprenda: 1) an access control certificate that dictates whether a User can access a given application based on whether that User is assigned a subscription for that application, and 2) a “digital contract” that outlines specifically granted access rights to metered functionality in the application, recurrence schedules for renewals, and a number of other “contract” components.

A Developer should focus on understanding how these components affect their requirements and build their application with an eye towards leveraging as much of Apprenda as possible. Mapping these descriptions to your requirements will help define your development roadmap as well as what parts of this and other documents might be better suited for a deeper read. Most of the implicit value that Apprenda introduces into your application’s architecture is low-level (such as multi-tenancy and scale-out capabilities). The higher order commercialization value (such as how Apprenda should meter application usage) is accessed through explicit API calls and providing configuration through one of Apprenda’s portals.