Follow us

Backend suite to power & unify new age apps for web, mobile & IoT

Cloud & protocol agnostic end-to-end application stack

Combines a high level multi-protocol API, a database, a pub/sub real-time engine, as well as advanced search, geofencing, SDK(s) and Admin UI.
Kuzzle Backend is suitable for web-apps, hybrid or native mobile apps and IoT projects.

Discover Kuzzle

Solutions by technologies

Kuzzle backend combines multi-protocol capabilities (HTTP, WebSockets, MQTT) & a collection of SDK(s) , which make it suitable for any technologies & devices.

Latest news

See more news

Developer's corner - SDK(s) example

Reduce your development time & learning curve with the Kuzzle SDK(s). They provide high-level functions to make your life simpler.
Read the documentation to learn more

  • Javascript
  • Android
  • GO
  • /* Subscribe to data changes in an app */

    var kuzzle = new Kuzzle('localhost');

    kuzzle
      .collection('collection', 'index')
      .subscribe({equals: {city: 'nyc'}}, function (error, notification) {
        console.log(notification.document.content.venue);
      })
      .onDone(function (error, room) {
        /* we are now subscribed to the room */
      });
    kuzzle
      .collection('collection', 'index')
      .publishMessage({city: 'nyc', venue: 'MoMa'})
      .publishMessage({city: 'boston', venue: 'TD Garden'})
      .publishMessage({city: 'nyc', venue: 'Madison Square Garden'});
    });

    // output:
    // MoMa
    // Madison Square Garden
  • /* Subscribe to data changes in an app */
    
    Kuzzle kuzzle = new Kuzzle("localhost");
    
    JSONObject filter = new JSONObject().put("exists",
      new JSONObject().put("field", "message"));
    
    kuzzle.collection("mycollection", "myindex")
      .subscribe(filter, new ResponseListener<NotificationResponse>() {
        @Override
        public void onSuccess(NotificationResponse object) {
          // triggered each time a document is updated !
          System.out.println("message received from kuzzle:" + object.getResult().toString());
        }
      });
    // Create document
    
    Kuzzle kuzzle = new Kuzzle("localhost");
    KuzzleCollection collection = kuzzle.collection("mycollection", "myindex");
    KuzzleDocument document = new Document(collection);
    document.setContent("message", "hello world");
    
    collection.createDocument(document);
              
  • 
    ro := types.NewRoomOptions()
    cn := websocket.NewWebSocket(":7512", o)
    k, _ := kuzzle.NewKuzzle(cn, o)
    c := collection.NewCollection(k, "mycollection", "myindex")
    
    // Subscribing to offers in London and Paris
    type SubscribeFiltersValues struct {
      Values []string `json:"values"`
    }
    type SubscribeFilters struct {
      Cities SubscribeFiltersValues `json:"city"`
    }
    var filters = SubscribeFilters{
      Cities: SubscribeFiltersValues{
        Values: []string{"london", "paris"},
      },
    }
    rtc := make(chan types.KuzzleNotification)
    res := <- c.Subscribe(filters, ro, rtc)
    
    if res.Error != nil {
        fmt.Println(res.Error)
    } else {
      go func (rtc chan types.KuzzleNotification) {
        fmt.Println(<-rtc)
      }(rtc)
    }
    
    
    // Publishing a document matching the subscribe filter
    
    type offerDocument struct {
      City    string `json:"city"`,
      OfferId int    `json:"offerId"`
    }
    
    res, _ := c.PublishMessage(&offerDocument{City: "paris"}, o)
    

They Trust us