background preloader

Vert.x

Vert.x
Save the following in server.js Run it: vertx run server.js Save the following in Server.java Run it: (note no compile is needed!) vertx run Server.java

http://vertx.io/

Related:  JavaServerJavaProgrammingIT

lambdaj - manipulate collections in a pseudo-functional and statically typed way How many times have you read or written the same two or three lines of code that frequently seem to go together, and even though they operate on different objects, feel like the same thing? And how often these repetitions involve some sort of collections iteration or more generically manipulation? These repetitions in the code is something that developers eventually learn to filter out and ignore when reading code, once they figure out where the interesting parts are placed.

Tomcat vs Vert.x Tomcat, at least with the 2.x servlet version is using a thread per request model of execution. Basically each request that is received from a client uses and blocks a thread in your tomcat jvm as long as the request is being processed (same with e.g. apache with worker mpm model), so that the number of client connections is directly related to the number of used threads. Depending on the memory consumption of the servlet threads, you will usually have a rather limited number of threads available (e.g. 100 or 250), which limits the number of clients that can connect. This is not an issue when you have a "normal" web 1.0 application, plus you will usually move the static files to another server, either a cdn or at least an apache or nginx server that is running before the tomcat or is running on an alternate address on the same machine. - afficher le texte des messages précédents -

IT Happens Here!: Understanding the Different ApplicationContexts in Spring Application As a beginner to spring, one might often not know the difference between the several applicationContexts that we use in a spring application. Spring documentation is the best place that can really guide you though the process of completely getting this clarified! But here is the abridged version for a quick understanding of the differences between the various configuration files that we use in a spring application. Understand that the webapplicationcontext denotes the xml configuration file that is invoked by the DispatcherServlet within the spring enabled web application. This is the xxx-sevlet.xml file where you define the details of the handler mappings, view configuration, controller bean definitions and other web related beans.

IntelliJ IDEA Minimal Survival Guide – Hadi Hariri Last updated: 07 January, 2014 Why this Guide Much like its counterpart, the JVM Guide the purpose of this guide is to make it easier for newbies to get up to speed faster with IntelliJ IDEA. Work in progress While it is a blog post, it is also a page that I will update as and when I come across new things.

Norse - IPViking Live Every second, Norse collects and analyzes live threat intelligence from darknets in hundreds of locations in over 40 countries. The attacks shown are based on a small subset of live flows against the Norse honeypot infrastructure, representing actual worldwide cyber attacks by bad actors. At a glance, one can see which countries are aggressors or targets at the moment, using which type of attacks (services-ports). Hovering over the Attack Origins, Attack Targets, or Attack Types will highlight just the attacks emanating from that country or over that service-port respectively. Hovering over any bubble on the map, will highlight only the attacks from that location and type.

Exiting the JVM You learn something new about the JDK every day. Apparantly, System.exit(0) does not always stop the JVM! System.exit() This is a great Java puzzler from Peter Lawrey: public static void main(String... args) { Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() { @Override public void run() { System.out.println("Locking"); synchronized (lock) { System.out.println("Locked"); } } })); synchronized (lock) { System.out.println("Exiting"); System.exit(0); } }

Undertow, Vert.x, and Netty Benchmarks - Miles to go 2.0 ... 90 frameworks (including web application platforms, full-stack frameworks, and micro-frameworks) are compared using 230 tests by Tech Empower. The tests execute fundamental tasks such as JSON serialization, database access, and server-side template composition. Read more about the tests introduction, permutation, and environment details. Complete results from Round 8 are explained here. Undertow is the new web server in WildFly 8 and did pretty well with consistently staying in top 10 in all categories, especially given that the server is written from scratch. The 3 things you should know about hashCode() In Java, every object has a method hashCode that is simple to understand but still it’s sometimes forgotten or misused. Here are three things to keep in mind to avoid the common pitfalls. An object’s hash code allows algorithms and data structures to put objects into compartments, just like letter types in a printer’s type case. The printer puts all “A” types into the compartment for “A”, and he looks for an “A” only in this one compartment. This simple system lets him find types much faster than searching in an unsorted drawer. That’s also the idea of hash-based collections, such as HashMap and HashSet.

Learn to Code – Radhika Morabia Let’s talk about programming. Everyone says you need it these days. Even I do. 10 Questions To Make Programming Interviews Less Expensive Conducting Interview is not cheap and costs both time and money to a company. It take a lot of time to find the right candidate for a job from 100s resume you receive from consultants and agents. They will always tell you that this guy is a Java Guru, this one is SQL Expert and next one is the full stack developer you are looking for. Must read We are sharing the best books for learning Java . If you are new to the java world then you should not miss out these books .Most of the readers find it hard to learn java at the beginning. So if you read these books thoroughly and understand the concepts , then I am sure you will not have any trouble in java interviews or any competition involving java.

Effortless asynchronous application development for the modern web and enterprise by edwardsayer May 20

Related:  softwareWeSpekeLibraries