X

Developer Partner Community

Microservice Development using NodeJS and Oracle Application Container Cloud Service (ACCS) by Sunil Jacob

Juergen Kress
PaaS & Middleware Partner Adoption

image

 

Application Container Cloud service allows for microservices to be hosted using programming languages like Java SE, NodeJS and PHP. Future plans include support for Python and Ruby. An earlier post provided an overview and compared this to Oracle Container Cloud Service

The applications run in a Docker container behind the scenes and is expected to expose a service port. By configuring metadata, access can be setup to other Oracle Cloud services like database, storage, messaging etc.

Use Case

In this blog, we’ll build a weather microservice that will publish weather results for Melbourne. The weather data is retrieved from openweathermap and presented to the consumer as JSON. As the free plan allows for a maximum 2000 requests per day, this microservice will cache the result in memory and schedule weather updates every 2 hours.

Programming language

NodeJS has increased in popularity in the last few years as a server side development language to work alongside AngluarJS and other UI Javascript frameworks. Being a cloud first language with custom extensions available as packages, it’s a natural choice for cloud integration.

First, install node v6 (to match the Oracle version) and ensure that the installed folder has been added to the PATH environment variable. While any text editor may be used to write code, Atom with script package installed was used so that code can be run directly in the editor.

Code

Normally, the folder containing the NodeJS code is initialised using npm init. The resulting package.json will store the name of the package, version and dependencies for its execution.
The dependencies are initialised using npm install with the --save flag updating the package.json to store the dependencies Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Technorati Tags: PaaS,Cloud,Middleware Update,WebLogic,WebLogic Community,Oracle,OPN,Jürgen Kress

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha