# GreenLightning

Welcome to the documentation site for GreenLightning. This site contains everything required to get started with GreenLightning, including a "Getting started" guide, references, documentation, code samples, and more.

## What is GreenLightning?

GreenLightning is an embeddable high-performance microservice framework with built-in HTTP and MQTT support. Use it to build lightning-fast, modern web applications in Java.

## Why GreenLightning?

GreenLightning is built from the ground-up to be garbage-free, lock-free, and security-first. It is capable of running directly on Compact-1 Java Virtual Machines with no additional configuration.

The framework uses a declarative event-driven actor model, making code simpler and easier to maintain. Because of this declarative model, operational logic like thread synchronization, exception handling, and null object conditions are handled by the framework and completely removed from your business logic. This lets users write logic that is multithreaded *and* asynchronous without ever scheduling a single task or creating a single lock.

GreenLightning supports fine-grained telemetry information published via a built-in web server which can be enabled or disabled with a single flag. When enabled, this server allows users to inspect live metrics about class-level CPU utilization and end-to-end data throughput - all without any specialized build or deployment.

## Benchmarks

Benchmarks for GreenLightning are provided by the Green Loader project. The graph below shows the dramatic increases in volume a single machine can process after switching to GreenLighting from other popular solutions.  Notice that the volume increases as the simultaneous requests increase, this is due to smart threading which is able to "batch" work while the cache is still hot. &#x20;

![](/files/-LMwVNP_Lu7KokGucO6Y)

Due to the "batching"  it is expected to ask about latency.  This is not a problem due to the efficient internal design based on non blocking and garbage free actors. The graph below shows that most popular solutions have a dramatic increase in latency as greater simultaneous requests are processed.  The GreenLightning latency curve grows at a significantly slower rate.

&#x20;&#x20;

![](/files/-LMwX1iBDqnfDDEQaEv3)

## Getting Started

To get started with a simple GL server, please follow the [Getting Started](/greenlightning/chapter-1-getting-started-with-greenlightning.md) with Green Lightning guide.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://oci-pronghorn.gitbook.io/greenlightning/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
