diff --git a/apps/demo/src/main/java/org/onlab/onos/demo/DemoInstaller.java b/apps/demo/src/main/java/org/onlab/onos/demo/DemoInstaller.java
index de66ee5..5f1ea29 100644
--- a/apps/demo/src/main/java/org/onlab/onos/demo/DemoInstaller.java
+++ b/apps/demo/src/main/java/org/onlab/onos/demo/DemoInstaller.java
@@ -308,7 +308,7 @@
         }
 
         private void installIntents(List<HostPair> toInstall) {
-            IntentOperations.Builder builder = IntentOperations.builder();
+            IntentOperations.Builder builder = IntentOperations.builder(appId);
             for (HostPair pair : toInstall) {
                 installed.add(pair);
                 uninstalledOrWithdrawn.remove(pair);
@@ -318,7 +318,7 @@
         }
 
         private void uninstallIntents(Collection<HostPair> toRemove) {
-            IntentOperations.Builder builder = IntentOperations.builder();
+            IntentOperations.Builder builder = IntentOperations.builder(appId);
             for (HostPair pair : toRemove) {
                 installed.remove(pair);
                 uninstalledOrWithdrawn.add(pair);
@@ -333,7 +333,7 @@
         private void cleanUp() {
             List<HostPair> allPairs = Lists.newArrayList(installed);
             allPairs.addAll(uninstalledOrWithdrawn);
-            IntentOperations.Builder builder = IntentOperations.builder();
+            IntentOperations.Builder builder = IntentOperations.builder(appId);
             for (HostPair pair : allPairs) {
                 builder.addWithdrawOperation(pair.h2hIntent().id());
             }
diff --git a/apps/optical/src/main/java/org/onlab/onos/optical/OpticalPathProvisioner.java b/apps/optical/src/main/java/org/onlab/onos/optical/OpticalPathProvisioner.java
index 5aaa359..e11298b 100644
--- a/apps/optical/src/main/java/org/onlab/onos/optical/OpticalPathProvisioner.java
+++ b/apps/optical/src/main/java/org/onlab/onos/optical/OpticalPathProvisioner.java
@@ -129,7 +129,7 @@
             }
 
             // Build the intent batch
-            IntentOperations.Builder ops = IntentOperations.builder();
+            IntentOperations.Builder ops = IntentOperations.builder(appId);
             for (Intent i : intents) {
                 // TODO: don't allow duplicate intents between the same points for now
                 // we may want to allow this carefully in future to increase capacity
diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/IntentSynchronizer.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/IntentSynchronizer.java
index 4ded55f..ac69faa 100644
--- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/IntentSynchronizer.java
+++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/IntentSynchronizer.java
@@ -221,7 +221,7 @@
             // Push the intents
             if (isElectedLeader && isActivatedLeader) {
                 log.debug("SDN-IP Submitting all Peer Intents...");
-                IntentOperations.Builder builder = IntentOperations.builder();
+                IntentOperations.Builder builder = IntentOperations.builder(appId);
                 for (Intent intent : intents) {
                     builder.addSubmitOperation(intent);
                 }
@@ -370,7 +370,7 @@
             }
 
             // Withdraw Intents
-            IntentOperations.Builder builder = IntentOperations.builder();
+            IntentOperations.Builder builder = IntentOperations.builder(appId);
             for (Intent intent : deleteIntents) {
                 builder.addWithdrawOperation(intent.id());
                 log.debug("SDN-IP Intent Synchronizer: withdrawing intent: {}",
@@ -386,7 +386,7 @@
             intentService.execute(intentOperations);
 
             // Add Intents
-            builder = IntentOperations.builder();
+            builder = IntentOperations.builder(appId);
             for (Intent intent : addIntents) {
                 builder.addSubmitOperation(intent);
                 log.debug("SDN-IP Intent Synchronizer: submitting intent: {}",
diff --git a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/IntentSyncTest.java b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/IntentSyncTest.java
index 2ab2f68..2cb74f5 100644
--- a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/IntentSyncTest.java
+++ b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/IntentSyncTest.java
@@ -325,13 +325,13 @@
                 .andReturn(IntentState.WITHDRAWING).anyTimes();
         expect(intentService.getIntents()).andReturn(intents).anyTimes();
 
-        IntentOperations.Builder builder = IntentOperations.builder();
+        IntentOperations.Builder builder = IntentOperations.builder(null); //FIXME null
         builder.addWithdrawOperation(intent2.id());
         builder.addWithdrawOperation(intent4.id());
         intentService.execute(TestIntentServiceHelper.eqExceptId(
                                 builder.build()));
 
-        builder = IntentOperations.builder();
+        builder = IntentOperations.builder(null); //FIXME null
         builder.addSubmitOperation(intent3);
         builder.addSubmitOperation(intent4Update);
         builder.addSubmitOperation(intent6);
diff --git a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/PeerConnectivityManagerTest.java b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/PeerConnectivityManagerTest.java
index bd50cce..0c39582 100644
--- a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/PeerConnectivityManagerTest.java
+++ b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/PeerConnectivityManagerTest.java
@@ -566,7 +566,7 @@
         reset(intentService);
 
         // Setup the expected intents
-        IntentOperations.Builder builder = IntentOperations.builder();
+        IntentOperations.Builder builder = IntentOperations.builder(null); //FIXME null
         for (Intent intent : intentList) {
             builder.addSubmitOperation(intent);
         }
@@ -601,9 +601,9 @@
         replay(configInfoService);
 
         reset(intentService);
-        IntentOperations.Builder builder = IntentOperations.builder();
+        IntentOperations.Builder builder = IntentOperations.builder(null); //FIXME null
         intentService.execute(TestIntentServiceHelper.eqExceptId(
-                                builder.build()));
+                builder.build()));
         replay(intentService);
         peerConnectivityManager.start();
         verify(intentService);
@@ -627,9 +627,9 @@
         replay(configInfoService);
 
         reset(intentService);
-        IntentOperations.Builder builder = IntentOperations.builder();
+        IntentOperations.Builder builder = IntentOperations.builder(null); //FIXME null
         intentService.execute(TestIntentServiceHelper.eqExceptId(
-                                builder.build()));
+                builder.build()));
         replay(intentService);
         peerConnectivityManager.start();
         verify(intentService);
diff --git a/cli/src/main/java/org/onlab/onos/cli/net/IntentPushTestCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/IntentPushTestCommand.java
index f3c6b41..ef9b5b5 100644
--- a/cli/src/main/java/org/onlab/onos/cli/net/IntentPushTestCommand.java
+++ b/cli/src/main/java/org/onlab/onos/cli/net/IntentPushTestCommand.java
@@ -119,7 +119,7 @@
     }
 
     private void submitIntents(List<Intent> intents) {
-        IntentOperations.Builder builder = IntentOperations.builder();
+        IntentOperations.Builder builder = IntentOperations.builder(appId());
         for (Intent intent : intents) {
             if (add) {
                 builder.addSubmitOperation(intent);
@@ -132,7 +132,7 @@
         start = System.currentTimeMillis();
         service.execute(ops);
         try {
-            if (latch.await(10, TimeUnit.SECONDS)) {
+            if (latch.await(30, TimeUnit.SECONDS)) {
                 printResults(count);
             } else {
                 print("Failure: %d intents not installed", latch.getCount());
diff --git a/cli/src/main/java/org/onlab/onos/cli/net/RandomIntentCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/RandomIntentCommand.java
index 75d1bce..2a8a6ac 100644
--- a/cli/src/main/java/org/onlab/onos/cli/net/RandomIntentCommand.java
+++ b/cli/src/main/java/org/onlab/onos/cli/net/RandomIntentCommand.java
@@ -86,7 +86,7 @@
     }
 
     private void submitIntents(Collection<Intent> intents) {
-        IntentOperations.Builder builder = IntentOperations.builder();
+        IntentOperations.Builder builder = IntentOperations.builder(appId());
         for (Intent intent : intents) {
             builder.addSubmitOperation(intent);
         }
@@ -95,7 +95,7 @@
     }
 
     private void withdrawIntents() {
-        IntentOperations.Builder builder = IntentOperations.builder();
+        IntentOperations.Builder builder = IntentOperations.builder(appId());
         for (Intent intent : service.getIntents()) {
             if (appId().equals(intent.appId())) {
                 builder.addWithdrawOperation(intent.id());
diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/IntentBatchService.java b/core/api/src/main/java/org/onlab/onos/net/intent/IntentBatchService.java
index 0364ad7..762bbb8 100644
--- a/core/api/src/main/java/org/onlab/onos/net/intent/IntentBatchService.java
+++ b/core/api/src/main/java/org/onlab/onos/net/intent/IntentBatchService.java
@@ -15,6 +15,8 @@
  */
 package org.onlab.onos.net.intent;
 
+import org.onlab.onos.core.ApplicationId;
+
 import java.util.Set;
 
 /**
@@ -46,9 +48,20 @@
      * Returns the set of intent batches currently being processed.
      * @return set of batches
      */
+    //TODO we may want to get rid of this method
+    @Deprecated
     Set<IntentOperations> getCurrentOperations();
 
     /**
+     * Return true if this instance is the local leader for batch
+     * processing a given application id.
+     *
+     * @param applicationId
+     * @return
+     */
+    boolean isLocalLeader(ApplicationId applicationId);
+
+    /**
      * Sets the batch service delegate.
      *
      * @param delegate delegate to apply
diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/IntentOperations.java b/core/api/src/main/java/org/onlab/onos/net/intent/IntentOperations.java
index ee7c243..c282a01 100644
--- a/core/api/src/main/java/org/onlab/onos/net/intent/IntentOperations.java
+++ b/core/api/src/main/java/org/onlab/onos/net/intent/IntentOperations.java
@@ -19,6 +19,7 @@
 import java.util.Objects;
 
 import com.google.common.collect.ImmutableList;
+import org.onlab.onos.core.ApplicationId;
 
 import static com.google.common.base.MoreObjects.toStringHelper;
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -33,14 +34,16 @@
 public final class IntentOperations {
 
     private final List<IntentOperation> operations;
+    private final ApplicationId appId;
 
     /**
      * Creates a batch of intent operations using the supplied list.
      *
      * @param operations list of intent operations
      */
-    private IntentOperations(List<IntentOperation> operations) {
+    private IntentOperations(List<IntentOperation> operations, ApplicationId appId) {
         this.operations = operations;
+        this.appId = appId;
     }
 
     /**
@@ -52,16 +55,20 @@
         return operations;
     }
 
+    public ApplicationId appId() {
+        return appId;
+    }
+
     /**
      * Returns a builder for intent operation batches.
      *
      * @return intent operations builder
+     * @param applicationId application id
      */
-    public static Builder builder() {
-        return new Builder();
+    public static Builder builder(ApplicationId applicationId) {
+        return new Builder(applicationId);
     }
 
-
     @Override
     public int hashCode() {
         return Objects.hash(operations);
@@ -92,9 +99,11 @@
     public static final class Builder {
 
         private final ImmutableList.Builder<IntentOperation> builder = ImmutableList.builder();
+        private final ApplicationId appId;
 
         // Public construction is forbidden.
-        private Builder() {
+        private Builder(ApplicationId appId) {
+            this.appId = appId;
         }
 
         /**
@@ -153,7 +162,7 @@
          * @return immutable batch of intent operations
          */
         public IntentOperations build() {
-            return new IntentOperations(builder.build());
+            return new IntentOperations(builder.build(), appId);
         }
 
     }
diff --git a/core/api/src/main/java/org/onlab/onos/store/service/Lock.java b/core/api/src/main/java/org/onlab/onos/store/service/Lock.java
index 01682d1..7558ae2 100644
--- a/core/api/src/main/java/org/onlab/onos/store/service/Lock.java
+++ b/core/api/src/main/java/org/onlab/onos/store/service/Lock.java
@@ -82,7 +82,7 @@
      * lock acquisition events
      * @return epoch
      */
-     long epoch();
+    long epoch();
 
     /**
      * Releases the lock.
diff --git a/core/api/src/test/java/org/onlab/onos/net/intent/IntentOperationsTest.java b/core/api/src/test/java/org/onlab/onos/net/intent/IntentOperationsTest.java
index a2c5f09..2c31102 100644
--- a/core/api/src/test/java/org/onlab/onos/net/intent/IntentOperationsTest.java
+++ b/core/api/src/test/java/org/onlab/onos/net/intent/IntentOperationsTest.java
@@ -78,15 +78,15 @@
     @Test
     public void testEquals() {
         final IntentOperations operations1 =
-                IntentOperations.builder()
+                IntentOperations.builder(null) //FIXME null
                         .addSubmitOperation(intent)
                         .build();
         final IntentOperations sameAsOperations1 =
-                IntentOperations.builder()
+                IntentOperations.builder(null) //FIXME null
                         .addSubmitOperation(intent)
                         .build();
         final IntentOperations operations2 =
-                IntentOperations.builder()
+                IntentOperations.builder(null) //FIXME null
                         .addReplaceOperation(intent.id(), intent)
                         .build();
 
@@ -102,7 +102,7 @@
     @Test
     public void testConstruction() {
         final IntentOperations operations =
-                IntentOperations.builder()
+                IntentOperations.builder(null) //FIXME
                         .addUpdateOperation(intent.id())
                         .addWithdrawOperation(intent.id())
                         .build();
diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentManager.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentManager.java
index da2fe70..1cb3210 100644
--- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentManager.java
+++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentManager.java
@@ -33,6 +33,7 @@
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.ReferenceCardinality;
 import org.apache.felix.scr.annotations.Service;
+import org.onlab.onos.core.ApplicationId;
 import org.onlab.onos.core.CoreService;
 import org.onlab.onos.core.IdGenerator;
 import org.onlab.onos.event.AbstractListenerRegistry;
@@ -151,20 +152,22 @@
     @Override
     public void submit(Intent intent) {
         checkNotNull(intent, INTENT_NULL);
-        execute(IntentOperations.builder().addSubmitOperation(intent).build());
+        execute(IntentOperations.builder(intent.appId())
+                        .addSubmitOperation(intent).build());
     }
 
     @Override
     public void withdraw(Intent intent) {
         checkNotNull(intent, INTENT_NULL);
-        execute(IntentOperations.builder().addWithdrawOperation(intent.id()).build());
+        execute(IntentOperations.builder(intent.appId())
+                        .addWithdrawOperation(intent.id()).build());
     }
 
     @Override
     public void replace(IntentId oldIntentId, Intent newIntent) {
         checkNotNull(oldIntentId, INTENT_ID_NULL);
         checkNotNull(newIntent, INTENT_NULL);
-        execute(IntentOperations.builder()
+        execute(IntentOperations.builder(newIntent.appId())
                 .addReplaceOperation(oldIntentId, newIntent)
                 .build());
     }
@@ -489,26 +492,50 @@
         }
     }
 
+    private void buildAndSubmitBatches(Iterable<IntentId> intentIds,
+                                       boolean compileAllFailed) {
+        Map<ApplicationId, IntentOperations.Builder> batches = Maps.newHashMap();
+        // Attempt recompilation of the specified intents first.
+        for (IntentId id : intentIds) {
+            Intent intent = store.getIntent(id);
+            if (intent == null) {
+                continue;
+            }
+            IntentOperations.Builder builder = batches.get(intent.appId());
+            if (builder == null) {
+                builder = IntentOperations.builder(intent.appId());
+                batches.put(intent.appId(), builder);
+            }
+            builder.addUpdateOperation(id);
+        }
+
+        if (compileAllFailed) {
+            // If required, compile all currently failed intents.
+            for (Intent intent : getIntents()) {
+                if (getIntentState(intent.id()) == FAILED) {
+                    IntentOperations.Builder builder = batches.get(intent.appId());
+                    if (builder == null) {
+                        builder = IntentOperations.builder(intent.appId());
+                        batches.put(intent.appId(), builder);
+                    }
+                    builder.addUpdateOperation(intent.id());
+                }
+            }
+        }
+
+        for (ApplicationId appId : batches.keySet()) {
+            if (batchService.isLocalLeader(appId)) {
+                execute(batches.get(appId).build());
+            }
+        }
+    }
+
     // Topology change delegate
     private class InternalTopoChangeDelegate implements TopologyChangeDelegate {
         @Override
         public void triggerCompile(Iterable<IntentId> intentIds,
                                    boolean compileAllFailed) {
-            // Attempt recompilation of the specified intents first.
-            IntentOperations.Builder builder = IntentOperations.builder();
-            for (IntentId id : intentIds) {
-                builder.addUpdateOperation(id);
-            }
-
-            if (compileAllFailed) {
-                // If required, compile all currently failed intents.
-                for (Intent intent : getIntents()) {
-                    if (getIntentState(intent.id()) == FAILED) {
-                        builder.addUpdateOperation(intent.id());
-                    }
-                }
-            }
-            execute(builder.build());
+            buildAndSubmitBatches(intentIds, compileAllFailed);
         }
     }
 
diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTracker.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTracker.java
index 7eeec65..7cc5d47 100644
--- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTracker.java
+++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTracker.java
@@ -216,5 +216,8 @@
         }
     }
 
+    //TODO consider adding flow rule event tracking
 
+    //FIXME the only intents that will be tracked are events that were
+    //executed on this instance. Need to have some backup trackers...
 }
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/hz/SQueue.java b/core/store/dist/src/main/java/org/onlab/onos/store/hz/SQueue.java
new file mode 100644
index 0000000..f560cd2
--- /dev/null
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/hz/SQueue.java
@@ -0,0 +1,226 @@
+/*
+ * Copyright 2014 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onlab.onos.store.hz;
+
+import com.hazelcast.core.IQueue;
+import com.hazelcast.core.ItemListener;
+import com.hazelcast.monitor.LocalQueueStats;
+import org.onlab.onos.store.serializers.StoreSerializer;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.concurrent.TimeUnit;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+// TODO: implementation is incomplete
+
+/**
+ * Wrapper around IQueue&lt;byte[]&gt; which serializes/deserializes
+ * key and value using StoreSerializer.
+ *
+ * @param <T> type
+ */
+public class SQueue<T> implements IQueue<T> {
+
+    private final IQueue<byte[]> q;
+    private final StoreSerializer serializer;
+
+    /**
+     * Creates a SQueue instance.
+     *
+     * @param baseQueue base IQueue to use
+     * @param serializer serializer to use for both key and value
+     */
+    public SQueue(IQueue<byte[]> baseQueue, StoreSerializer serializer) {
+        this.q = checkNotNull(baseQueue);
+        this.serializer = checkNotNull(serializer);
+    }
+
+    private byte[] serialize(Object key) {
+        return serializer.encode(key);
+    }
+
+    private T deserialize(byte[] key) {
+        return serializer.decode(key);
+    }
+
+    @Override
+    public boolean add(T t) {
+        return q.add(serialize(t));
+    }
+
+    @Override
+    public boolean offer(T t) {
+        return q.offer(serialize(t));
+    }
+
+    @Override
+    public void put(T t) throws InterruptedException {
+        q.put(serialize(t));
+    }
+
+    @Override
+    public boolean offer(T t, long l, TimeUnit timeUnit) throws InterruptedException {
+        return q.offer(serialize(t), l, timeUnit);
+    }
+
+    @Override
+    public T take() throws InterruptedException {
+        return deserialize(q.take());
+    }
+
+    @Override
+    public T poll(long l, TimeUnit timeUnit) throws InterruptedException {
+        return deserialize(q.poll(l, timeUnit));
+    }
+
+    @Override
+    public int remainingCapacity() {
+        return q.remainingCapacity();
+    }
+
+    @Override
+    public boolean remove(Object o) {
+        return q.remove(serialize(o));
+    }
+
+    @Override
+    public boolean contains(Object o) {
+        return q.contains(serialize(o));
+    }
+
+    @Override
+    public int drainTo(Collection<? super T> collection) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public int drainTo(Collection<? super T> collection, int i) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public T remove() {
+        return deserialize(q.remove());
+    }
+
+    @Override
+    public T poll() {
+        return deserialize(q.poll());
+    }
+
+    @Override
+    public T element() {
+        return deserialize(q.element());
+    }
+
+    @Override
+    public T peek() {
+        return deserialize(q.peek());
+    }
+
+    @Override
+    public int size() {
+        return q.size();
+    }
+
+    @Override
+    public boolean isEmpty() {
+        return q.isEmpty();
+    }
+
+    @Override
+    public Iterator<T> iterator() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public Object[] toArray() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public <T1> T1[] toArray(T1[] t1s) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public boolean containsAll(Collection<?> collection) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public boolean addAll(Collection<? extends T> collection) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public boolean removeAll(Collection<?> collection) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public boolean retainAll(Collection<?> collection) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public void clear() {
+        q.clear();
+    }
+
+    @Override
+    public LocalQueueStats getLocalQueueStats() {
+        return q.getLocalQueueStats();
+    }
+
+    @Override
+    public String addItemListener(ItemListener<T> itemListener, boolean b) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public boolean removeItemListener(String s) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Deprecated
+    @Override
+    public Object getId() {
+        return q.getId();
+    }
+
+    @Override
+    public String getPartitionKey() {
+        return q.getPartitionKey();
+    }
+
+    @Override
+    public String getName() {
+        return q.getName();
+    }
+
+    @Override
+    public String getServiceName() {
+        return q.getServiceName();
+    }
+
+    @Override
+    public void destroy() {
+        q.destroy();
+    }
+}
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/DistributedIntentBatchQueue.java b/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/DistributedIntentBatchQueue.java
deleted file mode 100644
index 68cda00..0000000
--- a/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/DistributedIntentBatchQueue.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright 2014 Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onlab.onos.store.intent.impl;
-
-import com.google.common.collect.Sets;
-import org.apache.felix.scr.annotations.Activate;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Deactivate;
-import org.apache.felix.scr.annotations.Service;
-import org.onlab.onos.net.intent.IntentBatchDelegate;
-import org.onlab.onos.net.intent.IntentBatchService;
-import org.onlab.onos.net.intent.IntentOperations;
-import org.slf4j.Logger;
-
-import java.util.LinkedList;
-import java.util.Queue;
-import java.util.Set;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.base.Preconditions.checkState;
-import static org.slf4j.LoggerFactory.getLogger;
-
-// FIXME This is not distributed yet.
-@Component(immediate = true)
-@Service
-public class DistributedIntentBatchQueue implements IntentBatchService {
-
-    private final Logger log = getLogger(getClass());
-    private final Queue<IntentOperations> pendingBatches = new LinkedList<>();
-    private final Set<IntentOperations> currentBatches = Sets.newHashSet();
-    private IntentBatchDelegate delegate;
-
-    @Activate
-    public void activate() {
-        log.info("Started");
-    }
-
-    @Deactivate
-    public void deactivate() {
-        log.info("Stopped");
-    }
-
-    @Override
-    public void addIntentOperations(IntentOperations operations) {
-        checkState(delegate != null, "No delegate set");
-        synchronized (this) {
-            pendingBatches.add(operations);
-            if (currentBatches.isEmpty()) {
-                IntentOperations work = pendingBatches.poll();
-                currentBatches.add(work);
-                delegate.execute(work);
-            }
-        }
-    }
-
-    @Override
-    public void removeIntentOperations(IntentOperations operations) {
-        // we allow at most one outstanding batch at a time
-        synchronized (this) {
-            checkState(currentBatches.remove(operations), "Operations not found in current ops.");
-            checkState(currentBatches.isEmpty(), "More than one outstanding batch.");
-            IntentOperations work = pendingBatches.poll();
-            if (work != null) {
-                currentBatches.add(work);
-                delegate.execute(work);
-            }
-        }
-    }
-
-    @Override
-    public Set<IntentOperations> getPendingOperations() {
-        synchronized (this) {
-            return Sets.newHashSet(pendingBatches);
-        }
-    }
-
-    @Override
-    public Set<IntentOperations> getCurrentOperations() {
-        synchronized (this) {
-            return Sets.newHashSet(currentBatches);
-        }
-    }
-
-    @Override
-    public void setDelegate(IntentBatchDelegate delegate) {
-        this.delegate = checkNotNull(delegate, "Delegate cannot be null");
-    }
-
-    @Override
-    public void unsetDelegate(IntentBatchDelegate delegate) {
-        if (this.delegate != null && this.delegate.equals(delegate)) {
-            this.delegate = null;
-        }
-    }
-}
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/HazelcastIntentBatchQueue.java b/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/HazelcastIntentBatchQueue.java
new file mode 100644
index 0000000..6b4f802
--- /dev/null
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/HazelcastIntentBatchQueue.java
@@ -0,0 +1,275 @@
+/*
+ * Copyright 2014 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onlab.onos.store.intent.impl;
+
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+import com.hazelcast.core.HazelcastInstance;
+import com.hazelcast.core.IQueue;
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.ReferenceCardinality;
+import org.apache.felix.scr.annotations.Service;
+import org.onlab.onos.cluster.ClusterService;
+import org.onlab.onos.cluster.ControllerNode;
+import org.onlab.onos.cluster.LeadershipEvent;
+import org.onlab.onos.cluster.LeadershipEventListener;
+import org.onlab.onos.cluster.LeadershipService;
+import org.onlab.onos.core.ApplicationId;
+import org.onlab.onos.core.CoreService;
+import org.onlab.onos.net.intent.IntentBatchDelegate;
+import org.onlab.onos.net.intent.IntentBatchService;
+import org.onlab.onos.net.intent.IntentOperations;
+import org.onlab.onos.store.hz.SQueue;
+import org.onlab.onos.store.hz.StoreService;
+import org.onlab.onos.store.serializers.KryoNamespaces;
+import org.onlab.onos.store.serializers.KryoSerializer;
+import org.onlab.onos.store.serializers.StoreSerializer;
+import org.onlab.util.KryoNamespace;
+import org.slf4j.Logger;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.common.base.Preconditions.checkState;
+import static org.slf4j.LoggerFactory.getLogger;
+
+@Component(immediate = true)
+@Service
+public class HazelcastIntentBatchQueue
+        implements IntentBatchService {
+
+    private final Logger log = getLogger(getClass());
+    private static final String TOPIC_BASE = "intent-batch-";
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    protected CoreService coreService;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    protected ClusterService clusterService;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    protected LeadershipService leadershipService;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    protected StoreService storeService;
+
+    private HazelcastInstance theInstance;
+    private ControllerNode localControllerNode;
+    protected StoreSerializer serializer;
+    private IntentBatchDelegate delegate;
+    private InternalLeaderListener leaderListener = new InternalLeaderListener();
+    private final Map<ApplicationId, SQueue<IntentOperations>> batchQueues
+            = Maps.newHashMap(); // FIXME make distributed?
+    private final Set<ApplicationId> myTopics = Sets.newHashSet();
+    private final Map<ApplicationId, IntentOperations> outstandingOps
+            = Maps.newHashMap();
+
+    @Activate
+    public void activate() {
+        theInstance = storeService.getHazelcastInstance();
+        localControllerNode = clusterService.getLocalNode();
+        leadershipService.addListener(leaderListener);
+
+        serializer = new KryoSerializer() {
+
+            @Override
+            protected void setupKryoPool() {
+                serializerPool = KryoNamespace.newBuilder()
+                        .setRegistrationRequired(false)
+                        .register(KryoNamespaces.API)
+                        .nextId(KryoNamespaces.BEGIN_USER_CUSTOM_ID)
+                        .build();
+            }
+
+        };
+        log.info("Started");
+    }
+
+    @Deactivate
+    public void deactivate() {
+        leadershipService.removeListener(leaderListener);
+        log.info("Stopped");
+    }
+
+    public static String getTopic(ApplicationId appId) {
+        return TOPIC_BASE + checkNotNull(appId.id());
+    }
+
+    public ApplicationId getAppId(String topic) {
+        checkState(topic.startsWith(TOPIC_BASE),
+                   "Trying to get app id for invalid topic: {}", topic);
+        Short id = Short.parseShort(topic.substring(TOPIC_BASE.length()));
+        return coreService.getAppId(id);
+    }
+
+    private SQueue<IntentOperations> getQueue(ApplicationId appId) {
+        SQueue<IntentOperations> queue = batchQueues.get(appId);
+        if (queue == null) {
+            synchronized (this) {
+                // FIXME how will other instances find out about new queues
+                String topic = getTopic(appId);
+                IQueue<byte[]> rawQueue = theInstance.getQueue(topic);
+                queue = new SQueue<>(rawQueue, serializer);
+                batchQueues.putIfAbsent(appId, queue);
+                // TODO others should run for leadership when they hear about this topic
+                leadershipService.runForLeadership(topic);
+            }
+        }
+        return queue;
+    }
+
+    @Override
+    public void addIntentOperations(IntentOperations ops) {
+        checkNotNull(ops, "Intent operations cannot be null.");
+        ApplicationId appId = ops.appId();
+        getQueue(appId).add(ops); // TODO consider using put here
+        dispatchNextOperation(appId);
+    }
+
+    @Override
+    public void removeIntentOperations(IntentOperations ops) {
+        ApplicationId appId = ops.appId();
+        synchronized (this) {
+            checkState(outstandingOps.get(appId).equals(ops),
+                       "Operations not found.");
+            SQueue<IntentOperations> queue = batchQueues.get(appId);
+            // TODO consider alternatives to remove
+            checkState(queue.remove().equals(ops),
+                       "Operations are wrong.");
+            outstandingOps.remove(appId);
+            dispatchNextOperation(appId);
+        }
+    }
+
+    /**
+     * Dispatches the next available operations to the delegate, unless
+     * we are not the leader for this application id or there is an
+     * outstanding operations for this application id.
+     *
+     * @param appId application id
+     */
+    private void dispatchNextOperation(ApplicationId appId) {
+        synchronized (this) {
+            if (!myTopics.contains(appId) ||
+                    outstandingOps.containsKey(appId)) {
+                return;
+            }
+            IntentOperations ops = batchQueues.get(appId).peek();
+            if (ops != null) {
+                outstandingOps.put(appId, ops);
+                delegate.execute(ops);
+            }
+        }
+    }
+
+    /**
+     * Record the leadership change for the given topic. If we have become the
+     * leader, then dispatch the next operations. If we have lost leadership,
+     * then cancel the last operations.
+     *
+     * @param topic topic based on application id
+     * @param leader true if we have become the leader, false otherwise
+     */
+    private void leaderChanged(String topic, boolean leader) {
+        ApplicationId appId = getAppId(topic);
+        //TODO we are using the event caller's thread, should we use our own?
+        synchronized (this) {
+            if (leader) {
+                myTopics.add(appId);
+                checkState(!outstandingOps.containsKey(appId),
+                           "Existing intent ops for app id: {}", appId);
+                dispatchNextOperation(appId);
+            } else {
+                myTopics.remove(appId);
+                IntentOperations ops = outstandingOps.get(appId);
+                if (ops != null) {
+                    delegate.cancel(ops);
+                }
+                outstandingOps.remove(appId);
+            }
+        }
+    }
+
+    private class InternalLeaderListener implements LeadershipEventListener {
+        @Override
+        public void event(LeadershipEvent event) {
+            log.debug("Leadership Event: time = {} type = {} event = {}",
+                      event.time(), event.type(), event);
+
+            String topic = event.subject().topic();
+            if (!topic.startsWith(TOPIC_BASE)) {
+                return;         // Not our topic: ignore
+            }
+            if (!event.subject().leader().id().equals(localControllerNode.id())) {
+                return;         // The event is not about this instance: ignore
+            }
+
+            switch (event.type()) {
+                case LEADER_ELECTED:
+                    log.info("Elected leader for app {}", getAppId(topic));
+                    leaderChanged(topic, true);
+                    break;
+                case LEADER_BOOTED:
+                    log.info("Lost leader election for app {}", getAppId(topic));
+                    leaderChanged(topic, false);
+                    break;
+                case LEADER_REELECTED:
+                    break;
+                default:
+                    break;
+            }
+        }
+    }
+
+    @Override
+    public Set<IntentOperations> getPendingOperations() {
+        Set<IntentOperations> ops = Sets.newHashSet();
+        synchronized (this) {
+            for (SQueue<IntentOperations> queue : batchQueues.values()) {
+                ops.addAll(queue);
+            }
+            return ops;
+        }
+    }
+
+    @Override
+    public Set<IntentOperations> getCurrentOperations() {
+        //FIXME this is not really implemented
+        return Collections.emptySet();
+    }
+
+    @Override
+    public boolean isLocalLeader(ApplicationId applicationId) {
+        return myTopics.contains(applicationId);
+    }
+
+    @Override
+    public void setDelegate(IntentBatchDelegate delegate) {
+        this.delegate = checkNotNull(delegate, "Delegate cannot be null");
+    }
+
+    @Override
+    public void unsetDelegate(IntentBatchDelegate delegate) {
+        if (this.delegate != null && this.delegate.equals(delegate)) {
+            this.delegate = null;
+        }
+    }
+}
diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/KryoNamespaces.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/KryoNamespaces.java
index b366dbf..231bd7f 100644
--- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/KryoNamespaces.java
+++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/KryoNamespaces.java
@@ -73,6 +73,8 @@
 import org.onlab.onos.net.intent.HostToHostIntent;
 import org.onlab.onos.net.intent.Intent;
 import org.onlab.onos.net.intent.IntentId;
+import org.onlab.onos.net.intent.IntentOperation;
+import org.onlab.onos.net.intent.IntentOperations;
 import org.onlab.onos.net.intent.IntentState;
 import org.onlab.onos.net.intent.LinkCollectionIntent;
 import org.onlab.onos.net.intent.MultiPointToSinglePointIntent;
@@ -275,7 +277,9 @@
                     WaypointConstraint.class,
                     ObstacleConstraint.class,
                     AnnotationConstraint.class,
-                    BooleanConstraint.class
+                    BooleanConstraint.class,
+                    IntentOperation.class,
+                    IntentOperations.class
                     )
             .register(new DefaultApplicationIdSerializer(), DefaultApplicationId.class)
             .register(new URISerializer(), URI.class)
diff --git a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleIntentBatchQueue.java b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleIntentBatchQueue.java
index f92eca0..57b854f 100644
--- a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleIntentBatchQueue.java
+++ b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleIntentBatchQueue.java
@@ -20,6 +20,7 @@
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Deactivate;
 import org.apache.felix.scr.annotations.Service;
+import org.onlab.onos.core.ApplicationId;
 import org.onlab.onos.net.intent.IntentBatchDelegate;
 import org.onlab.onos.net.intent.IntentBatchService;
 import org.onlab.onos.net.intent.IntentOperations;
@@ -94,6 +95,11 @@
     }
 
     @Override
+    public boolean isLocalLeader(ApplicationId applicationId) {
+        return true;
+    }
+
+    @Override
     public void setDelegate(IntentBatchDelegate delegate) {
         this.delegate = checkNotNull(delegate, "Delegate cannot be null");
     }
