Code Monkey home page Code Monkey logo

payara-nosql's Introduction

Payara with NoSQL

Platform.sh and Payara

The NoSQL DB is a database that provides a mechanism for storage and retrieval of data, which is modeled by means other than the tabular relations used in relational databases. These databases have speed and high scalability. This kind of database is becoming more popular in several applications, which include financial ones. As a result of the increase, the number of users and vendors is increasing too. In the Jakarta EE world, there is the Jakarta NoSQL.

We'll create a similar rest application, but using MongoDB instead of relational database.

Reduce Complexity with Middleware as a Service

As a Platform as a Service, or PaaS, Platform.sh automatically manages everything your application needs in order to run. That means you can, and should, view your infrastructure needs as part of your application, and version-control it as part of your application.

Platform.sh is a PaaS built especially for continuous deployment with the goal of making it easier to move your project to cloud-computing to deploy anywhere and anytime. Using the Maven Archetype, you can create a REST project with Payara Micro and move the project to Platform.sh.

In this guide:

  • Hello World with Payara Micro and Platform.sh
  • Payara Platform with JPA
  • Payara Platform with NoSQL
  • Payara Micro, Platform.sh and Microservices

Using Docker

Docker

  1. Install docker: https://www.docker.com/
  2. https://store.docker.com/images/mongo
  3. Run docker command
  4. Run MongoDB: verify MongoDB image name with the command docker images, it can be mongodb or mongo, and then execute this command
    • docker run -d --name mongodb-instance -p 27017:27017 mongo

MongoDB Project

How to Execute

mvn clean package payara-micro:bundle
java -jar -Xmx512m target/microprofile-microbundle.jar 

Execute

curl --location --request POST 'http://localhost:8080/fishes' \
--header 'Content-Type: application/json' \
--header 'Content-Type: application/javascript' \
--data-raw '{"name": "payara"}'
curl --location --request GET 'http://localhost:8080/fishes'

Reference

Get your free e-book

payara-nosql's People

Contributors

otaviojava avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

danielsava

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.