Archive

Archive for August, 2013

Working with MongoDB using Kundera

August 22, 2013 Leave a comment

Recipes for Geeks

Kundera – a JPA 2.0 (Java Persistence API) based ORM library was originally developed for Cassandra database. A support for Hbase was later added to it.

Those who are new to Kundera, should read this to get a basic idea. For impatient ones – Get started with Kundera in 5 minutes!

Kundera now supports MongoDB – a document-oriented database. Some salient features of MongoDB datamodel are:

  1. Documents are stored as “collections” in DBs.
  2. A document can be embedded into other document, and hence no join is needed for retrieving data. This makes database operations fast.
  3. Drivers are available for most of the popular programming languages.

Our Data Model

In this tutorial, we’ll use below EMAIL and ATTCHMENT entities as our data model and perform CRUD operations using Kundera.
Data Model
Our entities in JSON notation:

{

EMAIL: { “MESSAGE_ID” : “1″, “SUBJECT” : “Please Join Meeting”, “BODY” : “Agenda: RFP discussion”…

View original post 536 more words

Advertisements
Categories: Uncategorized

Node.js client to server with socket.io

August 20, 2013 Leave a comment

delog

Socket.io is usually employed by browser apps communicating with a Node.js server application. It is however possible to create a client in Node.js if you need to call the same server application. It is also possible for the server to return values by calling a function that the client passes to it.

You’ll need to install socket.io and socket.io-client using npm as shown below. Additionally, we also use express for serving static HTTP content.

This is how a client connection can be established. The namespace ns is used for communicating with the server. Client emits the event call with parameter p1, and a function parameter that receives a response code and additional data.

Remember to export global node_modules folder in NODE_PATH before running the script

Newer versions of node, don’t require NODE_PATH to be set to the global module path used by npm i -g.

This is how…

View original post 13 more words

Categories: Uncategorized

Etsy’s Device Lab

August 20, 2013 Leave a comment
Categories: Uncategorized

Introducing Kale

August 20, 2013 Leave a comment
Categories: Uncategorized

Create RESTful app using JAX-RS

August 20, 2013 Leave a comment

anirudh bhatnagar

Today we are going to discuss few of the strategies which can be used to make RESTful applications in JAVA.

Introduction :

JSR 311 also called as JAX-RS; is the Java Specification for RESTful web services. The few of the major vendors which implement JAX-RS are :

View original post 348 more words

Categories: Uncategorized

HTTP Caching using JAX-RS

August 20, 2013 Leave a comment

anirudh bhatnagar

In the last blog we discussed different types of caches and their use cases.
In this post we will explore how we can leverage caching using HTTP response headers and the support provided by JAX-RS.

View original post 531 more words

Categories: Uncategorized

A Few Tips for Beginning Android Development

August 14, 2013 Leave a comment

Blog T

Here are some tips from my personal experience so far with Android development. The number of tips is actually ten, so I could have called this “Ten Tips for Android Development“, but I figured there were already enough articles with that catchy title. Which reminds me of late comedian George Carlin :

I have a problem with the Ten Commandments. Here it is: Why are there ten?…Why not nine, or eleven? I’ll tell you why. Because ten sounds important. Ten sounds official. They knew if they tried eleven, people wouldn’t take them seriously. People would say, “What’re you kiddin’ me? The Eleven Commandments? Get the f*** outta here!”.

OK, now that I opened up with a joke, let’s get into more serious stuff…

 1. Choice of IDE

Most of the Android development is centered around Eclipse, although I coded a few applications using IntelliJ IDEA’s Community Edition without…

View original post 839 more words

Categories: Uncategorized