Core
Guides v2.x
2

Towards Kuzzle 3 #

Kuzzle 3 has no release date yet. This page tells you what it will change, so that you can get ready while you are still on Kuzzle 2.

The rule in Kuzzle 2 #

Kuzzle 2 takes no breaking change. When something should be removed or fixed in a way that would break existing projects, Kuzzle 2 keeps it working, marks it deprecated where it can, and puts it on the Kuzzle 3 list. Your Kuzzle 2 project keeps working with every 2.x release.

Most of what Kuzzle 3 removes already has a replacement in Kuzzle 2. If you move to the replacements now, upgrading to Kuzzle 3 will be much easier. The tables below give each replacement.

The main changes #

Storage engines become installable drivers #

Today, Elasticsearch 7 and 8 support is built into Kuzzle. In Kuzzle 3, each storage engine will be a separate package (a driver) that you install next to Kuzzle. This keeps the core smaller and opens the door to other engines.

In Kuzzle 2, Elasticsearch 7 and 8 keep working exactly as they do today.

Kuzzle's types no longer come from the SDK #

Kuzzle still re-exports parts of the JavaScript SDK. Kuzzle 3 will stop re-exporting the SDK's client classes, and Kuzzle's types will come only from kuzzle-types (already the case for the API contract types since 2.58).

Deprecated features are removed #

Everything marked deprecated in this documentation (look for the deprecated badge) is removed in Kuzzle 3.

What you can do now #

Plugins and applications #

Deprecated in Kuzzle 2Use instead
Mutex, context.constructors.MutexwithLock
Kuzzle, WebSocket, Http, KuzzleAbstractProtocol imported from kuzzleImport them from kuzzle-sdk; on the server, use app.sdk
KuzzleDocument typeKDocument
Document, DocumentContent, DocumentMetadata, DocumentHit typesKDocument, KDocumentContent…
EventHandler typeHookEventHandler, PipeEventHandler, ClusterEventHandler
A hook or pipe handler given as a method name (a string)A function
request.setResult()request.response.configure({ result })
request.getArrayLegacy()request.getArrayOrCsv()
request.input.resource, request.input.headersrequest.input.args, request.context.connection.misc.headers
request.context.connectionId, request.context.protocolrequest.context.connection.id, request.context.connection.protocol
context.accessors.executecontext.accessors.sdk
context.constructors.Koncorde, RequestContext, RequestInputImport them from kuzzle
context.errors, context.errorsManager, context.logcontext.kerror, context.logger
Plugin controllers and routes objects, route.url, the /_plugin/<name>/… URLsThe plugin api object, route.path
app.config.set(), app.config.merge()app.config.content
logger.verbose(), logger.silly()Another log level
InternalLoggerLogger (app.log, context.logger)
The Koncorde class exported by kuzzle (Koncorde 3 interface)The koncorde package (Koncorde 4)
app.sdk.auth.login()Impersonation (app.sdk.as(user))
Protocol.init(name, entryPoint)name in the constructor, init(entryPoint)

API clients #

Deprecated in Kuzzle 2Use instead
The legacy auth HTTP routes (/users/_me, /_updateSelf…)The /_me… routes
server:getStats, getLastStats, getAllStatsserver:metrics (/_metrics)
GET /_publicApi, DELETE /_mdelete, PUT /:index/:collection/_mappingGET /_openapi, DELETE /_mDelete, collection:update
The PUT forms of document:update, upsert, mUpdatePATCH or POST
collection:updateMappingcollection:update
The roles body property of security:searchProfilesquery
The ids in the document:deleteByQuery responseIts documents array
The memoryStorage alias in role rightsms
realtime:validatedocument:validate

Kuzzle 3 also plans to make multi-document actions (document:mCreate, mUpdate, mDelete, bulk:import…) fail when none of the documents could be written, and to forbid @ at the start of index and collection names.

Events #

Deprecated in Kuzzle 2Use instead
The pipe notify:dispatchcore:realtime:notification:dispatch:before
core:hotelClerk:addSubscriptioncore:realtime:user:subscribe:after
core:hotelClerk:removeRoomForCustomercore:realtime:user:unsubscribe:after
room:newcore:realtime:room:create:after
room:removecore:realtime:room:remove:before
kuzzle:start, core:kuzzleStartkuzzle:state:ready
core:shutdownkuzzle:shutdown
http:GET (the event of a route declared with an uppercase verb)http:get

Configuration #

Deprecated in Kuzzle 2Use instead
security.jwtsecurity.authToken
The Redis database optionoptions.db
plugins["kuzzle-plugin-logger"]server.logs
plugins.common.pipeTimeout— (no longer used)
server.protocols.websocket.heartbeat— (ignored already)
realtime.pcreSupport—
http.routes[].urlhttp.routes[].path
The kuzzle-plugin-cluster pluginNothing: the cluster is built in

Still under discussion #

Some other changes are being considered for Kuzzle 3 and are not decided yet: the true nullability of a few public TypeScript signatures, the default of vault.newAlgorithm, security.authToken.gracePeriod taking precedence over security.jwt.gracePeriod, a few public exports that were never documented (ObjectRepository, Store, Connection…) becoming internal, the response shape of a few security actions, and the Redis and MQTT connection defaults of the new library versions. This page will say so once they are decided.