Category Archives: Java

Comet/WebSocket? Introducing the Atmosphere framework

Pushing messages to connected clients has always been a need on the web, growing with the apparition of new Rich Internet Applications, like realtime feeds (Gmail, news, market quotes), social feeds (The Twitter, Facebook and consort) and many other providing realtime collaboration, monitoring and control like new Internet of Things applications (FlightRadar24, Arduino #1, #2).

Comet technics (ie. polling, long-polling, streaming) and more recently, the WebSocket protocol, have made possible various webpush applications.

Today, when you want to enable realtime push on your own Java-based webapp, you have several solutions:

In this article, I will focus on Atmosphere. After a brief presentation of the framework, I will demonstrate how easy it is to make push-capable applications, whatever the container you use and the nature of your clients.

Before we start, you can take a look at the following video, that demonstrates what I achieved thanks to the Atmosphere framework (more details below, of course):


http://youtu.be/1Abv88t5igc

Read more »

More fun with Redis

In my precedent blog post, we introduced the way to install and start playing with Redis. Now, I propose you to go further, with a more advanced use case. In my personnal project development (f.ollow.us), I faced a new problem:

How can we manage efficiently a fixed number of “slots” that have a TTL (i.e. Time To Live) and can be held (i.e. be available or not) in a high concurrency context? Don’t look further, Redis is the solution!

Read more »

Time to Redis!

Redis is a – take a deep breath - nosql key-value in-memory storage system, also called memcache. It is written in ANSI C and works in most POSIX operating systems. Its features are numerous: high perf, on disk persistence, replication, pub/sub and TTL (i.e. Time To Live) to name a few.

The community around Redis is very active, resulting a lot of client for many languages: Java, Node, Ruby, PHP, etc. On this post, after a brief “How to set up Redis”, I will focus on one of the most active Java API, Jedis.

Read more »

Handle Post Multipart with Java

Handle post multipart is quite simple with languages like PHP. But what about if you develop your forms with JEE, including Servlets & JSP?

Here is some procedures and advices to understand how to handle post multipart form with JEE.

Read more »