Showing posts with label cloud. Show all posts
Showing posts with label cloud. Show all posts

Sunday, October 11, 2015

Designing Custom APIs for Oracle Mobile Cloud Service (MCS) right from the Browser

One of the powerful and cool new features in Oracle Mobile Cloud Service is the hub for Custom APIs. From the architectural perspective Custom APIs are consisting of two parts: The „Design“ and „Implementation“ Part. In this post I am going to focus on the first part.

Within MCS it is possible to create the API interface right in the browser or by uploading a so called RAML document that describes the API resources. Having done this you can provide some sample data being able to test and implement against the newly created API.

Focus of this post is to show how to design an API right in MCS UI and test it.

How to do it

Goto Development > APIs

Click „New API"


If you have a RAML document at this point in time you can upload it to define the Resources for your API. If not it is possible to create it on the fly (as shown in this post).

Next: Click „Create“. It will take you to the „Designer“ View. You will see the general configuration of your Custom API.

Next Step is to create a new REST Resource which is done in the „Endpoints“ section

Clicking on „New Resources“ creates a new form entry to fill in the „path“ and a Resource „Display Name".

Having done this the desired methods (GET, PUT, POST, etc) should be defined. Click „Methods“ for that and take action form the select list of possible methods.

-

As seen from the screenshot above you can further refine the GET method with parameters etc.
In order to get a specific employee record you may want to create a „sub-resource“ wich is also supported by the MCS API Designer. Click on the ‚+‘ therefore

The nested resource is dynamic (employee_id in this case)

And of course same procedure to add methods to a nested resource

See result after adding the GET method to a nested resource.

Because the app developer might want to be able to implement against the new API early in development (without fully functional API service backend) you can provide some testdata in the „Responses“ tab.

Choose „Add Media Type“ -  application/json - and paste your example/test response.

Save your work. Click on the „Test“ Button on top-right.

Choose the desired resource to test. You will be prompted to fill in a sample id for „employee id“ - path parameter and associate with some mobile backend. Provide Username/Password except you configured the API for anonymous access (security tab, not covered here)

Click on „Test Endpoint“ to see the HTTP Status code + body result.


That concludes the basic steps needed to design and test a Custom API in MCS. 
Cool stuff!

Further Information


Sunday, March 8, 2015

#ofmForum 2015 in Budapest has rocked!

Last week I attended the Oracle Fusion Middleware Partner Community Forum 2015 in Budapest. Over 150 participants from Europe, US and even Latin America (Peru, Costa Rica, Mexico, Venezuela) joined the great event where various Oracle Product Managers and Oracle Partners exchanged their experiences with the community. Jürgen Kress  - well known from his soacommunity & weblogiccommunity blogs - and his team hosted a great event at a great location! Thanks a lot!

The Digital Transformation is just starting

We got an update about Oracles overall cloud & mobile strategy that drives the digital transformation. Nowadays there is a huge demand on business agility due to disruptive technologies and market shifts.

Oracles answer to these requirements are the upcoming Cloud Services

  • Integration Cloud Service (ICS)
  • Process Cloud Service (PCS)
  • Mobile Cloud Service (MCS)
and SaaS solutions running on Oracles PaaS (Database Cloud Service, Java Cloud Service). The main focus for the upcoming releases for  Oracle SOA/BPM/ACM 12c is on stability & improvements.

The nice thing about the ofmForum is that there wasn't just slides but on the most products real working demos. On day 2 there were 3 parallel tracks dedicated for SOA, BPM/ACM and WebLogic&Mobile. The experts gave demos on API Catalog, API Manager, StreamExplorer, Event Processing, Mobile Alta UI & OSB Integration for SOAP to REST transformations, MAF, ICS, PCS, MCS and the Java Cloud Service (JCS) plus Developer Cloud Service.  Really a lot of new acronyms to learn ;)

Day 3/4 was dedicated to 4 parallel Workshops with a lot of hands-on sessions. (SOA, BPM/ACM, Mobile Application Framework (MAF), Multichannel Enablement). I attended the Multichannel workshop. Based on an existing  SOAP-Webservice we used OSB 12c to transform it (without coding) to a REST JSON based service. On top of that we built a mobile app with MAF. In the end I had a running MAF application on my real iOS device.


Networking & Get-together

Besides the cool and new technologies there were a lot of chances to network and get in touch with Oracle Product Managers and Partners. I enjoyed it a lot meeting persons I only knew from twitter or blogs. Thanks for all the great conversations! Further, Budapest is an amazing city! Good food, wine & bars and historical locations. Thanks Jürgen and Oracle for the nice dinner in the spoon restaurant. And if you are in Budapest check out the Simpla Kertmozi, a pretty cool "ruin bar":)


I am really looking forward for the next OFM Forum 2016. Which location will be next?

Further information

See more cool pictures of the event in the twitter stream #ofmForum

Tuesday, January 17, 2012

Play!ing with #WebSockets

Development Stack

Server: Play 1.2.4, WebSocket
Client: jQuery, Boostrap
Tested with: Safari 5.0.5 (on Win XP)
On: Localhost

Inspired by a Blog-Post from Lucas Jellema I have done a similar demo with Play!.


The nice thing is that it was really easy to setup and deploy into the cloud. So everyone can test the websocket app - eeehm that was my initial plan (Actually it does not work currently, see why below). Further I took the chance to get in touch with git and published the source code on github. So feel free to test and fork.

https://github.com/multikoop/play-push-imgsel

0000@2772_2772-41266a678e29b7f1

Since there are some great cloud services arosed in the past I wanted to give it a try. So here are my experiences:

Deployment@Heroku

Prerequisite: install heroku CLI, git client (Please google for it how to set app.  I only post the interesting stuff here)

C:\play\apps\play-push-imgsel>heroku login
C:\play\apps\play-push-imgsel>heroku create -s cedar play-push-imgsel
Creating play-push-imgsel... done, stack is cedar
http://play-push-imgsel.herokuapp.com/ | git@heroku.com:play-push-imgsel.git
Git remote heroku added

C:\play\apps\play-push-imgsel>git push heroku master
Counting objects: 46, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (40/40), done.
Writing objects: 100% (46/46), 110.54 KiB, done.
Total 46 (delta 6), reused 0 (delta 0)

-----> Heroku receiving push
-----> Play! app detected
-----> WARNING: Play! version not specified in dependencies.yml. Default version
: 1.2.4 being used....
-----> Installing Play! 1.2.4.....
-----> done
-----> Installing ivysettings.xml..... done
-----> Building Play! application...
~        _            _
~  _ __ | | __ _ _  _| |
~ | '_ \| |/ _' | || |_|
~ |  __/|_|\____|\__ (_)
~ |_|            |__/
~
~ play! 1.2.4, http://www.playframework.org
~
1.2.4
Building Play! application at directory ./
Resolving dependencies: .play/play dependencies ./ --forceCopy --silent -
Duser.home=/tmp/build_jxh1de2j7wc9 2>&1
:: loading settings :: file = /tmp/build_jxh1de2j7wc9/.ivy2/ivysettings.x
ml
~ Resolving dependencies using /tmp/build_jxh1de2j7wc9/conf/dependencies.
yml,
~
~
~ No dependencies to install
~
~ Done!
~
Precompiling: .play/play precompile ./ --silent 2>&1
Listening for transport dt_socket at address: 8000
10:26:55,430 INFO  ~ Starting /tmp/build_jxh1de2j7wc9
10:26:56,387 INFO  ~ Precompiling ...
10:27:03,224 INFO  ~ Done.
-----> No Procfile found. Will use the following default process:
play run --http.port=$PORT $PLAY_OPTS
-----> Discovering process types
Procfile declares types -> (none)
Default types for Play! -> web
-----> Compiled slug size is 26.6MB
-----> Launching... done, v5
http://play-push-imgsel.herokuapp.com deployed to Heroku

To git@heroku.com:play-push-imgsel.git
* [new branch]      master -> master

C:\play\apps\play-push-imgsel>heroku open
Opening http://play-push-imgsel.herokuapp.com/

C:\play\apps\play-push-imgsel>


This is an awesome and easy to use stack!!!!! #PGH => Play, Git, Heroku!



Deployed at: http://play-push-imgsel.herokuapp.com/



Application is accessible but WS request are not working (oops).



C:\play\apps\play-push-imgsel>heroku logs
...
...
2012-01-14T10:36:29+00:00 heroku[router]: Error H12 (Request timeout) -> GET pla
y-push-imgsel.herokuapp.com/ap... dyno=web.1 queue= wai
t= service=30000ms status=503 bytes=0


=> Feature Request has been filed at Heroku. http://support.heroku.com/tickets/40910



Deployment@Cloudbees



Since WebSocket is currently not supported (according to: http://www.jamesward.com/2011/12/11/tutorial-play-framework-jpa-json-jquery-heroku) I decided to give cloudbees a try. Same here



Deployed at: http://play-push-imgsel.multikoop.cloudbees.net/



Same issues here:



... 20:27:42,952 WARN ~ 404 -> GET /application/pushimgsel/process (GET /application/pushimgsel/process) ...



=> Request #2383 "HTTP 404 on WebSocket Reque..." created. https://cloudbees.zendesk.com/tickets/2383



Conclusion



The cloud is not ready for WebSocket applications in early 2012! ;-)



If you want to see the demo live, all you need to do is



-Install Play 1.2.4

-Get push-imgsel Sourcecode: https://github.com/multikoop/play-push-imgsel


-Test with Safari (Other modern browsers currently not working, cause WebSocket Implementation in Play 1.2.4 cannot handle the newest Sec-WebSocket-Version Headers. Hopefully it will be fixed in 1.2.5 at least in 2.0.



Have fun!