<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Developerworld - Medium]]></title>
        <description><![CDATA[Learn to code, test and deploy. - Medium]]></description>
        <link>https://medium.com/developerworld?source=rss----2022e7d0a5a1---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Developerworld - Medium</title>
            <link>https://medium.com/developerworld?source=rss----2022e7d0a5a1---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 08:44:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/developerworld" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Overcoming Node failure for pods which can run only one replica on K8s]]></title>
            <link>https://medium.com/developerworld/overcoming-node-failure-for-pods-which-can-run-only-one-replica-on-k8s-31e8f2d617a7?source=rss----2022e7d0a5a1---4</link>
            <guid isPermaLink="false">https://medium.com/p/31e8f2d617a7</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Apoorw Anand]]></dc:creator>
            <pubDate>Sat, 12 Feb 2022 00:09:23 GMT</pubDate>
            <atom:updated>2022-02-12T00:26:51.069Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EJRhcQ-kyUKdZYGC" /></figure><p>Photo by <a href="https://unsplash.com/@carrier_lost?utm_source=medium&amp;utm_medium=referral">Ian Taylor</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></p><p>When a node goes offline, all pods on that node are terminated and new ones spun up on a healthy node.</p><p>The default time that it takes from a node being reported as <strong>not-ready </strong>to the pods being moved is 5 minutes.</p><p>This really isn’t a problem if you have multiple pods running under a single deployment. But sometimes we come across such an application which can run only one instance.The pods on the healthy nodes will handle any requests made whilst the pod(s) on the downed node are waiting to be moved.</p><p>The simplest way to adjust this is to add the following tolerations to your deployment.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/25dc2fd90ecffd6001dee63b4520c3d4/href">https://medium.com/media/25dc2fd90ecffd6001dee63b4520c3d4/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=31e8f2d617a7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/developerworld/overcoming-node-failure-for-pods-which-can-run-only-one-replica-on-k8s-31e8f2d617a7">Overcoming Node failure for pods which can run only one replica on K8s</a> was originally published in <a href="https://medium.com/developerworld">Developerworld</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting started with Helm on Openshift]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Kubernetes Operators with Helm in 5 steps!</p><p class="medium-feed-link"><a href="https://medium.com/developerworld/getting-started-with-helm-on-openshift-5521599f0d1b?source=rss----2022e7d0a5a1---4">Continue reading on Developerworld »</a></p></div>]]></description>
            <link>https://medium.com/developerworld/getting-started-with-helm-on-openshift-5521599f0d1b?source=rss----2022e7d0a5a1---4</link>
            <guid isPermaLink="false">https://medium.com/p/5521599f0d1b</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[helm]]></category>
            <category><![CDATA[openshift]]></category>
            <dc:creator><![CDATA[Apoorw Anand]]></dc:creator>
            <pubDate>Sun, 17 Nov 2019 07:04:03 GMT</pubDate>
            <atom:updated>2019-11-17T07:04:03.365Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Data Model for Popular Blogging Platform Ghost]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/developerworld/data-model-for-popular-blogging-platform-ghost-576a9ee63bc?source=rss----2022e7d0a5a1---4"><img src="https://cdn-images-1.medium.com/max/2177/1*7lDjX29yIOGsdbUDkFh7EQ.png" width="2177"></a></p><p class="medium-feed-snippet">Ghost is a fully open source, adaptable platform for building and running a modern online publication. We power blogs, magazines and&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/developerworld/data-model-for-popular-blogging-platform-ghost-576a9ee63bc?source=rss----2022e7d0a5a1---4">Continue reading on Developerworld »</a></p></div>]]></description>
            <link>https://medium.com/developerworld/data-model-for-popular-blogging-platform-ghost-576a9ee63bc?source=rss----2022e7d0a5a1---4</link>
            <guid isPermaLink="false">https://medium.com/p/576a9ee63bc</guid>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-modeling]]></category>
            <category><![CDATA[code]]></category>
            <dc:creator><![CDATA[Apoorw Anand]]></dc:creator>
            <pubDate>Sun, 03 Mar 2019 20:18:48 GMT</pubDate>
            <atom:updated>2019-03-03T20:18:48.186Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Pod vs Node in Kubernetes]]></title>
            <link>https://medium.com/developerworld/pod-vs-node-in-kubernetes-26c858988f94?source=rss----2022e7d0a5a1---4</link>
            <guid isPermaLink="false">https://medium.com/p/26c858988f94</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Apoorw Anand]]></dc:creator>
            <pubDate>Thu, 31 Jan 2019 18:42:54 GMT</pubDate>
            <atom:updated>2019-01-31T18:41:56.582Z</atom:updated>
            <content:encoded><![CDATA[<h3>Kubernetes Pods</h3><p>When you create a Deployment in Kubernetes creates a <strong>Pod</strong> to host your application instance.<strong> <em>A Pod is a Kubernetes abstraction that represents a group of one or more application containers (such as Docker or rkt), and some shared resources for those containers</em></strong>. Those resources include:</p><ul><li><strong>Shared storage, as Volumes</strong></li><li><strong>Networking, as a unique cluster IP address</strong></li><li><strong>Information about how to run each container, such as the container image version or specific ports to use</strong></li></ul><p>A Pod models an application-specific <em>“logical host”</em> and can contain different application containers which are relatively tightly coupled. For example, a Pod might include both the container with your Node.js app as well as a different container that feeds the data to be published by the Node.js webserver. The containers in a Pod share an IP Address and port space, are always co-located and co-scheduled, and run in a shared context on the same Node.</p><p>Pods are the atomic unit on the Kubernetes platform. When we create a Deployment on Kubernetes, that Deployment creates Pods with containers inside them (as opposed to creating containers directly). Each Pod is tied to the Node where it is scheduled, and remains there until termination (according to restart policy) or deletion. In case of a Node failure, identical Pods are scheduled on other available Nodes in the cluster.</p><blockquote>A Pod is a group of one or more application containers (such as Docker or rkt) and includes shared storage (volumes), IP address and information about how to run them.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*9EJSoqwpp-VpWedeqjwSvQ.png" /><figcaption>Pods</figcaption></figure><h3>Nodes</h3><blockquote>A Pod always runs on a <strong>Node</strong>. <em>A Node is a worker machine in Kubernetes and may be either a virtual or a physical machine, depending on the cluster. Each Node is managed by the Master</em>. <em>A Node can have multiple pods, and the Kubernetes master automatically handles scheduling the pods across the Nodes in the cluster.</em> The Master’s automatic scheduling takes into account the available resources on each Node.</blockquote><p>Every <strong>Kubernetes Node</strong> runs at least:</p><ul><li>Kubelet, a process responsible for communication between the Kubernetes Master and the Node; it manages the Pods and the containers running on a machine.</li><li>A container runtime (like Docker, rkt) responsible for pulling the container image from a registry, unpacking the container, and running the application.</li></ul><blockquote>Containers should only be scheduled together in a single Pod if they are tightly coupled and need to share resources such as disk.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/1*ySGpvUseuuJiMf9_o5jnTA.png" /><figcaption>Node Overview</figcaption></figure><p><em>If you want to Learn Kubernetes Interactively .Please visit the link.</em></p><p><a href="https://kubernetes.io/docs/tutorials/kubernetes-basics/explore/explore-interactive/"><em>https://kubernetes.io/docs/tutorials/kubernetes-basics/explore/explore-interactive/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26c858988f94" width="1" height="1" alt=""><hr><p><a href="https://medium.com/developerworld/pod-vs-node-in-kubernetes-26c858988f94">Pod vs Node in Kubernetes</a> was originally published in <a href="https://medium.com/developerworld">Developerworld</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sample Heap Dump for Analysis from Spring Boot Application]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/developerworld/sample-heap-dump-for-analysis-from-spring-boot-application-288266f6d8?source=rss----2022e7d0a5a1---4"><img src="https://cdn-images-1.medium.com/max/2178/1*3h06JKggeyXpxIrjKM4p0w.png" width="2178"></a></p><p class="medium-feed-snippet">Full thread dump OpenJDK 64-Bit Server VM (25.191-b12 mixed mode):</p><p class="medium-feed-link"><a href="https://medium.com/developerworld/sample-heap-dump-for-analysis-from-spring-boot-application-288266f6d8?source=rss----2022e7d0a5a1---4">Continue reading on Developerworld »</a></p></div>]]></description>
            <link>https://medium.com/developerworld/sample-heap-dump-for-analysis-from-spring-boot-application-288266f6d8?source=rss----2022e7d0a5a1---4</link>
            <guid isPermaLink="false">https://medium.com/p/288266f6d8</guid>
            <category><![CDATA[heapdump]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Apoorw Anand]]></dc:creator>
            <pubDate>Tue, 29 Jan 2019 19:09:24 GMT</pubDate>
            <atom:updated>2025-10-18T10:48:10.022Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[ActiveMQ JNDI Connection]]></title>
            <link>https://medium.com/developerworld/activemq-jndi-connection-f206be3c7d30?source=rss----2022e7d0a5a1---4</link>
            <guid isPermaLink="false">https://medium.com/p/f206be3c7d30</guid>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Apoorw Anand]]></dc:creator>
            <pubDate>Tue, 22 Jan 2019 22:09:26 GMT</pubDate>
            <atom:updated>2019-01-22T22:09:26.770Z</atom:updated>
            <content:encoded><![CDATA[<p>ActiveMQ will work with any JNDI provider capable of storing Java objects. However it is common to require a JNDI initial context to be able to run many JMS example programs, like <a href="http://java.sun.com/products/jms/tutorial/1_3_1-fcs/doc/jms_tutorialTOC.html">Sun’s JMS tutorial.</a></p><p><a href="http://activemq.apache.org/jndi-support.html">http://activemq.apache.org/jndi-support.html</a></p><p>Find the code on GIST</p><p><a href="https://gist.github.com/apoorvanand/ec696f7f3e7aaf70b9daada1af856e35">https://gist.github.com/apoorvanand/ec696f7f3e7aaf70b9daada1af856e35</a></p><p>So we provide a simple JNDI <strong>InitialContextFactory</strong> which can be used to lookup JMS connection factory objects as well as Destination objects. For example if you place this <a href="http://svn.apache.org/repos/asf/activemq/trunk/activemq-unit-tests/src/test/resources/jndi.properties">jndi.properties</a> file on your classpath, you can look inside the <strong>InitialContext</strong> and lookup <strong>ConnectionFactory</strong> objects and <strong>Destinations</strong> etc.</p><pre>java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory # Use the following property to configure the default connector java.naming.provider.url = vm://localhost # Use the following property to specify the JNDI name the connection factory # should appear as. #connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry # Register some queues in JNDI using the form: # queue.[jndiName] = [physicalName] queue.MyQueue = example.MyQueue # Register some topics in JNDI using the form: # topic.[jndiName] = [physicalName] topic.MyTopic = example.MyTopic</pre><p>You can edit the <strong>jndi.properties</strong> file to configure the <strong>ActiveMQConnectionFactory</strong>&#39;s properties such as <strong>brokerURL</strong> and whether or not there should be an embedded broker etc. See <a href="http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html">how to embed a broker in a connection</a> for more details.</p><h3>ActiveMQ JNDI Tutorial</h3><p>This is a quick one page tutorial on how to setup and use JNDI to create a connection to ActiveMQ. The first thing is ActiveMQ does not provide a full JNDI server. This means JMS clients need to use properties files to create a JNDI <strong>IntialContextFactory</strong>. If you need an example properties file, you can look the source distribution <a href="https://github.com/apache/activemq/blob/master/activemq-unit-tests/src/test/resources/jndi.properties">https://github.com/apache/activemq/blob/master/activemq-unit-tests/src/test/resources/jndi.properties</a>. Before we proceed, here are the properties.</p><p>NameValue</p><p>Make sure to add <strong>activemq-</strong><strong><em>&lt;version&gt;</em></strong><strong>.jar</strong> and <strong>spring-1.x.jar</strong> to your classpath. If the libraries are not in the classpath, you will get a <strong>ClassNotFoundException</strong> at runtime. If you get <strong>ClassNotFoundException</strong>, try printing out the classpath and check it is present. You can also run ActiveMQ with <strong>-verbose</strong> option to verify the jar was loaded correctly.</p><p><strong>Sample Code</strong></p><pre>// Create a new intial context, which loads from jndi.properties file: javax.naming.Context ctx = new javax.naming.InitialContext(); // Lookup the connection factory: javax.jms.TopicConnectionFactory factory = (javax.jms.TopicConnectionFactory)ctx.lookup(&quot;ConnectionFactory&quot;); // Create a new TopicConnection for pub/sub messaging: javax.jms.TopicConnection conn = factory.getTopicConnection(); // Lookup an existing topic: javax.jms.Topic mytopic = (javax.jms.Topic)ctx.lookup(&quot;MyTopic&quot;); // Create a new TopicSession for the client: javax.jms.TopicSession session = conn.createTopicSession(false,TopicSession.AUTO_ACKNOWLEDGE); // Create a new subscriber to receive messages: javax.jms.TopicSubscriber subscriber = session.createSubscriber(mytopic);```</pre><p>Notice the name of the topic in the sample is <strong>MyTopic</strong>. ActiveMQ will read the <strong>jndi.properties</strong> files and creates the topics and queues in a lazy fashion. The prefix topic and queue is stripped, so the JNDI name begins after the prefix.</p><p>Once you have the <strong>jndi.properties</strong> edited and ready, it needs to be accessible to your application. The easiest way is to add <strong>jndi.properties</strong> to a jar file. When <strong>new InitialContext()</strong> is called, it will scan the resources and find the file. If you get <strong>javax.naming.NamingException</strong>, it usually means the <strong>jndi.properties</strong> file is not accessible.</p><p>You can also try to create a new initial context using either an instance of properties file or a map. For example, the approach recommended by JMS specification will work just fine.</p><pre>Example Recommended by Specification javaProperties props = new Properties(); props.setProperty(Context.INITIAL_CONTEXT_FACTORY,&quot;org.apache.activemq.jndi.ActiveMQInitialContextFactory&quot;); props.setProperty(Context.PROVIDER_URL,&quot;tcp://hostname:61616&quot;); javax.naming.Context ctx = new InitialContext(props);||</pre><pre>If ActiveMQ is embedded within an EJB container, you will need to look at the containers documentation for the correct JNDI values.</pre><pre><strong>Dynamically Creating Destinations</strong></pre><pre>For the easiest possible configuration with JNDI based programs, there are two dynamic contexts, namely:</pre><ul><li><strong>dynamicQueues</strong></li><li><strong>dynamicTopics</strong></li></ul><pre>These allow you to lookup queues and topics using JNDI without any configuration.</pre><pre>For example, if you use the following name to lookup into JNDI:</pre><pre>dynamicQueues/FOO.BAR</pre><pre>you will get back an <strong>ActiveMQQueue</strong> of the name <strong>FOO.BAR</strong>. This can be very handy if you can easily reconfigure the JNDI name to use to lookup something in JNDI, but don&#39;t want to have to double configure a <strong>jndi.properties</strong> to match.</pre><pre><strong>Working With Embedded Brokers</strong></pre><pre>It is often useful to use an embedded broker in the same JVM as the JMS client. For this see <a href="http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html">How do I embed a Broker inside a Connection</a>.</pre><pre>If you want to use an embedded broker with your JNDI provider you can just use the <a href="http://activemq.apache.org/vm-transport-reference.html">VM Transport</a> to connect to the broker in your URL. e.g. to create a purely in JVM broker use this URI</pre><pre>vm://locahost</pre><pre>If you want to customize the broker use something like this:</pre><pre>vm:broker:(tcp://localhost:61616)</pre><pre>More options are available in the <a href="http://activemq.apache.org/vm-transport-reference.html">VM Transport Reference</a></pre><pre><strong>Example Java Code</strong></pre><pre>Once you have configured JNDI on the classpath you can run any normal JMS application such as the following <a href="http://svn.apache.org/repos/asf/incubator/activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/demo/SimpleProducer.java">example</a>. Notice that the Java code just uses pure JMS APIs and is not in any way ActiveMQ specific</pre><pre>java /** * The SimpleQueueSender class consists only of a main method, * which sends several messages to a queue. * * Run this program in conjunction with SimpleQueueReceiver. * Specify a queue name on the command line when you run the * program. By default, the program sends one message. Specify * a number after the queue name to send that number of messages. */ package org.apache.activemq.demo; import javax.jms.Connection; import javax.jms.ConnectionFactory; import javax.jms.Destination; import javax.jms.JMSException; import javax.jms.MessageProducer; import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * A simple polymorphic JMS producer which can work with Queues or Topics which * uses JNDI to lookup the JMS connection factory and destination. */ public final class SimpleProducer { private static final Logger LOG = LoggerFactory.getLogger(SimpleProducer.class); private SimpleProducer() {} /** * @param args the destination name to send to and optionally, the number of * messages to send */ public static void main(String[] args) { Context jndiContext; ConnectionFactory connectionFactory; Connection connection; Session session; Destination destination; MessageProducer producer; String destinationName; final int numMsgs; if ((args.length &lt; 1) || (args.length &gt; 2)) { LOG.info(&quot;Usage: java SimpleProducer  []&quot;); System.exit(1); } destinationName = args[0]; LOG.info(&quot;Destination name is &quot; + destinationName); if (args.length == 2) { numMsgs = (new Integer(args[1])).intValue(); } else { numMsgs = 1; } /* * Create a JNDI API InitialContext object */ try { jndiContext = new InitialContext(); } catch (NamingException e) { LOG.info(&quot;Could not create JNDI API context: &quot; + e.toString()); System.exit(1); } /* * Look up connection factory and destination. */ try { connectionFactory = (ConnectionFactory) jndiContext.lookup(&quot;ConnectionFactory&quot;); destination = (Destination) jndiContext.lookup(destinationName); } catch (NamingException e) { LOG.info(&quot;JNDI API lookup failed: &quot; + e); System.exit(1); } /* * Create connection. Create session from connection; false means * session is not transacted. Create sender and text message. Send * messages, varying text slightly. Send end-of-messages message. * Finally, close the connection. */ try { connection = connectionFactory.createConnection(); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); producer = session.createProducer(destination); TextMessage message = session.createTextMessage(); for (int i = 0; i &lt; numMsgs; i++) { message.setText(&quot;This is message &quot; + (i + 1)); LOG.info(&quot;Sending message: &quot; + message.getText()); producer.send(message); } /* * Send a non-text control message indicating end of messages. */ producer.send(session.createMessage()); } catch (JMSException e) { LOG.info(&quot;Exception occurred: &quot; + e); } finally { if (connection != null) { try { connection.close(); } catch (JMSException ignored) {} } } } }</pre><p><em>Originally published at </em><a href="https://apoorvanand.glitch.me/activemq-jndi-connection/"><em>apoorvanand.glitch.me</em></a><em> on January 22, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f206be3c7d30" width="1" height="1" alt=""><hr><p><a href="https://medium.com/developerworld/activemq-jndi-connection-f206be3c7d30">ActiveMQ JNDI Connection</a> was originally published in <a href="https://medium.com/developerworld">Developerworld</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Difference Between SOAP and REST web services]]></title>
            <link>https://medium.com/developerworld/difference-between-soap-and-rest-web-services-97125f8ebf31?source=rss----2022e7d0a5a1---4</link>
            <guid isPermaLink="false">https://medium.com/p/97125f8ebf31</guid>
            <category><![CDATA[rest]]></category>
            <category><![CDATA[java-webservices]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Apoorw Anand]]></dc:creator>
            <pubDate>Sun, 18 Nov 2018 17:48:26 GMT</pubDate>
            <atom:updated>2018-11-18T17:47:16.215Z</atom:updated>
            <content:encoded><![CDATA[<p>Origin</p><p>SOAP (Simple Object Access Protocol) was created in 1998 by Dave Winer et al. in collaboration with Microsoft. Developed by a large software company, this protocol addresses the goal of addressing the needs of the enterprise market .</p><p>REST (Representational State Transfer) was created in 2000 by Roy Fielding at UC, Irvine. Developed in an academic environment, this protocol embraces the philosophy of the open Web.</p><p>Basic Concept</p><p>Makes data available as services (verb + noun), for example “getUser” or “PayInvoice”</p><p>Makes data available as resources (nouns), for example “user” or “invoice”</p><p>Pros</p><p>Follows a formal enterprise approach</p><p>Works on top of any communication protocol, even asynchronously</p><p>Information about objects is communicated to clients.</p><p>Security and authorization are part of the protocol.</p><p>Can be fully described using WSDL</p><p>Follows the philosophy of the Open Web</p><p>Relatively easy to implement and maintain</p><p>Clearly separates client and server implementations</p><p>Communication isn’t controlled by a single entity</p><p>Information can be stored by the client to prevent multiple calls.</p><p>Can return data in multiple formats (JSON, XML etc.)</p><p>Cons</p><p>Spends a lot of bandwidth communicating metadata</p><p>Hard to implement and is unpopular among Web and mobile developers</p><p>Only works on top of the HTTP protocol</p><p>Hard to enforce authorization and security on top of it</p><p>When to use</p><p>When clients need to have access to objects available on servers</p><p>When you want to enforce a formal contract between client and server</p><p>When clients and servers operate on a Web environment</p><p>When information about objects doesn’t need to be communicated to the client</p><p>When not to use</p><p>When you want the majority of developers to easily use your API</p><p>When your bandwidth is very limited</p><p>When you need to enforce a strict contract between client and server</p><p>When performing transactions that involve multiple calls</p><p>Use cases</p><p>Financial services</p><p>Payment gateways</p><p>Telecommunication services</p><p>Social media services</p><p>Social networks</p><p>Web chat services</p><p>Mobile services</p><p>Examples</p><p><a href="https://www.salesforce.com/developer/docs/api/">https://www.salesforce.com/developer/docs/api/ </a>— Salesforce SOAP API</p><p><a href="https://developer.paypal.com/docs/classic/api/PayPalSOAPAPIArchitecture/">https://developer.paypal.com/docs/classic/api/PayPalSOAPAPIArchitecture/ </a>-Paypal SOAP API</p><p><a href="https://dev.twitter.com/">https://dev.twitter.com/</a></p><p><a href="https://developer.linkedin.com/apis">https://developer.linkedin.com/apis</a></p><p>Conclusion</p><p>Use SOAP if you are dealing with transactional operations and you already have an audience that is satisfied with this technology.</p><p>Use REST if you’re focused on wide-scale API adoption or if your API is targeted at mobile apps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/160/0*d0dHsOgTgDHSgPaQ" /></figure><p>Note : This article has been taken from Pro RESTful APIs, 10.1007/978–1–4842–2665–0_1 By Sanjay Patni under license from SafariBooksOnline.</p><p>Responsive table Gist</p><p><a href="https://gist.github.com/apoorvanand/2f006021c94e1f1064982442d3b00a1f">https://gist.github.com/apoorvanand/2f006021c94e1f1064982442d3b00a1f</a></p><p>Embedded Gist</p><p><a href="https://gist.github.com/apoorvanand/2f006021c94e1f1064982442d3b00a1f.js">https://gist.github.com/apoorvanand/2f006021c94e1f1064982442d3b00a1f.js</a></p><p><em>Originally published at </em><a href="https://apoorvanand.glitch.me/difference-between-soap-and-rest-web-services/"><em>apoorvanand.glitch.me</em></a><em> on November 18, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97125f8ebf31" width="1" height="1" alt=""><hr><p><a href="https://medium.com/developerworld/difference-between-soap-and-rest-web-services-97125f8ebf31">Difference Between SOAP and REST web services</a> was originally published in <a href="https://medium.com/developerworld">Developerworld</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started: Composing Serverless Functions with Fission Workflows (Part 2)]]></title>
            <link>https://medium.com/developerworld/getting-started-composing-serverless-functions-with-fission-workflows-part-2-49ca86017514?source=rss----2022e7d0a5a1---4</link>
            <guid isPermaLink="false">https://medium.com/p/49ca86017514</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[serverless]]></category>
            <dc:creator><![CDATA[Developer world]]></dc:creator>
            <pubDate>Thu, 26 Jul 2018 12:57:19 GMT</pubDate>
            <atom:updated>2018-07-26T12:57:27.727Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is the second half of a 2-part introduction to Fission Workflows.</em></p><p>In <a href="https://blog.fission.io/posts/fission-workflows-pt-1/"><strong>Part One</strong></a> of this series, we talked about the concepts around Fission Workflows, how to create them, as well as a few demos of use cases in which you might use them.</p><p>So we’ve gone over what workflows are, along with when, and how to execute them. In this blog post we’ll dive deeper, breaking down each component that makes up the fabric of workflows, and what make workflows so efficient.</p><p>Workflows is designed to be fault-tolerant, high performance, and easy to deploy and operate on Kubernetes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/0*j7-KMOvWSgoKoNQA.png" /></figure><h3>API</h3><p>The API is the central component of the Fission Workflow system. It is responsible for exposing all actionable aspects of the system. The API is the only component that deals with appending events to the event stores.</p><h3>Event Store</h3><p>Actions taken by the API result in most cases in events that update the state of a workflow, workflow invocation or function invocation. The event store is an append-only database or data store that ensures persistent storage of the events.</p><h3>NATS</h3><p>Currently, the message system NATS Streaming is used as the underlying event store, as it is fast, offers PubSub functionality, allows for persistence and replays. The interface for the event store is minimal, consisting of APPEND, GET, LIST, WATCH, allowing for easy integration with other data stores if needed.</p><h3>Controller</h3><p>The controller is the ‘engine’ in the workflow engine. It keeps track of current invocations, queries the scheduler, and executes the instructions of the scheduler for these invocations.</p><h3>Scheduler</h3><p>Where the controller is the heart of the workflow system, the scheduler is the brains. When the controller invokes the scheduler for a specific invocation, the scheduler evaluates the current state of invocation. Based on this data and potentially other data sources, such as historical data, it creates a scheduling plan. This scheduling plan contains actions that need to be taken by the controller, such as (re)invoking a function or aborting the workflow invocation all together. The scheduler is completely stateless, so the controller can at any time request a (re)evaluation if needed.</p><h3>Fission</h3><p>The workflow engine uses Fission as the underlying <em>‘function execution layer’</em>. Using the Fission Proxy, Fission is able to treat the workflows as just another Fission function, and treat the workflow engine as just another environment.</p><h3>Walking Through the Lifecycle of a Workflow</h3><ul><li>The user defines a workflow definition in the YAML data format.</li><li>The user uploads the workflow to the Fission function storage, like any other function.</li><li>The workflow is parsed and validated to the internal format.</li><li>The workflow is triggered, for example by an user sending a request to a specific HTTP endpoint.</li><li>Fission specializes the workflow engine with the relevant workflow, just like any other environment.</li><li>After specializing, the request creates a workflow invocation in the workflow engine.</li><li>The controller picks up the new workflow invocation, and requests a execution plan from the scheduler.</li><li>The scheduler determines the optimal planning for the workflow invocation, and returns it to the controller.</li><li>The controller executes the execution plan of the workflow invocation, performing (Fission) function calls.</li><li>The results of these function calls arrive as events into the event queue, which again trigger the controller to evaluate the invocation.</li><li>This process continues until all tasks have succeeded or an unhandled error has occurred.</li><li>In case of a synchronous invocation, the resulting output of the workflow invocation is returned to the user.</li></ul><p>A rather important characteristic of Fission Workflows is the requirement to be fast. This uncommon property in traditional workflow engines, which often are focused purely on throughput rather than latency of individual invocations. With “serverless workflows” the latency becomes one of the most important metrics.</p><p>At its core the workflow engine makes use of the high-performance NATS streaming message queue to store the events. Throughout the system a reactive paradigm is used to ensure fast handling of incoming events.</p><p>Traditional workflow engines create extensive executions plans, attempting to optimally consume the available resources. In contrast, with serverless workflows, it is more important for the scheduler to come to a decision fast. There is a trade-off between being fast and being correct. The scheduler in the Fission Workflows system focuses on speed by limiting its scheduling to only schedule in the short term. With the highly dynamic and on-demand nature of serverless computing, creating long term plans does not weigh against the scheduling effort.</p><p>Finally, Fission Workflows has a modular structure. The system can be striped to be solely consist of the bare-minimum components needed to manage the workflows.</p><h3>Why it’s scalable</h3><p>From a distributed systems perspectives FaaS is an interesting notion, as the the the serverless functions have useful properties such as being short-lived, stateless and on-demand. This allows the infrastructure to have far more control over the lifecycle of the functions. For workflows of these functions similar properties hold.</p><h3>Why it’s fault-tolerant</h3><p>A main benefit over other ways to compose functions, such as using a message queue or using a coordinating function, is that workflow engines are capable of providing better fault-tolerance. This is enabled by the explicit dependency structure and the centralized orchestration of the workflow.</p><p>Instead of storing the state and having to deal with keeping the state up to date and safe, we store the operations instead. Every event related to the workflows is stored in the event store. The state is created by applying the events to some materialized view. This also allows the workflow engine to reconstruct its state from the stored events. This allows the workflow engines to go down or temporary unavailable without losing state.</p><p>Although Fission Workflows is mainly event-driven to keep the latency low, there are always cases in which events are not propagated through the system. This can have various causes, such as network unavailability, resource constraints, or long-tail latencies. For this reason the workflow engine at its core is a control system. It utilizes a control loop, in which it periodically checks the various caches and the event store for any untracked or unfinished workflow invocations.</p><h3>How it’s extensible</h3><p>In contrast to other vendor-specific workflow engines, Fission Workflows has been designed from the ground up to be open for extensibility. The main aim of the system is to avoid any form of hard-coded functionality or differences in functionality between the system and the users.</p><p>Instead of offering a limited set of control flow structs Fission Workflows exposes the concept of dynamic tasks; tasks that return a task themselves. This concept allows users to treat tasks as data. This opens up a wide range of possibilities for the user to alter the static control flow in the workflow invocation. Although Fission Workflows offers some useful dynamic tasks, such as if-conditions, switches and for-loops, there is nothing special about these tasks. Users can use the same API to define their own dynamic tasks.</p><p>In most workflow systems the predefined control flow structs have a privileged execution environment by executing those within the workflow engine. User-defined functions do not have that same privilege and can therefore never attain the same characteristics, like performance, as the privileged functions. In Fission Workflows there is also the concept of an internal execution environment, allowing functions to be executed within the workflow engine. However, this environment is just like any other function execution runtime, allowing users to create their own internal functions.</p><p>Also, the query language, a JavaScript interpreter, is like the internal functions, easy to extend. Here too, there are some predefined query functions, but they make use of the public API as any other function.</p><p>Fission Workflows is the only open source serverless workflow framework on Kubernetes. However, the concept of workflows is not new at all, and has precedent in scientific data processing, data analytics pipelines, and infrastructure/devops automation.</p><p>AWS Step Functions and Azure Logic Apps are most similar in terms of the intended workloads and use cases. However, unlike Fission Workflows, these serverless workflow engines are vendor-specific, closed source, and limited in extensibility.</p><p>Data processing workflow engines, such as Luigi and Apache Airflow, have been popular in their field and are relatively mature. The focus of these workflow engines is on efficiently processing of batches of data efficiently, with little regard for latency. Nor do these systems make use of the cloud native paradigm.</p><p>From the academic world, <a href="https://pegasus.isi.edu/">Pegasus</a> and <a href="https://rise.cs.berkeley.edu/blog/serverless-scientific-computing/">Pywren</a>, focus on huge scientific workflows. These types of workflows, and engines, typically run infrequently, which prevents any historical-based optimizations.</p><h3>Roadmap</h3><p><strong><em>Here are a few additional features that we’re working on to enhance workflows!</em></strong></p><ul><li><strong>Programming Workflows:</strong> A Python library that allows users to generate workflows by just writing code and feeding it to a parser.</li><li><strong>GUI/Visualization:</strong> A visualization tool that allows users to see the status of the workflows and see the execution visually of a workflow invocation.</li></ul><p>To learn more about Fission Workflows and other function composition styles, you can check us out at <a href="https://kccnceu18.sched.com/event/Dqvm/function-composition-in-a-serverless-world-erwin-van-eyk-timirah-james-platform9-intermediate-skill-level?iframe=no">KubeConEU this year in Copenhagen, Denmark</a>! Come attend our talk <strong><em>“Function Composition in a Serverless World”</em></strong></p><p><em>Originally published at </em><a href="https://blog.fission.io/posts/fission-workflows-pt-2/"><em>blog.fission.io</em></a><em> on April 5, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49ca86017514" width="1" height="1" alt=""><hr><p><a href="https://medium.com/developerworld/getting-started-composing-serverless-functions-with-fission-workflows-part-2-49ca86017514">Getting Started: Composing Serverless Functions with Fission Workflows (Part 2)</a> was originally published in <a href="https://medium.com/developerworld">Developerworld</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started: Composing Serverless Functions with Fission Workflows (Part 1)]]></title>
            <link>https://medium.com/developerworld/getting-started-composing-serverless-functions-with-fission-workflows-part-1-87cac3d93037?source=rss----2022e7d0a5a1---4</link>
            <guid isPermaLink="false">https://medium.com/p/87cac3d93037</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[serverless]]></category>
            <dc:creator><![CDATA[Developer world]]></dc:creator>
            <pubDate>Thu, 26 Jul 2018 12:50:35 GMT</pubDate>
            <atom:updated>2018-07-26T12:59:24.338Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is the first of a 2-part introduction to Fission Workflows.</em></p><p>Fission provides fast serverless functions on Kubernetes. While functions are great for specific pieces of business logic, any non-trivial application requires a composition of functions.</p><p>There are many ways to compose functions. You can directly call functions from each other — but there are some disadvantages to this. For one, the structure of the application becomes hard to understand; dependencies are not obvious; essentially, every function becomes an API. Second, there’s no persistent state; if there’s a failure or exception and you want to retry, the whole function must run again.</p><p>Alternatively, you can wire up a set of functions using message queues to send the output of one function to a message topic that triggers another function. While this helps with persistence and retries (because you can retry individual functions rather than the whole composition), it doesn’t help at all with making the system easier to understand. It’s also hard to replicate any dynamic control flow (such as an if statement or a loop).</p><h3>Workflows</h3><p>A third way to compose Fission functions is using <strong><em>workflows</em></strong>. Think of a flowchart: a sequence of tasks, decisions, loops and so on. A flowchart makes the structure of a complex task obvious.</p><p>Workflows are like flowcharts for serverless functions, except they’re more powerful. You can compose together functions in sequence or in parallel, send the output of a function to the inputs of another, write if statements, loops, and even functions that operate on other functions.</p><h3>Use cases, Demos, Examples</h3><p>Broadly we see a few areas where workflows are useful:</p><ul><li><strong>Devops automation use cases</strong></li><li><strong>Data processing use cases</strong></li><li><strong>Business process automation</strong></li></ul><h3>Demos</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*qdP_4TB0bzNDmH5-.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/0*bCg26IREnC7vAZUB.png" /></figure><p><a href="https://github.com/fission/fission-workflows/tree/master/examples"><strong><em>Find more cool demos/examples of apps built using Fission Workflows here</em></strong></a>.</p><h3>Terminology/Concepts</h3><p>Here are a few terms and concepts that you should know in order to better understand workflows.</p><p>A <strong><em>Task</em></strong> is a unit of computation within a workflow. Most commonly, it is a function call. It takes in data input and outputs the resulting data or error. A task can specify its input using a Javascript expression; this allows inline transformations of data from the output of other tasks. A workflow is defined as a list of tasks.</p><p><em>A task can have a </em><strong><em>dependency</em></strong><em> on one or more other tasks. With dependencies you can manipulate the control flow within a workflow.</em></p><p>A <strong><em>Dynamic Task</em></strong> can manipulate control flow. For example, it could be an if-statement, a loop, etc. A dynamic task is just a regular task that returns another task instead of data. Users can extend workflows by writing their own dynamic tasks.</p><p><em>Control flow constructs</em> are available as dynamic tasks. For example, an “if” dynamic task checks the value of an expression and executes one of two tasks given to it.</p><p>Workflows themselves are Fission functions — this allows workflows to be triggered the same way as any other function.</p><p>Workflows are specified in <strong><em>YAML</em></strong>.</p><p><em>Below is an example of the specifications of a workflow, from the Slack Weather application, in YAML.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/0*Rf5lMyDR54Rd2vD2.png" /></figure><h3>Rationale: Code or Data?</h3><p>Should a workflow be specified as code or data? Code provides more flexibility: why would anyone want to write an if-statement in YAML?</p><p>However, writing a workflow as a data structure does have two big advantages:</p><ul><li><strong><em>Analyzability</em></strong>: Arbitrary code is hard to analyze. But if a workflow is a data structure, the system can analyze it and reason about it as a whole. For example, it knows up-front what set of functions make up the workflow — which makes things like upgrades much easier.</li><li><strong><em>Usability</em></strong>: You can make a workflow without doing any coding at all. Along with the fission function library, this opens up the usage of serverless functions to a large set of people who aren’t comfortable writing large amounts of complex code.</li></ul><p>We went with something of a hybrid. Though the workflow definition is a static list of tasks, there are two dynamic properties in workflows:</p><ol><li><strong>Inputs to tasks are specified as Javascript expressions</strong></li></ol><p><strong>2. Dynamic tasks. Fission comes with loops, conditionals, and the map function built-in. Users can also define their own dynamic tasks.</strong></p><p>We think this approach is the best of both worlds: we get the advantages of workflows-as-data, but with a lot more flexibility than simple static workflows.</p><p>Stay tuned for <a href="https://blog.fission.io/posts/fission-workflows-pt-2/"><strong>Part 2</strong></a> of this post, as we dive deeper into the potential of Fission Workflows, what implementation looks like, and how it makes serverless application development that much easier.</p><p><em>In the meantime, feel free to </em><a href="https://fission.io/community/"><strong><em>join the Fission community</em></strong></a><em>!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87cac3d93037" width="1" height="1" alt=""><hr><p><a href="https://medium.com/developerworld/getting-started-composing-serverless-functions-with-fission-workflows-part-1-87cac3d93037">Getting Started: Composing Serverless Functions with Fission Workflows (Part 1)</a> was originally published in <a href="https://medium.com/developerworld">Developerworld</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating Lambda Functions]]></title>
            <link>https://medium.com/developerworld/creating-lambda-functions-d9c97bfcdadd?source=rss----2022e7d0a5a1---4</link>
            <guid isPermaLink="false">https://medium.com/p/d9c97bfcdadd</guid>
            <category><![CDATA[serverless-architecture]]></category>
            <category><![CDATA[projects]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[serverless]]></category>
            <dc:creator><![CDATA[Developer world]]></dc:creator>
            <pubDate>Sat, 07 Jul 2018 13:26:50 GMT</pubDate>
            <atom:updated>2018-07-07T13:51:10.389Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dTP1w-I_dAf7MCwf" /><figcaption>Photo by <a href="https://unsplash.com/@markusspiske?utm_source=medium&amp;utm_medium=referral">Markus Spiske</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>In this Tutorial we are going to build a<em> lambda function</em> to process log files<em>.</em></blockquote><blockquote>This function will be triggered when a new log file is added to an <strong>S3</strong> bucket and the result of the Lambda function is to create an<strong> SNS </strong>notification if there is an error in the file</blockquote><ol><li>Browse the following link: <a href="https://console.aws.amazon.com/lambda">https://console.aws.amazon.com/lambda</a>. Select <strong>Get Started Now</strong> to start creating a new function:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*54Wg3RdwBRqn-iFgJIiU1A.png" /></figure><p>2.<strong> AWS</strong> offers many templates with sample configuration and code. For example, you could use a template of a<strong> Lambda function </strong>that processes bounced e-mails. This option is interesting for marketing campaigns to remove e-mail addresses that don’t exist. However, in this example, we will select a <strong><em>Blank Function</em></strong> template:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2QoVgUvVbp_RsbnmTK4aLQ.png" /></figure><p><strong>3. A Lambda </strong>function can be triggered by many different sources. In the next screen, you will see a list of all available options. Select <strong>S3</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*kxCAyvSUz4VqavwAEsO8sA.png" /></figure><p>4. After selecting <strong>S3</strong>, you will be presented with some configuration options. Select the bucket that we have created previously with the<strong> CLI</strong>. For the <strong>Event type</strong>, select <strong>Object Created (All)</strong> to trigger the function whenever a new file is created. For <strong>Prefix</strong>, type logs/ to consider only files in the logs folder and in the <strong>Suffix</strong>, type <strong>txt</strong> to consider only text files. Finally, check the <strong>Enable trigger</strong> option and click on Next:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*gpzV1gPKbab7IzRBAEF5Dw.png" /></figure><p>5. Type a name for your Lambda function, for example, <strong>processLog</strong>, and select the<strong> </strong><strong>Node.js 6.10</strong> option for Runtime:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*KC_cxleeME79vFLaIQ8Hrg.png" /></figure><p>6. Now we need to implement the code that will be executed by the Lambda function using the <strong>Edit code inline</strong>option. In this example, we are using S3.getObject to retrieve the file created and SNS.publish to create a notification if there is the error word in this file. For the SNS topic ARN, you can use the same that was previously created with the CLI:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/84056b980e16d4d529b4f584aeacc22d/href">https://medium.com/media/84056b980e16d4d529b4f584aeacc22d/href</a></iframe><p>7. As we have used the inline option to write the code instead of uploading a ZIP file, the code will be placed inside an index.js file. Also, the module that we have created exports a function named handler. In this case, we need to configure the Lambda handler with the index.handler name. For the <strong>Role</strong> box, we need to create a new one because a Lambda function can&#39;t execute without proper access. Even if you create a Lambda using an administrator account, you must give explicit permissions for which kind of services and resources the Lambda will be able to access:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*ImbG-9UTxffdDFAUnnEg0A.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/890c670a24103adfb2530a1d51dafd6d/href">https://medium.com/media/890c670a24103adfb2530a1d51dafd6d/href</a></iframe><p>8. Type a role name for this role and click on <strong>Edit</strong> to modify the default policy document. Add the following JSON object and finish by clicking on <strong>Allow:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*k7WNy8tSU0_ipai0P-mkCg.png" /></figure><p>9. The last step is to configure the <strong>Advanced settings</strong>. Set the amount of RAM memory that should be allocated for this function and the timeout value that AWS must wait for this function to finish its execution. You may need to increase the timeout value depending on the size of the log files that you are going to use for testing:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*w_bmprTFFiw39-1iTOPHAg.png" /></figure><p>10. Click on <strong>Next</strong> and you will be redirected to a <strong>Review</strong> page where you need to confirm the function creation</p><p>11. To test this function, we can use the Management Console, which lets us create custom input events, but, in this case, we can use the CLI to upload a new file and trigger the Lambda function. If the file has the word “error”, you should receive an e-mail message with the file name</p><blockquote><strong><em>aws s3 cp log1.txt s3://my-bucket-name/logs/</em></strong></blockquote><p>12. If you have any issues, you can try using the Management Console to see the error message that appears. In this case, use the following JSON object as the event trigger, replacing the bucket name</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/60a20ec46240f9b510d7fc3952aea9a0/href">https://medium.com/media/60a20ec46240f9b510d7fc3952aea9a0/href</a></iframe><p>Follow the next story</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9c97bfcdadd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/developerworld/creating-lambda-functions-d9c97bfcdadd">Creating Lambda Functions</a> was originally published in <a href="https://medium.com/developerworld">Developerworld</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>