The Ortus BlogBox

"Ortus: A rise, beginning, coming into being, born, the origin!"

 

 

Category Filtering: 'cachebox'

 

Couchbase: CacheBox Integration

Brad Wood
Aug 16, 2013

 

In our previous posts, we covered how to get Couchbase installed and set up your first cluster.  Then we showed you how to use Couchbase for an ORM secondary cache.  Now it’s time to showcase our Couchbase CacheBox provider that we released just a few days ago.  This is a CFML provider that uses the Java SDK for Couchbase and lets you create one or more named caches in CacheBox that connects to one or more buckets in a Couchbase cluster.  Once you connect up CacheBox, you can seamlessly also store ColdBox Platform cached events/views in Couchbase along with anything else you use the CacheBox API for.  So basically you have full Couchbase storage capabilities from ColdBox and non-ColdBox applications.  Let’s get started!

ForgeBox and Code

The CacheBox Couchbase provider does not ship with the ColdBox core, but can be found in our community repository; ForgeBox.  You can use this provider in any installation of CacheBox that is bundled with the ColdBox Platform, or in a standalone installation.  Here’s some handy links for you:

CacheBox, ColdBox MVC, ColdFusion, Community, ContentBox CMS, Couchbase 1

Couchbase: Secondary ORM Configuration & Setup

Brad Wood
Aug 07, 2013

 

In our first two posts, we covered how to install Couchbase server and get a cluster up and running.  In this post we are going to put that cluster of yours to use and show you how to configure it as an ORM secondary cache provider for your ColdFusion applications.  

 

Please remember that the installation instructions are pretty much the same for Adobe ColdFusion and Railo CFML.

If your “cluster” is still just a single server, don’t worry.  The size and configuration of a Couchbase cluster is seamlessly invisible to the connecting client.  Meaning you can grow and scale your cluster without changing your setup/connection code.

At this point in time, there is no Couchbase-specific library for a Hibernate secondary cache, but luckily for us, Couchbase is compatible with the memcached protocol, so we can use the memcached library.  The only drawback is that if you are connecting on the standard port of 11211 to Couchbase, the library will only be able to connect to the “default” bucket.  To use a named bucket for your ORM Secondary cache, you will need to assign the Couchbase bucket you create to a unique port number with NO password when you create it in Couchbase Administrator application.

CacheBox, ColdBox MVC, ColdFusion, Community, ContentBox CMS, Couchbase 0

New Open Source Couchbase Provider for CacheBox

Brad Wood
Aug 06, 2013

 

Here at ColdBox HQ, we've been falling in love with Couchbase.  It's a distributed Memcached-compatible key-value store AND NoSQL database.  Hopefully you been reading out Couchbase blog series over on the Ortus blog.  We're working to make Couchbase accessible from your favorite CFML engine and today we released our open source provider for CacheBox.  

CacheBox is a cache aggregator and API which means it can connect to any number of underlying cache engines via multiple named caches and presents them all to you under a consolidated API.  CacheBox comes with the ColdBox MVC platform, but if you're not using ColdBox, keep reading!  CacheBox is also available as a standalone library for use in any application, even if you're not using a framework.  

Since Couchbase is an out-of-process cache is doesn't use any memory in your JVM's heap and also persists on disk across restarts.  Once you register our Couchbase provider in CacheBox, you can connect to a Couchbase cluster and immediately begin storing data for your application.  

  • Built-in ColdBox Caching
  • Manual caching available anywhere
    • Queries
    • Oft-used data
    • Write your own SessionStorage or ClientStorage plugin for a custom Couchbase store
    • Snippets of rendered content

The Provider is fully documented and professionally supported.  Check out the full post here on the Ortus Blog, or skip straight to the download page.

CacheBox, ColdBox MVC, Couchbase, News, Releases 0

Ortus CacheBox Couchbase Provider Release!

Luis Majano
Aug 06, 2013

 

 

Today we are releasing an open source Couchbase provider for our CacheBox library whether you use it standalone or within a ColdBox application.  We have been working with Couchbase NoSQL server and have been absolutely loving it.  This provider will allow you to leverage Couchbase Server from any CFML application that leverages CacheBox for your caching needs.  We have created two providers in our initial release: 1) For standalone Couchbase integration in any CFML application, 2) For ColdBox applications.  The latter will allow you to hook up Couchbase to your ColdBox applications and even allow you to use it for event and view caching alongside data caching.  We also take care of serializations and Java inter-operability for Adobe ColdFusion and Railo CFML as well.  You can also leverage the Couchbase ColdBox provider for Flash RAM capabilities as well.  As with anything we do here at Ortus, this provider is fully documented and professionally supported.

CacheBox, ColdBox MVC, Community, ContentBox CMS, Couchbase, News, Releases 0

Couchbase: Cluster Setup + ORM Secondary Cache Introduction

Brad Wood
Jul 31, 2013

 

This is our second part of our Couchbase and CFML series that we started last week.  In our first post, “Installation and Introduction to Couchbase” we talked about Couchbase Server, how to install it, and how it can help create a fast and scalable caching layer for your applications.  Today we’re going to talk about setting up a Couchbase cluster and look at our first use for it: as a Hibernate secondary cache for ColdFusion ORM.

Horizontal Scalability


 

In our previous post we set up a very simple cluster of only one node.  Let’s look at how Couchbase lets you expand your cluster horizontally as your needs increase.  A cluster can have as many nodes as you want, seriously!  All nodes in a cluster will be exact copies of each other in regards to their buckets and even their configuration.  When you set up the first node, you will choose how much RAM you want for each node in that cluster to allocate itself.  You can only add a new node to the cluster if it has enough RAM to allow for the node size specified in the cluster at setup.  Therefore, the total amount of RAM in the entire cluster will be the node size times the number of nodes.

CacheBox, ColdBox MVC, ColdFusion, Community, ContentBox CMS, Couchbase 1

New Blog Series on Leveraging Couchbase Server in CFML

Brad Wood
Jul 26, 2013

 

Today the Ortus Solutions blog is starting a new series on how to leverage Couchbase NoSQL from ColdFusion and also releasing some great new products under the Ortus stack throughout our series.  We'll being showing how to install Couchbase as well as tools for using it in your CFML applications.

Caching is an important layer in today's applications that require high availability in clustered and standalone environments alike.  Caching demands require fast performance, lots of storage, and the ability to scale horizontally so your cache infrastructure can grow with your needs.  We take caching seriously which is why we've built tools like CacheBox which is not only a caching engine, but an aggregator and API for other cache systems.  In-process caches, which run on the JVM alongside your application and share the same heap space, are convenient and easy to set up, but they have many limitations when it comes to scalability and redundancy. 

This is why we've spent time learning about other out-of-process and distributed caching strategies and have been working with Couchbase for a while now.  Even though, Couchbase is in itself a NoSQL Database, it is also an amalgamation of CouchDB and Memcached on steroids with clustering, replication and distributed capabilities.

To read the full post, please click here to view it on the Ortus blog.

CacheBox, ColdBox MVC, Couchbase, Tutorials 0

Intro to Couchbase Server for ColdFusion - Clustered NoSQL and Caching at its Finest

Brad Wood
Jul 26, 2013

 

Caching is an important layer in today's applications that require high availability in clustered environments.  Caching demands require fast performance, lots of storage, and the ability to scale horizontally so your cache infrastructure can grow with your needs.  We take caching seriously which is why we've built tools like CacheBox which is not only a caching engine, but an aggregator and API for other caches.  In-process caches which run on the JVM alongside your application and share the same heap space are convenient and easy to set up, but they have limitations.  This is why we've spent time learning about other out-of-process caching strategies.

CacheBox, ColdBox MVC, Community, ContentBox CMS, Couchbase, News 1

ColdBox Platform, ColdBox LITE and Library Releases

Luis Majano
Jul 10, 2013

 

It has been a busy past few months here at Ortus Solutions and we have some cool new stuff to share with the world today.  We have updates for all our major open source libraries this week. Some are minor releases and some are cool enhancement releases thanks to everybody's feedback and contributions.  You can find much more about the releases in our ColdBox engineering blog or in our online documentation wiki:

We have lots of other cool stuff coming soon so stay tuned!

CacheBox, ColdBox MVC, ColdFusion, Community, ContentBox CMS, LogBox, News, Releases, TestBox, WireBox 0

CacheBox 1.5 Released!

Luis Majano
Jul 10, 2013

 

logo

We are proud to announce CacheBox version 1.5. This is a minor update. You can read our What's new with CacheBox 1.5 to get a better idea of this release.

This release contains an update to internal core files and LogBox v1.7.  It also has improvements seen below:

 

 

 

  • [CACHEBOX-6] - cacheObjectKey needed when afterCacheElementUpdated is called

Resources:

CacheBox, ColdBox MVC, News, Releases 0

Introducing CacheBack - A caching WireBox aspect

Curt Gratz
Feb 01, 2013

 

 


ColdBox-CacheBack

A cool annotation based Caching Aspect for WireBox/ColdBox that provides caching without blocking requests during refresh

This interceptor will inspect objects for the 'cacheBack' annotation and if found, it will wrap it in a thread creating cache. This allows the function to be cached without waiting for it to refresh. Inspiration from God and from this library. http://django-cacheback.readthedocs.org/en/latest/

This aspect is a self binding
aspect for WireBox that registers itself using the annotations below
You can control the refresh rate for your cache and the timeout in a number of ways
    1) You can add an annotation to your method called refreshRate and timeout
        ie function myFunction() cacheback refreshRate=120 timeout=240 {}
        This will set cache to refresh every 2 mins and timeout every 4 mins.
    2) You can add a settings to your coldbox config called cacheBack.  The setting will be a structure with
       keys of refreshRate and timeout
        cacheBack = {refreshRate=60,timeout=120}
        This will set cache to refresh every 60 secs and timeout every 120 secs.
    3) You can use our default timeouts which are a refresh rate 18 mins and a timeout of 20 mins
All refresh rates and timeouts are in seconds

To activate this aspect you will need to map it in your WireBox binder.  This can be done like below
mapAspect("cacheBack").to("model.aspects.cacheBack");
Then all you need to do is add the annotation cachback to your methods
myFunction() cacheback refreshRate=120 timeout=240 {}

Keep in mind like all things caching, testing and tuning is very important. This can be used in very specific scenarios when you want to keep cache refreshing, but don't want users to wait for the refresh.

The GitHub repo is available at https://github.com/gratzc/ColdBox-CacheBack

You can also download from our ForgeBox http://www.coldbox.org/forgebox/view/CacheBack

Hope you enjoy.

 

CacheBox, ColdBox MVC, Interceptors, WireBox 1