What is a Servlet Container?

In this post, I write a little bit about the basic ideas of web server, Servlet container and its relation with JVM. I want to show that Servlet container is nothing more than a Java program.

1. What is a Web Server?

Design Patterns

Design patterns provide a fundamental foundation to building maintainable and scalable software. Understanding how the patterns work, why they provide a benefit, and when to use them helps to ensure that software is built from reusable object-oriented components. In this Refcard, we will dive into the concepts that underpin design patterns, look at the 23 Gang of Four (GoF) patterns that brought about the proliferation of design patterns, and review some common patterns that have evolved since the GoF patterns were published.

MongoDB: 5 Syntactic Weirdnesses to Keep in Mind

People like to complain about MongoDB. For instance, maybe they feel that it ruined their social network, or any number of other less recent complaints. The debate gets so heated, though, that sometimes valid criticisms - and nothing is above criticism - are dismissed as bandwagon hatred. It's a problem that Slava Kim seems very aware of in this recent blog post on some of the syntactic weirdnesses of MongoDB. It's not bashing, Kim stresses. For developers to effectively use any technology, they need to understand the "sharp edges."

Kim goes into detail for each warning, covering five general areas:

Microsoft Aims to Take Over IoT with Windows 10

Everybody's trying to get in on the big-money future of IoT, and now "everybody" includes Microsoft with Windows 10. Larry Dignan at ZDNet put together a look at Windows 10's role in IoT - as it's been described by Microsoft CEO Satya Nadella at the Gartner Symposium ITXpo, at least - which suggests that the new OS will be a central platform for IoT systems of all types. Specifically:

Windows will be able to run on everything from sensors to wearables to whatever computing shift emerges.

MaxScale for the Rest of Us, Part 3: Install and Configure MaxScale

This third post in this series of blogs about MaxScale is finally getting where you want to go: Install and configure MaxScale. The first blog in this series was an overview of what MaxScale is and the second about how to set up a Cluster of MariaDB servers, using MariaDB Replication, for MaxScale to access. But now it's time to introduce MaxScale.

If you skipped the second post as you already know how to set up MariaDB with Replication and all that, be remineded that I will use the same Linux server setup as outlined there even for the MaxScale server and for a client to do some testing, and I recommend you stick with that for now (for MariaDB itself you can use any relevant setup you want, MaxSCale doesn't really care, but MaxScale is pretty new and has still not been tested on that many platforms, so try to stick to the CentOS 6.5 setup I propose.

MapReduce Algorithms: Understanding Data Joins, Part II

hadoop-logoIt’s been awhile since I last posted, and like last time I took a big break, I was taking some classes on Coursera. This time it was Functional Programming Principals in Scala and Principles of Reactive Programming. I found both of them to be great courses and would recommend taking either one if you have the time. In this post we resume our series on implementing the algorithms found in Data-Intensive Text Processing with MapReduce, this time covering map-side joins. As we can guess from the name, map-side joins join data exclusively during the mapping phase and completely skip the reducing phase. In the last post on data joins we covered reduce side joins. Reduce-side joins are easy to implement, but have the drawback that all data is sent across the network to the reducers. Map-side joins offer substantial gains in performance since we are avoiding the cost of sending data across the network. However, unlike reduce-side joins, map-side joins require very specific criteria be met. Today we will discuss the requirements for map-side joins and how we can implement them.

Map-Side Join Conditions

To take advantage of map-side joins our data must meet one of following criteria:

Making A Good Thing Even Better: Google Open Source WindowBuilder and CodePro Profiler

Back in September, when Google announced they were to make the Instantiations tool suite free for all, I thought things couldn't get better than this for Java developers. Well I was wrong, today Google trumped that announcement with their latest plan to open source both WindowBuilder and CodePro Profiler. Google is donating the source and the IP for both of these former products to the open source community through the Eclipse Foundation, and creating two new Eclipse projects. All in all, this is a value of more than $5 million dollars worth of code and IP.

For those unfamiliar with the products, WindowBuilder provides the best available Java GUI Designer available, integrated into Eclipse allowing you to build Swing, SWT, RCP and GWT interfaces. CodePro Profiler helps you to identify performance issues in your Java code. 

The Magic Testing Challenge: Part 2

My last article raised an interesting discussion whether you should see tests more as documentation or more as specification. I agree that they can contribute to both of them, but I still think tests are just - tests...

There were also complaints about my statement that testing often becomes tedious work which nobody likes. Also here I agree, that techniques like TDD can help you to structure your code and make sure you code exactly what is needed by writing the tests, but the result of the process will still be a class which needs to be tested somehow.

Live-updated Apple Announcement Coverage

 Apple is expected to make a big announcement today, holding a special press event that has generated a lot of buzz in the past few weeks.

Rumors abound about what Apple will announce, with popular speculation that two new iPhones will be revealed -- the iPhone 5S, the successor to the current-gen iPhone, and the cheaper iPhone 5C, an economical version of the iPhone meant to compete with Samsung in emerging markets.

Leave us a Comment: What Are You Working On?

Developers have a tendency to work a lot. Maybe your job is a grueling nine-to-five torture that you can't wait to quit, or maybe it's a dream come true, just the best day ever, every day. Either way, there's a good chance that you go home and keep working on something of your own. You know, like:

JXSE and Equinox Tutorial, Part 3: Introducing the JP2P Container

 Abstract

  • It has been a while since the first and second posts of this series, but a lot has happened in the past few months, most notably the fact that the code from eclipselabs is going to be ported to Project Chaupal which will (eventually) be(come) the OSGI implementation of the JXTA specs. As a result, I decided to rename the packages and make the architecture as clean as possible prior to the change.

    • This tutorial will cover some of the features which are already available, and can help to make the development of JXTA applications in Eclipse/Equinox a bit easier.

JXSE and Equinox Tutorial, Part 2

JXSE and Equinox Tutorial, Part 2


NOTE: As of January 2015, you can integrate JXTA in OSGI through an update site. The WIKI  At chaupal.org  gives detailed instructions on how to use the new 2.8.x JXSE bundles for OSGI.Many of the features covered here are implemented by default.

Abstract

In the first post of this series, we covered the quickest way to get JXSE 2.7x working in Equinox and, with some considerations, probably other OSGI frameworks as well. The approach aimed to get the same functionality as you would get by using the jar file in a regular JAVA setting, but as I demonstrated, Equinox does have the benefit of allowing multiple JXSE instances to run simultaneously, which is a great benefit when developing JXSE applications.

In this second tutorial, we will cover some ways of improving the functionality by severing the dependency on the 4.2x version of Jetty (which has just released it's 9.0 version!) and we will introduce some basic tools to visualize the properties and functions of JXSE. This will improve the development cycle of JXSE applications even more.

JXSE and Equinox Tutorial, Part 1

Abstract

NOTE: As of January 2015, you can integrate JXTA in OSGI through an update site. The WIKI  At chaupal.org  gives detailed instructions on how to use the new 2.8.x JXSE bundles for OSGI.

This extended series of tutorials will cover the various ways that the JAVA P2P framework JXSE (formerly popularly known as JXTA, and currently the most up-to-date JAVA implementation of the JXTA specifications) can be made to work with Equinox (the engine on which Eclipse runs). It would be tempting to replace Equinox with OSGI, and indeed many of the issues covered here will work fine with alternative OSGI implementations such as Apache Felix or Knopflerfish, but I will concentrate on Equinox because it will allow us to do a few things with JXSE that requires a bit more handwork on other OSGI platforms. Besides this, I have tested the code on Equinox alone, so I don't want to get ahead of myself. This tutorial is work in progress, so the document will be re-edited a few times.

This tutorial not meant to cover the principles behind P2P in general, and JXTA/JXSE in particular. If you are interested in this, I'd recommend the (free) book Practical Jxta II by Jérôme Verstrynge, or to go through the online manuals for JXTA 2.5, JXSE 2.6 and 2.7. This first tutorial is aimed to get you started with JXSE 2.7x in an Equinox environment. The reader is expected to have a good understanding on developing plugins with the Eclipse IDE. If you are new to Eclipse I would advise you to read the excellent articles on developing plugins by Lars Vogel and brush up on OSGI and Equinox while you're at it.

JFXtras RadialMenu for NetBeans RCP (Part 2)

this article is part 2 of a tutorial that will walk through adapting an open source javafx radialmenu (  http://jfxtras.org/  ) to replace the netbeans platform system menu.  it will build upon both previous tutorials and  part 1  that demonstrate complete replacements for the default netbeans swing components using javafx.  code examples will feature netbeans platform, javafx and css.

part 1  of the article walks through some of the code upgrades necessary for the task.  as of this article’s writing the open-source jfxtras radialmenu needed a few upgrades to act as a system menu replacement for a netbeans platform rcp.  part 2 will show the specific algorithm and code to then utilize the upgraded radialmenu as described.  when complete you should be able to produce a slick radial system menu like this:

JavaFX Goes Mobile

Today sees the release of JavaFX 1.1, allowing developers to put their JavaFX RIA applications on mobile phones, as well as the desktop. I talked with a few of the folks at Sun, including Param Singh, Senior Director of JavaFX at Sun, John Burkey, JavaFX Architect and Mandini Romani, who runs the JavaFX platform.

In this article I'll go through what's included in this release, as well as ask find out a little more about the things in JavaFX that I've wondered about - mostly the integration between Swing, or SWT, and JavaFX.