{"id":84154,"date":"2018-12-04T10:00:14","date_gmt":"2018-12-04T08:00:14","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=84154"},"modified":"2018-12-03T11:38:24","modified_gmt":"2018-12-03T09:38:24","slug":"serverless-java-fn-project-first-steps","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2018\/12\/serverless-java-fn-project-first-steps.html","title":{"rendered":"Serverless, Java and FN Project, first steps"},"content":{"rendered":"<p>Serverless isn\u2019t a new thing, but it is fair to say there is still a lot of hype about it and how it will change everything, and how in the future everything will be serverless. Beside serverless\/functions provided by cloud providers there are more and more serverless projects coming our way which goal is to break us from vendor lock-in and allow us to run serverless even on premise. Let us look at one such project FN Project.<\/p>\n<h3>What is FN Project<\/h3>\n<p>If we go to the official website of FN project <a href=\"http:\/\/fnproject.io\/\">http:\/\/fnproject.io\/<\/a> we can read something like this:<\/p>\n<p><em>\u201cThe Fn project is an open-source container-native serverless platform that you can run anywhere \u2014 any cloud or on-premise. It\u2019s easy to use, supports every programming language, and is extensible and performant.\u201d<\/em><\/p>\n<p>FN Project is an open source project backed by Oracle, which base functions on containers. So, in theory, anything that can become container and can read and write from\/to stdin\/stdout, can become a function in FN project. This is a very nice feature, since it means, that in theory, it can support any programing language, unlike serverless\/functions provided by cloud providers, where if your language of choice wasn\u2019t supported you couldn\u2019t use it with serverless.<\/p>\n<p>Another nice feature of FN Project is that it can run on-premise, or in the cloud, or multiple clouds or in the combination of all mentioned.<\/p>\n<h3>Init setup<\/h3>\n<p>The only prerequisite for FN project is Docker 17.10.0-ce or later.<\/p>\n<p>To setup FN project, we need only to download FN binary<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/fnproject\/cli\/releases\">https:\/\/github.com\/fnproject\/cli\/releases<\/a><\/li>\n<\/ul>\n<p>and add it to the path. After this, we are ready to start playing with FN.<\/p>\n<h3>Initial function in FN project<\/h3>\n<p>The first thing that we need to do is to start FN server. In order to do so, we only need to type this in a terminal\/console<\/p>\n<pre class=\"brush:java\">$ fn start<\/pre>\n<p>To validate that all is working good we can run this command<\/p>\n<pre class=\"brush:java\">$ fn version<\/pre>\n<p>This will print version of fn server and fn client running on the machine. In the case of my laptop I get this values<\/p>\n<pre class=\"brush:java\">$ fn version\r\n  Client version: 0.5.15\r\n  Server version: 0.3.595<\/pre>\n<p>Once we validated that all is good we can start to create our first function.<\/p>\n<h3>First function in FN Project<\/h3>\n<p>As mentioned FN project is <em>\u201clanguage agnostic\u201d<\/em>, in theory, it can support any language, but it doesn\u2019t mean that it supports all languages at the moment. To see which languages are supported with the version we have we can run next command:<\/p>\n<pre class=\"brush:java\">$ fn init --help<\/pre>\n<p>&nbsp;<\/p>\n<p>There is option <strong>\u2013runtime<\/strong> which will list all options available on our machine. In my case, I will choose Java programing language. So to create the first function in Java we just need to run this command:<\/p>\n<pre class=\"brush:java\">$ fn init --runtime java --trigger http function1<\/pre>\n<p><strong>function1<\/strong> is the name of the function, and here we put the name that we want to use. Option <strong>\u2013trigger http<\/strong> means that we want to create HTTP trigger for our function which will allow us to call it over HTTP, for example via curl. After running this command fn will generate initial function for us and put it in the directory named as we named our function, in my case <strong>function1<\/strong>.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>Let us look at what is generated<\/p>\n<pre class=\"brush:java\">$ cd function1\r\n$ find .\r\n\r\n.\/src\/main\/java\/com\/example\/fn\/HelloFunction.java\r\n.\/src\/test\/java\/com\/example\/fn\/HelloFunctionTest.java\r\n.\/pom.xml\r\n.\/func.yaml<\/pre>\n<p>If we open pom.xml file, it will look like any other pom.xml file. Only dependencies there for FN project will be dependencies for testing part, there are no dependencies for building or running our java fn function.<\/p>\n<p>If we open <strong>HelloFunction.java<\/strong>, we will again see that it is plain Java class, with ZERO dependencies.<\/p>\n<pre class=\"brush:java\">package com.example.fn;\r\n\r\n    public class HelloFunction {\r\n\r\n    public String handleRequest(String input) {\r\n        String name = (input == null || input.isEmpty()) ? \r\n                                             \"world\" : input;\r\n\r\n        return \"Hello, \" + name + \"!\";\r\n    }\r\n}<\/pre>\n<p>There is only one method <strong>handleRequest<\/strong> that takes String as an input and provide String as an output. This is very different from writing functions in an implementation of cloud providers since they always add specific libraries or other types of dependencies in order for functions to work with their system. In case of FN since there are no dependencies it can run without any problem anywhere and you are not looked in into anything.<\/p>\n<h2>\u201cMagic\u201d of FN Project<\/h2>\n<p>So how does then FN works? How it knows how to run our function?<\/p>\n<p>All magic is in <strong>func.yaml<\/strong> file. Or to be more precise all configuration needed to create a function in FN project. Let us take a closer look at it.<\/p>\n<pre class=\"brush:java\">$ cat func.yaml\r\n\r\nschema_version: 20180708\r\nname: function1\r\nversion: 0.0.1\r\nruntime: java\r\nbuild_image: fnproject\/fn-java-fdk-build:jdk9-1.0.75\r\nrun_image: fnproject\/fn-java-fdk:jdk9-1.0.75\r\ncmd: com.example.fn.HelloFunction::handleRequest\r\nformat: http-stream\r\ntriggers:\r\n- name: function1-trigger\r\ntype: http\r\nsource: \/function1-trigger<\/pre>\n<p>There are multiple fields here:<\/p>\n<ul>\n<li>schema_version is pointing out which version of Fn was used to generate this file<\/li>\n<li>name is the name of our function<\/li>\n<li>version is the current version of our function and as we deploy it will be autoincremented<\/li>\n<li>runtime language that we chose to write our function in<\/li>\n<li>build_image docker image used to build our function depends of course on the language of choice<\/li>\n<li>run_image docker image used to run our function<\/li>\n<li>cmd <em>entry point<\/em> to our function, what needs to be called to perform our business logic<\/li>\n<li>triggers here are defined triggers for invoking our function, in our case we have HTTP trigger<\/li>\n<\/ul>\n<h3>Unit tests in FN project<\/h3>\n<p>Maybe you noticed that one of the generated files is <strong>HelloFunctionTest.java<\/strong>, this file is indeed unit test file for our function, which is also autogenerated for us, and populated with a simple example of the unit test. Let us take a look at that file.<\/p>\n<pre class=\"brush:java\">public class HelloFunctionTest {\r\n\r\n    @Rule\r\n    public final FnTestingRule testing =   \r\n                                FnTestingRule.createDefault();\r\n\r\n    @Test\r\n    public void shouldReturnGreeting() {\r\n        testing.givenEvent().enqueue();\r\n        testing.thenRun(HelloFunction.class, \"handleRequest\");\r\n\r\n        FnResult result = testing.getOnlyResult();\r\n        assertEquals(\"Hello, world!\",\r\n                     result.getBodyAsString());\r\n    }\r\n}<\/pre>\n<p>Except for some fn dependencies and part with <strong>@Rule<\/strong>, everything else looks like any other JUnit test in java. This unit test will just invoke our function without passing any parameters, and check if a result is \u201cHello world!\u201d. The great thing about this test is that we can run it like any other unit test, we can invoke it from maven or IDE in any standard way.<\/p>\n<p>Let us now write the test where we will pass some arguments and validated that our function still works as expected. In order to do so, we can add this code to our test class<\/p>\n<pre class=\"brush:java\">@Test\r\n    public void shouldReturnGreetingwithBodyValue() {\r\n        testing.givenEvent().withBody(\"Java\").enqueue();\r\n        testing.thenRun(HelloFunction.class, \"handleRequest\");\r\n\r\n        FnResult result = testing.getOnlyResult();\r\n        assertEquals(\"Hello, Java!\",\r\n                     result.getBodyAsString());\r\n}<\/pre>\n<p>Again, we can run it like any other unit test and validate that all is good.<\/p>\n<h3>Deploying and Invoking FN function<\/h3>\n<p>Now that we defined our function, we understand what files are generated and what is their purpose, we also did unit testing. Then it is time for us to deploy and invoke the function. We can deploy our function to the cloud and docker registry, but it is much easier and faster to deploy it only locally especially while we are busy in development. To deploy function we just need to run this command<\/p>\n<pre class=\"brush:java\">$ fn deploy --app myapp1 --local<\/pre>\n<p>Here we are telling fn to deploy our function into application <strong>myapp1<\/strong>, and to deploy it only locally by providing option <strong>\u2013local<\/strong>. Once we successfully deployed our function, we can invoke it. To invoke it we can run next command<\/p>\n<pre class=\"brush:java\">$ fn invoke myapp1 function1<\/pre>\n<p>We provide the name of our application and the name of our function. If we would like to provide input to our function we can do it in this way<\/p>\n<pre class=\"brush:java\">$ echo \"Java is great\" | fn invoke myapp1 function1<\/pre>\n<p>If you remember we also created HTTP trigger, so let\u2019s use it to invoke our function.<\/p>\n<pre class=\"brush:java\">$ curl http:\/\/localhost:8080\/t\/myapp1\/function1-trigger<\/pre>\n<h3>FN function with JSON<\/h3>\n<p>We can already do a lot of nice things with this, but let us move to the next level, where we will use JSON as input and output of our FN functions. First, we need to create a simple POJO class, something like this<\/p>\n<pre class=\"brush:java\">public class Hello {\r\n\r\n    private String message;\r\n\r\n    public String getMessage() {\r\n        return message;\r\n    }\r\n\r\n    public void setMessage(String message) {\r\n        this.message = message;\r\n    }\r\n}<\/pre>\n<p>now we can modify our function to take this class as input and output, so the function would look like this<\/p>\n<pre class=\"brush:java\">public Hello handleRequest(Hello input) {\r\n    String name = (input == null || \r\n                     input.getMessage().isEmpty()) ? \"world\" :\r\n                                           input.getMessage();\r\n\r\n    Hello hello = new Hello();\r\n    hello.setMessage(message + \", \" + name + \"!\")\r\n\r\n    return hello;\r\n}<\/pre>\n<p>after we deploy function we can invoke it like this<\/p>\n<pre class=\"brush:java\">$ curl -d '{\"message\":\"JSON Input\"}' \\\r\n              http:\/\/localhost:8080\/t\/myapp1\/function1-trigger<\/pre>\n<h3>References and future read<\/h3>\n<p>As we saw starting to develop functions with FN project is very easy and fun, also in the small amount of time we can create powerful functions.<\/p>\n<p>What we saw here is only part of possibilities of FN Project, for more info about FN in general and more info about possibilities I would suggest looking at websites listed below<\/p>\n<ul>\n<li><a href=\"http:\/\/fnproject.io\/\">http:\/\/fnproject.io\/<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/fnproject\/fn\">https:\/\/github.com\/fnproject\/fn<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/vladimir-dejanovic\/java-in-fn-project\">https:\/\/github.com\/vladimir-dejanovic\/java-in-fn-project<\/a><\/li>\n<\/ul>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>Published on Java Code Geeks with permission by Vladimir Dejanovi\u0107 , partner at our <a href=\"\/\/www.javacodegeeks.com\/join-us\/jcg\/\" target=\"_blank\" rel=\"noopener\">JCG program<\/a>. See the original article here: <a href=\"https:\/\/www.javaadvent.com\/2018\/12\/serverless-java-and-fn-project-first-steps.html\" target=\"_blank\" rel=\"noopener\">Serverless, Java and FN Project, first steps<\/a><\/p>\n<p>Opinions expressed by Java Code Geeks contributors are their own.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Serverless isn\u2019t a new thing, but it is fair to say there is still a lot of hype about it and how it will change everything, and how in the future everything will be serverless. Beside serverless\/functions provided by cloud providers there are more and more serverless projects coming our way which goal is to &hellip;<\/p>\n","protected":false},"author":10620,"featured_media":24013,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[936,1684],"class_list":["post-84154","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-docker","tag-serverless"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Serverless, Java and FN Project, first steps - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Interested to learn about FN Project? Check our article focusing on FN Project an open source project backed by Oracle, which base functions on containers.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2018\/12\/serverless-java-fn-project-first-steps.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Serverless, Java and FN Project, first steps - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about FN Project? Check our article focusing on FN Project an open source project backed by Oracle, which base functions on containers.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2018\/12\/serverless-java-fn-project-first-steps.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2018-12-04T08:00:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/docker-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Vladimir Dejanovic\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@VladimirD_42\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vladimir Dejanovic\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/serverless-java-fn-project-first-steps.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/serverless-java-fn-project-first-steps.html\"},\"author\":{\"name\":\"Vladimir Dejanovic\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/0ded5f422600c2737122fef49586f3a6\"},\"headline\":\"Serverless, Java and FN Project, first steps\",\"datePublished\":\"2018-12-04T08:00:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/serverless-java-fn-project-first-steps.html\"},\"wordCount\":1362,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/serverless-java-fn-project-first-steps.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/docker-logo.jpg\",\"keywords\":[\"Docker\",\"Serverless\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/serverless-java-fn-project-first-steps.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/serverless-java-fn-project-first-steps.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/serverless-java-fn-project-first-steps.html\",\"name\":\"Serverless, Java and FN Project, first steps - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/serverless-java-fn-project-first-steps.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/serverless-java-fn-project-first-steps.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/docker-logo.jpg\",\"datePublished\":\"2018-12-04T08:00:14+00:00\",\"description\":\"Interested to learn about FN Project? Check our article focusing on FN Project an open source project backed by Oracle, which base functions on containers.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/serverless-java-fn-project-first-steps.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/serverless-java-fn-project-first-steps.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/serverless-java-fn-project-first-steps.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/docker-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/docker-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/serverless-java-fn-project-first-steps.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Serverless, Java and FN Project, first steps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/0ded5f422600c2737122fef49586f3a6\",\"name\":\"Vladimir Dejanovic\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b7049cc64e7e12f61ea932269a37c49e17f1d213994de4efc47704d55892ff5d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b7049cc64e7e12f61ea932269a37c49e17f1d213994de4efc47704d55892ff5d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b7049cc64e7e12f61ea932269a37c49e17f1d213994de4efc47704d55892ff5d?s=96&d=mm&r=g\",\"caption\":\"Vladimir Dejanovic\"},\"description\":\"IT Consultant, Software Architect, Team Lead and Chapter Lead working in industry since 2006 developing high performance software in multiple programming languages and technologies from desktop to mobile and web with high load traffic. Enjoining developing software mostly in Java and JavaScript, however also wrote fair share of code in Scala, C++, C, PHP, Go, Objective-C, Python, R, Lisp and many others.\",\"sameAs\":[\"http:\\\/\\\/itshark.xyz\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/pub\\\/vladimir-dejanovic\\\/4\\\/ba7\\\/885\",\"https:\\\/\\\/x.com\\\/VladimirD_42\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/vladimir-dejanovic\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Serverless, Java and FN Project, first steps - Java Code Geeks","description":"Interested to learn about FN Project? Check our article focusing on FN Project an open source project backed by Oracle, which base functions on containers.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2018\/12\/serverless-java-fn-project-first-steps.html","og_locale":"en_US","og_type":"article","og_title":"Serverless, Java and FN Project, first steps - Java Code Geeks","og_description":"Interested to learn about FN Project? Check our article focusing on FN Project an open source project backed by Oracle, which base functions on containers.","og_url":"https:\/\/www.javacodegeeks.com\/2018\/12\/serverless-java-fn-project-first-steps.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2018-12-04T08:00:14+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/docker-logo.jpg","type":"image\/jpeg"}],"author":"Vladimir Dejanovic","twitter_card":"summary_large_image","twitter_creator":"@VladimirD_42","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Vladimir Dejanovic","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/serverless-java-fn-project-first-steps.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/serverless-java-fn-project-first-steps.html"},"author":{"name":"Vladimir Dejanovic","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/0ded5f422600c2737122fef49586f3a6"},"headline":"Serverless, Java and FN Project, first steps","datePublished":"2018-12-04T08:00:14+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/serverless-java-fn-project-first-steps.html"},"wordCount":1362,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/serverless-java-fn-project-first-steps.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/docker-logo.jpg","keywords":["Docker","Serverless"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2018\/12\/serverless-java-fn-project-first-steps.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/serverless-java-fn-project-first-steps.html","url":"https:\/\/www.javacodegeeks.com\/2018\/12\/serverless-java-fn-project-first-steps.html","name":"Serverless, Java and FN Project, first steps - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/serverless-java-fn-project-first-steps.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/serverless-java-fn-project-first-steps.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/docker-logo.jpg","datePublished":"2018-12-04T08:00:14+00:00","description":"Interested to learn about FN Project? Check our article focusing on FN Project an open source project backed by Oracle, which base functions on containers.","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/serverless-java-fn-project-first-steps.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2018\/12\/serverless-java-fn-project-first-steps.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/serverless-java-fn-project-first-steps.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/docker-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/docker-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/serverless-java-fn-project-first-steps.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Serverless, Java and FN Project, first steps"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/0ded5f422600c2737122fef49586f3a6","name":"Vladimir Dejanovic","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b7049cc64e7e12f61ea932269a37c49e17f1d213994de4efc47704d55892ff5d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b7049cc64e7e12f61ea932269a37c49e17f1d213994de4efc47704d55892ff5d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b7049cc64e7e12f61ea932269a37c49e17f1d213994de4efc47704d55892ff5d?s=96&d=mm&r=g","caption":"Vladimir Dejanovic"},"description":"IT Consultant, Software Architect, Team Lead and Chapter Lead working in industry since 2006 developing high performance software in multiple programming languages and technologies from desktop to mobile and web with high load traffic. Enjoining developing software mostly in Java and JavaScript, however also wrote fair share of code in Scala, C++, C, PHP, Go, Objective-C, Python, R, Lisp and many others.","sameAs":["http:\/\/itshark.xyz\/","https:\/\/www.linkedin.com\/pub\/vladimir-dejanovic\/4\/ba7\/885","https:\/\/x.com\/VladimirD_42"],"url":"https:\/\/www.javacodegeeks.com\/author\/vladimir-dejanovic"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/84154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/10620"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=84154"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/84154\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/24013"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=84154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=84154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=84154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}