All Projects → GoogleCloudPlatform → appengine-java-standard

GoogleCloudPlatform / appengine-java-standard

Licence: other
Google App Engine Standard Java runtime: Prod runtime, local devappserver, Cloud SDK Java components, GAE APIs, and GAE API emulators.

Programming Languages

java
68154 projects - #9 most used programming language
GAP
223 projects
CSS
56736 projects
shell
77523 projects
javascript
184084 projects - #8 most used programming language
Starlark
911 projects

Projects that are alternatives of or similar to appengine-java-standard

deploy-appengine
A GitHub Action that deploys source code to Google App Engine.
Stars: ✭ 184 (+30.5%)
Mutual labels:  appengine, google-cloud, google-cloud-platform
GoogleCloudLogging
Swift (Darwin) library for logging application events in Google Cloud.
Stars: ✭ 24 (-82.98%)
Mutual labels:  google-cloud, google-cloud-platform
K8s-Cluster-Provisioner-GCP-Terrafrom
This repo will seamlessly setup self managed Kubernetes cluster in GCP using Terraform and Kubespray.
Stars: ✭ 17 (-87.94%)
Mutual labels:  google-cloud, google-cloud-platform
cloud-cardboard-viewer
Build a Node.js & Angular 2 Web App using Google Cloud Platform
Stars: ✭ 23 (-83.69%)
Mutual labels:  google-cloud, google-cloud-platform
awesome-bigquery-views
Useful SQL queries for Blockchain ETL datasets in BigQuery.
Stars: ✭ 325 (+130.5%)
Mutual labels:  google-cloud, google-cloud-platform
deploy-cloudrun
This action deploys your container image to Cloud Run.
Stars: ✭ 238 (+68.79%)
Mutual labels:  google-cloud, google-cloud-platform
zorya
Google Cloud Instance Scheduler helping to reduce costs by 60% on average for non-production environments.
Stars: ✭ 127 (-9.93%)
Mutual labels:  google-cloud, google-cloud-platform
os-xtoo
The Java and Enlightenment ebuild repository
Stars: ✭ 17 (-87.94%)
Mutual labels:  java11, java17
iris3
An upgraded and improved version of the Iris automatic GCP-labeling project
Stars: ✭ 38 (-73.05%)
Mutual labels:  google-cloud, google-cloud-platform
Cloud-Service-Providers-Free-Tier-Overview
Comparing the free tier offers of the major cloud providers like AWS, Azure, GCP, Oracle etc.
Stars: ✭ 226 (+60.28%)
Mutual labels:  google-cloud, google-cloud-platform
monolog-google-cloud-json-formatter
A Monolog extension for formatting log entries for Google Cloud Logging
Stars: ✭ 15 (-89.36%)
Mutual labels:  google-cloud, google-cloud-platform
gcpsamples
Simple "Hello world" samples for accessing Google Cloud APIs in (node,dotnet,java,golang,python)
Stars: ✭ 100 (-29.08%)
Mutual labels:  google-cloud, google-cloud-platform
augle
Auth + Google = Augle
Stars: ✭ 22 (-84.4%)
Mutual labels:  google-cloud, google-cloud-platform
spanner-bench
Google Cloud Spanner Query Planner Benchmarking
Stars: ✭ 24 (-82.98%)
Mutual labels:  google-cloud, google-cloud-platform
luceneappengine
This project provides a directory useful to build Lucene and Google App Engine powered applications
Stars: ✭ 16 (-88.65%)
Mutual labels:  appengine, appengine-java
Php-Google-Vision-Api
Google Vision Api for PHP (https://cloud.google.com/vision/)
Stars: ✭ 61 (-56.74%)
Mutual labels:  google-cloud, google-cloud-platform
notionproxy
Notion as a web site, inspired by react-notion-x.
Stars: ✭ 24 (-82.98%)
Mutual labels:  google-cloud, google-cloud-platform
modern-java-demos
Modern Java: From Java 8 to Java 18. 现代Java案例大全/《Java核心编程》源码
Stars: ✭ 98 (-30.5%)
Mutual labels:  java11, java17
emulator-tools
Google Cloud BigTable and PubSub emulator tools to make development a breeze
Stars: ✭ 16 (-88.65%)
Mutual labels:  google-cloud, google-cloud-platform
argon
Campaign Manager 360 and Display & Video 360 Reports to BigQuery connector
Stars: ✭ 31 (-78.01%)
Mutual labels:  google-cloud, google-cloud-platform

Java8/11/17 Maven Code of conduct

Google App Engine Standard Environment Source Code for Java 8, Java 11 and Java 17.

This repository contains the Java Source Code for Google App Engine standard environment, the production runtime, the AppEngine APIs, and the local SDK.

Prerequisites

Use a JDK8 environment so it can build the Java8 GAE runtime.

jdk8, but using a JDK11 or JDK17 is also possible.

The shared code base is also used for GAE Java 11 and Java 17 build and test targets, using github actions:

Releases

This repository is the open source mirror of the Google App Engine Java source code that was used to produce Maven artifacts and runtime jars. On Maven Central, the released artifacts from the internal source repository are using the versions like 1.9.xx. The open source release mechanism used with this github repository is using the version starting at 2.0.x. Soon we will stop entirely pushing internal 1.9.xx artifacts and encourage all App Engine customers to use the new artifacts built from the github project.

Modules

Orange items are public modules artifacts and yellow are internal ones. Modules ending with * are only used on the production server side.

pom_dependencies

App Engine Java APIs

Source code for all public APIs for com.google.appengine.api.* packages.

  • Maven pom.xml

    <packaging>war</packaging><!-- Servlet 3.1 WAR packaging-->
    

... com.google.appengine appengine-api-1.0-sdk 2.0.4 javax.servlet javax.servlet-api 3.1 provided ... ```

  • Java 17 appengine-web.xml

    <?xml version="1.0" encoding="utf-8"?>
    <appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
      <runtime>java17</runtime>
      <app-engine-apis>true</app-engine-apis>
    </appengine-web-app>
    
  • Java 11 appengine-web.xml

    <?xml version="1.0" encoding="utf-8"?>
    <appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
      <runtime>java11</runtime>
      <app-engine-apis>true</app-engine-apis>
    </appengine-web-app>
    

App Engine Java Remote APIs

Source code for remote APIs for App Engine.

  • Servlet web.xml
   <servlet>
     <display-name>Remote API Servlet</display-name>
     <servlet-name>RemoteApiServlet</servlet-name>
     <servlet-class>com.google.apphosting.utils.remoteapi.RemoteApiServlet</servlet-class>
     <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet-mapping>
     <servlet-name>RemoteApiServlet</servlet-name>
     <url-pattern>/remote_api</url-pattern>
   </servlet-mapping>
  • Maven pom.xml
    <dependency>
       <groupId>com.google.appengine</groupId>
       <artifactId>appengine-remote-api</artifactId>
       <version>2.0.4</version><!-- Or later-->
    </dependency>

User Visible Changes With Maven Builds

We moved com.google.appengine.api.memcache.stdimpl and its old dependency javax.cache from appengine-api-1.0-sdk.jar to a new jar appengine-api-legacy.jar.

Users who depend on the moved classes will need to also include appengine-api-legacy.jar when they build/deploy. Separating these classes allows appengine-api-1.0-sdk users to choose any version of javax.cache rather than being constrained by an obsolete included version.

  • Maven pom.xml
    <dependency>
       <groupId>com.google.appengine</groupId>
       <artifactId>appengine-api-legacy.jar/artifactId>
       <version>2.0.4</version><!-- Or later-->
    </dependency>

Local Unit Testing for Java 8, 11, 17

Code Sample

  • Maven pom.xml
    <dependency>
      <groupId>com.google.appengine</groupId>
      <artifactId>appengine-testing</artifactId>
       <version>2.0.4</version><!-- Or later-->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.appengine</groupId>
      <artifactId>appengine-api-stubs</artifactId>
       <version>2.0.4</version><!-- Or later-->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.appengine</groupId>
      <artifactId>appengine-tools-sdk</artifactId>
       <version>2.0.4</version><!-- Or later-->
      <scope>test</scope>
    </dependency>

App Engine Java local development implementation of the APIs

Implementation of all the App Engine APIs for local environment (devappserver) and local testing of an application before deployment.

App Engine Java various local development utilities and devappserver

Source code for the App Engine local dev application server and local utilities.

App Engine Java production runtime execution environment

Source code for the App Engine production application server and utilities. It is based on the Jetty9.4 Web Server.

Default entrypoint used by Java11 and Java17

The Java 11, Java 17 runtimes can benefit from extra user configuration when starting the JVM for web apps.

The default entrypoint used to boot the JVM is generated by App Engine Buildpacks. Essentially, it is equivalent to define this entrypoint in the appengine-web.xml file. For example:

java --add-opens java.base/java.lang=ALL-UNNAMED  --add-opens java.base/java.nio.charset=ALL-UNNAMED -showversion -Xms32M -Xmx204M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:+PrintCommandLineFlags -agentpath:/opt/cdbg/cdbg_java_agent.so=--log_dir=/tmp,--alsologtostderr=true,--cdbg_extra_class_path=/workspace/WEB-INF/classes:/workspace/WEB-INF/lib -Dclasspath.runtimebase=/base/java_runtime -Djava.class.path=/base/java_runtime/runtime-main.jar -Djava.library.path=/base/java_runtime: com/google/apphosting/runtime/JavaRuntimeMainWithDefaults --fixed_application_path=/workspace /base/java_runtime

We do not recommend changing this default entrypoint as the memory settings are calculated based on the instance type (F1, F2, F4) and memory available.

By default, we use --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED to open some necessary JDK APIs.

Entry Point Features

The entry point for the Java 11, Java 17 runtimes can be customized with user-defined environment variables added in the appengine-web.xml configuration file.

The following table indicates the environment variables that can be used to enable/disable/configure features, and the default values if they are not set:

Env Var Description Type Default
CPROF_ENABLE Stackdriver Profiler boolean false
GAE_MEMORY_MB Available memory size Set by GAE or /proc/meminfo-400M
HEAP_SIZE_RATIO Memory for the heap percent 80
HEAP_SIZE_MB Available heap size ${HEAP_SIZE_RATIO}% of ${GAE_MEMORY_MB}
JAVA_HEAP_OPTS JVM heap args JVM args -Xms${HEAP_SIZE_MB}M -Xmx${HEAP_SIZE_MB}M
JAVA_GC_OPTS JVM GC args JVM args -XX:+UseG1GC plus configuration
JAVA_USER_OPTS JVM other args JVM args
JAVA_OPTS JVM args JVM args See below

If not explicitly set, JAVA_OPTS is defaulted to:

JAVA_OPTS:=-showversion \
           ${DBG_AGENT} \
           ${PROFILER_AGENT} \
           ${JAVA_HEAP_OPTS} \
           ${JAVA_GC_OPTS} \
           ${JAVA_USER_OPTS}

When CPROF_ENABLE is true, the default entrypoint adds the PROFILER_AGENT as:

-agentpath:/opt/cprof/profiler_java_agent.so=--logtostderr

For example, if your application code needs more -add-opens flags, you can use the JAVA_USER_OPTS environment variable defined in the appengine-web.xml file:

  <env-variables>
     <env-var name="JAVA_USER_OPTS" value="--add-opens java.base/java.util=ALL-UNNAMED" />
   </env-variables>

Contributing

Check out the contributing guide to learn how you can report issues and help make changes.

Always be sure to follow the Code of Conduct.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].