Skip to main content

Server Sent Events

This page covers features available only from 2.1.0

Instead of caching feature activation conditions of fetching them on every query, Java client can subscribe to remote Izanami updates through Server Sent Events (SSE).

Using this, you get the best of both worlds :

  • An SSE is emitted each time a feature is created/updated/deleted, this way activation conditions are always up-to-date in caches.
  • Since events are emitted only when something changes, there is no useless traffic / computations.
eyJ2ZXJzaW9uIjoiMSIsImVuY29kaW5nIjoiYnN0cmluZyIsImNvbXByZXNzZWQiOnRydWUsImVuY29kZWQiOiJ4nO1daVfbutb+3l+Rxf3a6Grcks63MFx1MDAxNcpQhlx1MDAwMC3vuYtlXHUwMDEyXHUwMDA3TMYmYVxid53//m65NHY8pFx0OFx1MDAxMHqbc0qLZTuytPejZ289kv/7oVRaXHUwMDE5jnr+yl+lXHUwMDE1/6HmtYJ637tf+eiO3/n9QdDtYFx1MDAxMVx1MDAwZn9cdTAwMWZ0b/u18Mzr4bA3+Ovf/46uILVu+8dVfstv+53hXHUwMDAwz/s//L1U+m/4M/Y9fb829DpXLT+8ICyKvoqBSVx1MDAxZd3vdsKvZVx1MDAwMqg0XHUwMDE2ZHRG0Kn7XHUwMDBm7p5cdTAwMWWNblx1MDAxNlxm1rFcdTAwMTJDv45cdTAwMDVccq818KNcdTAwMTJ3aOX4s15vfPL7+kpssf3NY8HWT1ejy1x1MDAxYkGrdTxcdTAwMWO1wrpcdTAwMGW6+HxR2WDY7zb9s6A+vMZSmTied1W/e3t13fFcdTAwMDeuTdj4aLfn1YLhyFx1MDAxZKN0fPRHw/xVio645zNUXHUwMDEzw4w2nEnDwapxqbveKE4oXHUwMDAwoyCYsIyKRL3Wuq1u39XrX8Bq9NJGNbv0as0rrF6nPj5n2Pc6g57Xxz6Mzrt/emJcdTAwMDGcXHUwMDAwU8YorFxm9kX0NNd+cHU9xFM0KFwiqVx1MDAxNsoq7C+rIaqMXHUwMDFmdlx0Z1xcczxu7LjEVaG3XVx1MDAwZm3mP1FH9L22v+0u6dy2WvHW7NSfWvOnbUXWJZ6O/Fx1M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u+qWOjy8ae9fr25z5lxyXHUwMDFmdLXYhVxui/BtXHUwMDEwJNw6XG79XHUwMDE3vYol9nvgxqBvc41sOnx/3WJ8m9vJt0tl8emM10tcdTAwMDHDYNPA279R91xynPupXCKOwLrXNb2ZJ+fWI8dtPzyF3Ster3c8xEtXfiYpVu5cdTAwMDL/fjXfaj48Ob1zJD9MXHUwMDA0/fPhn/9cdTAwMDesfy/YIn0=Izanami backendIzanami clientOpen an SSE connection for featuresf1, f2, and f3Activation status and conditions for f1, f2 and f3Disable f1FEATURE_UPDATED eventcontaining new f1 activation strategyDelete f1FEATURE_DELETED event for f1f1 is removedfrom cacheCache is hydrated withreceived conditionsCache is updated forf1

To use SSE from client:

IzanamiClient client = IzanamiClient.newBuilder(
connectionInformation()
.withUrl(<REMOTE_IZANAMI_BASE_URL>/api)
.withClientId(<YOUR_KEY_CLIENT_ID>)
.withClientSecret(<YOUR_KEY_CLIENT_SECRET>)
).withCacheConfiguration(
FeatureCacheConfiguration
.newBuilder()
.enabled(true)
.shouldUseServerSentEvent(true)
.build()
).build();

Custom SSE configuration

You can leverage two additional parameters to configure client SSE connection.

Periodic refresh

As with basic caches, refresh interval defines an interval of time at which your cache will be completely refreshed. This refreshed doesn't imply any extra HTTP call, it's done via an event sent on the SSE connection. Setting this interval to 0 will completely disable this periodic refresh mechanism.

IzanamiClient client = IzanamiClient.newBuilder(
connectionInformation()
.withUrl(<REMOTE_IZANAMI_BASE_URL>/api)
.withClientId(<YOUR_KEY_CLIENT_ID>)
.withClientSecret(<YOUR_KEY_CLIENT_SECRET>)
).withCacheConfiguration(
FeatureCacheConfiguration
.newBuilder()
.enabled(true)
.shouldUseServerSentEvent(true)
.withRefreshInterval(Duration.ofMinutes(10L))
.build()
).build();

This periodic refresh mechanism covers some rare edge cases (for instance if connection is lost just when an event occurs). Therefore, it's acceptable to use a much wider interval than with the basic cache.

Connection keep alive

When using SSE, it's a good practice to send a keep alive event periodically to prevent the connection from closing.

serverSentEventKeepAliveInterval indicates the maximum time that should separate two events sent by Izanami backend.

Izanami backend will periodically send KEEP_ALIVE events to ensure that this is respected.

IzanamiClient client = IzanamiClient.newBuilder(
connectionInformation()
.withUrl(<REMOTE_IZANAMI_BASE_URL>/api)
.withClientId(<YOUR_KEY_CLIENT_ID>)
.withClientSecret(<YOUR_KEY_CLIENT_SECRET>)
).withCacheConfiguration(
FeatureCacheConfiguration
.newBuilder()
.enabled(true)
.shouldUseServerSentEvent(true)
.withServerSentEventKeepAliveInterval(Duration.ofSeconds(30L))
.build()
).build();