<?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[Stories by cupofcode on Medium]]></title>
        <description><![CDATA[Stories by cupofcode on Medium]]></description>
        <link>https://medium.com/@cup_of_code?source=rss-de1e4e53920------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*2xurPBNZQTCAXJaibCBQLw.png</url>
            <title>Stories by cupofcode on Medium</title>
            <link>https://medium.com/@cup_of_code?source=rss-de1e4e53920------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 11:11:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cup_of_code/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Wicket 10.1 on Embedded Undertow 2.3.15]]></title>
            <link>https://medium.com/@cup_of_code/wicket-10-1-on-embedded-undertow-2-3-15-7ea87a776ed4?source=rss-de1e4e53920------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ea87a776ed4</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[wicket]]></category>
            <category><![CDATA[undertow]]></category>
            <dc:creator><![CDATA[cupofcode]]></dc:creator>
            <pubDate>Wed, 31 Jul 2024 01:03:11 GMT</pubDate>
            <atom:updated>2024-07-31T01:03:11.092Z</atom:updated>
            <content:encoded><![CDATA[<p>Often times we want to build web applications but don’t want to deploy them on a standard Servlet container server such as Tomcat. I had to go through the process of figuring out how to run a Wicket 10.1 application on an embedded Undertow server and I need to record the process so here it is for anyone who want’s to do the same.</p><ol><li>I used the <a href="https://wicket.apache.org/start/quickstart.html">Wicket quick start page</a> to produce the Maven command to create the application.</li><li>In the pom.xml I removed all references to Jetty, and then changed the packaging property from “war” to “jar”.</li><li>Added Undertow property in the property section, and then the following dependencies.</li></ol><pre>&lt;undertow.version&gt;2.3.15.Final&lt;/undertow.version&gt;<br>...<br>&lt;!-- https://mvnrepository.com/artifact/io.undertow/undertow-core --&gt;<br>&lt;dependency&gt;<br> &lt;groupId&gt;io.undertow&lt;/groupId&gt;<br> &lt;artifactId&gt;undertow-core&lt;/artifactId&gt;<br> &lt;version&gt;${undertow.version}&lt;/version&gt;<br>&lt;/dependency&gt;<br>&lt;!-- https://mvnrepository.com/artifact/io.undertow/undertow-servlet --&gt;<br>&lt;dependency&gt;<br> &lt;groupId&gt;io.undertow&lt;/groupId&gt;<br> &lt;artifactId&gt;undertow-servlet&lt;/artifactId&gt;<br> &lt;version&gt;${undertow.version}&lt;/version&gt;<br>&lt;/dependency&gt;</pre><p>4. Next I added the maven-assembly-plugin with the main class which I intend to create shortly.</p><pre>&lt;plugin&gt;<br>    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;<br>    &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;<br>    &lt;executions&gt;<br>     &lt;execution&gt;<br>      &lt;phase&gt;package&lt;/phase&gt;<br>      &lt;goals&gt;<br>       &lt;goal&gt;single&lt;/goal&gt;<br>      &lt;/goals&gt;<br>      &lt;configuration&gt;<br>       &lt;archive&gt;<br>        &lt;manifest&gt;<br>         &lt;mainClass&gt;com.lehman.test.WicketMainApp&lt;/mainClass&gt;<br>        &lt;/manifest&gt;<br>       &lt;/archive&gt;<br>       &lt;descriptorRefs&gt;<br>        &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;<br>       &lt;/descriptorRefs&gt;<br>      &lt;/configuration&gt;<br>     &lt;/execution&gt;<br>    &lt;/executions&gt;<br>   &lt;/plugin&gt;</pre><p>5. In the src/main/resources directory create a new directory called “static-web-resources”. After that copy the logo.png and style.css from the “webapp” directory into the new “static-web-resources” directory. Since this is packaged as a Jar now, I moved these into the resource directory. Any other static files to be served should go here now.</p><p>6. Delete the Start and TestHomePage classes in src/test/java&lt;pkg&gt; directory and also delete the src/test/java/jetty directory as it’s not needed.</p><p>7. Now in your main code directory (com.lehman.test in this case) create a new Java class called “WicketMainApp” with the following:</p><pre>public class WicketMainApp {<br>    public static boolean DEV_MODE = true;<br><br>    public WicketMainApp() { }<br><br>    public void run() throws ServletException {<br>        // Wicket servlet config.<br>        ServletInfo si = Servlets.servlet(WicketServlet.class);<br>        si.addInitParam(ContextParamWebApplicationFactory.APP_CLASS_PARAM, WicketApplication.class.getName());<br>        si.addInitParam(WicketFilter.FILTER_MAPPING_PARAM, &quot;/*&quot;);<br>        si.addMapping(&quot;/*&quot;);<br>        if(!DEV_MODE) {<br>            si.addInitParam(&quot;wicket.configuration&quot;, &quot;deployment&quot;);<br>        }<br><br>        // The default servlet used to serve plain resource files from<br>        // the static-web-resources directory.<br>        Servlets.servlet(&quot;default&quot;, DefaultServlet.class)<br>                .addInitParam(DefaultServlet.DIRECTORY_LISTING, &quot;true&quot;)<br>                .addInitParam(DefaultServlet.DEFAULT_ALLOWED, &quot;true&quot;)<br>                .addInitParam(DefaultServlet.ALLOW_POST, &quot;false&quot;)<br>                .addInitParam(DefaultServlet.RESOLVE_AGAINST_CONTEXT_ROOT, &quot;true&quot;);<br><br>        // Deployment info object.<br>        DeploymentInfo servletBuilder = Servlets.deployment()<br>                .setClassLoader(WicketMainApp.class.getClassLoader())<br>                .setContextPath(&quot;/&quot;)<br>                .setDeploymentName(&quot;WicketMainApp.war&quot;)<br>                .addServlets(si)<br>                .setResourceManager(new ClassPathResourceManager(WicketMainApp.class.getClassLoader(), &quot;static-web-resources/&quot;));<br><br>        DeploymentManager manager = Servlets.defaultContainer().addDeployment(servletBuilder);<br>        manager.deploy();<br>        PathHandler path = Handlers.path(Handlers.redirect(&quot;/&quot;)).addPrefixPath(&quot;/&quot;, manager.start());<br><br>        Undertow server = Undertow.builder()<br>                .addHttpListener(8080, &quot;localhost&quot;)<br>                .setHandler(path)<br>                .build();<br>        server.start();<br>    }<br><br>    public static void main(String[] args) throws ServletException {<br>        WicketMainApp app = new WicketMainApp();<br>        app.run();<br>    }<br>}</pre><p>8. Everything is finally complete. You can now build and start the server.</p><pre>$ mvn clean package<br>$ java -jar target/wicket-undertow-example-1.0-SNAPSHOT-jar-with-dependencies.jar</pre><p>The app should now be up and running on localhost:8080 and you can also just run the WicketMainApp from your favorite IDE also. If you want to see the full working app, check it out <a href="https://gitlab.com/cupofcode/wicket-undertow-example">here on Gitlab</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ea87a776ed4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A New Mule 4 Transform — The Cali-Lang Connector]]></title>
            <link>https://medium.com/@cup_of_code/a-new-mule-4-transform-the-cali-lang-connector-548d65644532?source=rss-de1e4e53920------2</link>
            <guid isPermaLink="false">https://medium.com/p/548d65644532</guid>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[mule]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[cupofcode]]></dc:creator>
            <pubDate>Mon, 10 Oct 2022 05:24:07 GMT</pubDate>
            <atom:updated>2022-10-10T05:24:07.154Z</atom:updated>
            <content:encoded><![CDATA[<h3>A New Mule 4 Transform — The Cali-Lang Connector</h3><p>If you use Mule 4 and are interested in or curious about a different scripting language for use in your transforms, read on. Perhaps you aren’t in love with functional programming, or you would rather use a language that’s similar to common languages such as Java, C/C++ or Python. Give Cali-Lang a try. It’s an object oriented interpreted scripting language which runs in the JVM. There is a new Mule 4 connector available which provides the Cali interpreter for transforms.</p><h4>I want to see the details!</h4><p>If you want to see the specifics about Cali-Lang and the mule connector then here are the links.</p><ul><li><a href="https://github.com/rsv-code/cali-lang-mule-connector">cali-lang-mule-connector</a> — the mule connector</li><li><a href="https://github.com/rsv-code/calilangmuletest">calilangmuletest</a> — a demo app to try</li><li><a href="https://github.com/cali-lang/cali.lang.base">cali.lang.base wiki</a> — language details</li></ul><h4>How is Cali different from Dataweave?</h4><p>It’s completely different in almost every way, however it’s similar in that it is a light weight scripting language which is well suited for data manipulation and transforms. Cali-Lang is object oriented, similar to Java and C++ you use objects. You can use common items such as enumerations, for/foreach/while loops, try/catch blocks, and if/else statements that don’t require the dangling else. Some of the biggest differences are that you can make logging calls as your code runs for debugging and you can store state in variables just like other imperative languages.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=548d65644532" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Village Trade Network — A new Internet]]></title>
            <link>https://medium.com/@cup_of_code/village-trade-network-a-new-internet-6fa6852849fb?source=rss-de1e4e53920------2</link>
            <guid isPermaLink="false">https://medium.com/p/6fa6852849fb</guid>
            <category><![CDATA[computer-networking]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[internet]]></category>
            <dc:creator><![CDATA[cupofcode]]></dc:creator>
            <pubDate>Sat, 09 Jul 2022 06:29:58 GMT</pubDate>
            <atom:updated>2022-07-09T06:29:58.312Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iNkj6zK_WndzMBQZkkw0SA.jpeg" /></figure><h3>Village Trade Network — A new Internet</h3><p>In a previous article <a href="https://medium.com/@cup_of_code/a-new-type-of-internet-4b392b7cf7f1">A New Type of Internet</a> I speak about some of the major issues in the existing Internet as I see them. In this article I take an initial first step in identifying possible solutions to these issues. This article is meant to be a starting point and the hope is that these can be replaced or expanded on. I personally don’t care for Internet2, or IP2, so I came up with this working title. Below after each section I created a few requirements to create a starting point to work from.</p><h3>Authentication and Authorization</h3><p>By requiring users to authenticate themselves and their devices, identity is part of the transport network. Once authentication is established, it’s then possible to handle authorization which is just as important. I often wonder why anyone in the world is allowed to attempt to log into my home router. This is a weakness of the current Internet Protocol. By requiring authorization to a device on a network first, you entirely eliminate a whole set of attacks. Users won’t be afraid to host resources on the network because they’ll know that only those authorized users can reach them. The transport network won’t transmit packets without an authorization grant, so you entirely eliminate the possibility of a DDoS attack. This idea is still really high level and there’s a lot of detail to fill in here, but if achievable this would provide great security and an amazing user experience.</p><h4>Requirements:</h4><ul><li>Must include Authentication and Authorization as part of the the network protocol.</li><li>Naming should be part of the network protocol and your domain name is also your network address. No separate system for naming such as IP and DNS, in this protocol they are the same thing.</li><li>In order to communicate with another address, a request must first be sent and a grant response returned. All communications must be explicitly allowed and can also be revoked at any time.</li></ul><h3>Quality of Service — QoS</h3><p>QoS was an afterthought of Internet Protocol. Sure, there are fields designated to allow for QoS, but in practice various values are used, or none at all, and none of it is applied consistently. That’s a major problem for QoS, it generally relies on consistent policies applied across the entire network. By standardizing QoS tagging and making QoS a requirement of the protocol itself, then operator(s) can and will be required to implement it consistently. If there is a single network operator then QoS can be evenly applied. If there are multiple operators, then there must be some technical or legal requirement to consistently apply QoS. The reason this is so important is that some types of traffic are higher priority than others, and some have different latency requirements than others. If you are on a phone call and downloading a file at the same time, you don’t want the file download to make your phone call drop. Today we put up with business video calls where audio cuts out and video freezes and we sometimes are disconnected from services because of the lack of QoS in IP.</p><h4>Requirements:</h4><ul><li>QoS must be enforced on all segments of the network. This is critical to the entire protocol and is closely related to the other requirement on accountability.</li><li>Net Neutrality should be honored. Different services should be differentiated by the network to provide the required resources, but there should be no preference given to individual protocols, applications, endpoints, or users. No fast lanes for extra compensation.</li></ul><h3>Accountability</h3><p>If this new network was self hosted, or peer-to-peer, the majority of the population wouldn’t be interested in using it and adoption would never pick up. Businesses wouldn’t want to use it either. People and organizations want support. They want a good user experience, they want help if something breaks or doesn’t work, and they want to be able to buy features that they need. There needs to be one or more network providers who charge for access to the network so that they can build out their network, attract investment, and continually improve their services. The business structure of the new network is probably just as important as the technical structure is to it’s success.</p><h4>Requirements:</h4><ul><li>There must be a single accountable organization. The network itself must be either owned and operated by a single organization, or if there are to be multiple operators then there must be a central organization overseeing the protocol and enforcing the standards.</li><li>This network is a paid network, individuals will pay to gain access to it similarly to how individuals pay to access the internet today. Other forms of monetization such as sending users advertisements, mining and selling of personal information, or things of that nature should be prohibited.</li></ul><h3>Other High Level Requirements</h3><p>Here are a few other requirements I came up with to spur discussion.</p><ul><li>Transport layer security is a requirement. In the access network, an industry standard secure channel must be used. In the core trunk level encryption should be used. Within the user plane of the network end to end encryption is recommended but not required on a per connection basis.</li><li>At least the access network links should be able to exist as an overlay on IP and should do what can be done to identify congestion.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6fa6852849fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A New Type of Internet]]></title>
            <link>https://medium.com/@cup_of_code/a-new-type-of-internet-4b392b7cf7f1?source=rss-de1e4e53920------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b392b7cf7f1</guid>
            <category><![CDATA[computer-networking]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[internet]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[cupofcode]]></dc:creator>
            <pubDate>Sat, 02 Jul 2022 06:42:14 GMT</pubDate>
            <atom:updated>2022-07-04T07:06:30.792Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LRm85WS0UwxFGKFA-RuvZQ.jpeg" /></figure><p>No one can deny the impact the Internet has had on our world, yet it has giant flaws which cannot be fixed. Many consider the Internet the driving factor of the Third Industrial Revolution. It’s transformed the way we live, work, and play. Yet with all this good, the Internet has long outlived it’s initial purpose, and now it does a very poor job at the tasks required today. A new type of network is required to support today&#39;s applications with security, quality of service (QoS), and accountability. I’m hardly the first to propose this, articles by Meny Barzilay <a href="https://techcrunch.com/2016/03/13/building-a-brand-new-internet/">Building a brand-new Internet</a> and David Baker <a href="https://www.wired.co.uk/article/is-the-internet-broken-how-to-fix-it">The internet is broken</a> are just a couple that describe the ways the Internet of yesterday doesn’t meet the needs today.</p><p>The Internet is missing security. A huge problem with the current internet is it’s inability to provide authentication. By design, the internet doesn’t provide any information about you as a user. You can connect to an IP network without providing any information and send and receive packets without restriction. You can sign up for an internet service as Mickey Mouse and no one will question it. This is fine at times, but for most applications today we need to be authenticated. This means that every organization who want’s to offer a service on the internet needs to reinvent the wheel on how to authenticate users. To make things worse, someone on the other side of the world can try to log into your Gmail account on a server in a US data center and it’s up to Google to try and figure out if the connection is you or someone posing as you. This any-to-any relationship of the internet allows for all sorts of security attacks including DDoS. This is just the tip of the iceberg for security issues and I can’t possibly cover all of them here.</p><p>The current Internet which is built on the IP protocol is missing consistent Quality of Service, aka QoS. Quality of Service is handling of different types of traffic with differing performance characteristics. Here’s an example. Say your at your house on a video call, and you decide to download a large file while on the call. Next thing you know your video call is cutting out and your coworkers can’t hear you. Why is this happening? What’s happening here is that the file download is using all of the available Internet bandwidth choking out your video call causing some bits of the call to be dropped. This is because the Internet doesn’t employ any QoS. If it did, it would be able to identify the video call as a priority service and ensure that those data packets get priority over your file download. This seems simple, but it actually requires all devices on the network to agree and handle data packets the same way. Your cell phone does this today, however the Internet as a whole doesn’t and that’s a huge problem. This problem will continue to compound as we put more and more devices on the Internet.</p><p>Accountability is a strange thing to talk about with respect to the Internet so hear me out. If I ask ordinary people what distributed networks they use today, none come to mind. The Web itself is a kind of distributed network, however when people use applications they choose centralized options. There are distributed or federated options out there but they aren’t as popular as their centralized options. Why is this? Mastodon, a very good federated social network similar to Twitter has something over 1 million subscribers where Twitter itself has around 465 million users at the time of writing. I argue it’s lack of accountability. Without a company making profits and reinvesting those profits in equipment, human capital, and customer service, the public isn’t interested in it. They want to have someone to call at 8pm on a Saturday if they’re having issues, and distributed networks don’t provide that generally.</p><p>I propose a new type of Internet. This new Internet doesn’t exist yet to my knowledge, but if successful would have support for things described here such as Authentication and Authorization, QoS, and Accountability. It very well could be an overlay network on top of the current Internet much like the Internet was an overlay on the telecommunications network (dial-up). This new Internet would allow you to backup your pictures from your phone to your home NAS without using an intermediary service. It would also allow you to replicate your NAS files to a neighbor or family member if you choose with little effort. Sure, these things can be done on an IP network today, but require extensive setup or the use of a 3rd party service. Since Authentication and Authorization are part of this new transport network, this allows individuals to grant permissions to others to view or manage their data or services. This new Internet could have a major impact on how we live our digital lives in our Internet village, it would provide built in guarantees to organizations providing services, and it would provide comparatively amazing security.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b392b7cf7f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>