Does Hazelcast support JSON-based objects in cache? - hazelcast

As in the topic: I can't find any good information whether Hazelcast can support storing JSON objects as cache data? If so does it allow to query such objects basing on some JSONPath/JPQL/SQL-like expressions?
I can see that Apache Geode (GemFire) does support such functionality: http://geode-docs.cfapps.io/docs/developing/data_serialization/jsonformatter_pdxinstances.html and I am wondering if the big rival can do the same.

A JSON support has been added in Hazelcast 3.12: https://docs.hazelcast.org/docs/latest/manual/html-single/#querying-json-strings
You can checkout the merged pull request: https://github.com/hazelcast/hazelcast/pull/14307

In Hazelcast 3.6 you have custom extractors -> You could have a JSON extractor and then use in queries. See https://github.com/hazelcast/hazelcast-code-samples/tree/master/distributed-map/custom-attributes as an example.

Hazelcast doesn't have out of the box support for JSON.

Related

JOOQ how generate record without connection to database

What does your approach to generating Records during compilation time look like without connection to the database? I use to maven plugin for that but I still need a connection to the database but I don't have one.
jOOQ offers 4 out of the box solutions to generating code without a connection to a live database, including:
JPADatabase if your meta data source of truth is encoded in JPA annotations
XMLDatabase for XML based meta data
DDLDatabase for DDL script based meta data (e.g. Flyway migrations)
LiquibaseDatabase for liquibase migration based meta data
All of the above meta data sources come with their own set of limitations, including lack of support for some vendor specific stuff, but that might not affect you. In simple cases, especially the DDLDatabase can be really useful to achieve quicker turnarounds when generating code.
If vendor specific functionality is a thing in your application, then the official recommendation is to use testcontainers to set up your schema for jOOQ code generation (and integration testing!).

Hazelcast JCache predicate

Previously I used Hazelcast Java API and was able to do predicate to filter on result return.
Currently, as we are moving towards portability of IMDG, I used JCache API. However, i did not manage to find anything related that will allow me to do predicate/filtering/searching on IMDG cache.
Have anyone done similar thing before?
JCache does not have any Query API. If you used the IMap you would get the same features as in JCache plus Querying.

Geomesa accumulo CURD data operations using WFS geoserver

I have created geomesa accumulo datastore and can query features using command line. Now i want to perform data operations using Open Geospatial Consortium's (OGC) Web Feature Service (WFS) for creating, modifying and exchanging vector format geographic information. I don't want to create proxy client or deal with thrifts for programatically operating with accumulo storage. Instead what are other techniques to insert and read using filters for geomesa accumulo storage data.
GeoMesa integrates with GeoServer to support such use cases.
Using WFS to read data is a very common use case. To write data to a layer in GeoServer, you'll want check out WFS Transactions (also called WFS-T). I've used both with GeoMesa and GeoServer successfully.
Check out http://www.geomesa.org/documentation/user/architecture.html#geomesa-and-geoserver for background about GeoMesa and GeoServer. This link provides information about setting up GeoMesa's Accumulo DataStore with GeoServer (http://www.geomesa.org/documentation/user/accumulo/install.html#installing-geomesa-accumulo-in-geoserver). General GeoMesa-GeoServer usage is documented here: http://www.geomesa.org/documentation/user/geoserver.html.
For some quick links to GeoServer's WFS details, I'd suggest reading through (http://docs.geoserver.org/latest/en/user/services/wfs/reference.html) and checking out the demos which come with GeoServer (http://docs.geoserver.org/latest/en/user/configuration/demos/index.html#demos).

Why is there no built-in HashMapStreamSerializer in Hazelcast?

The Hazelcast documentation provides examples of how we can write our own LinkedListStreamSerializer and HashMapStreamSerializer and it says that support will be added for these in the future.
It looks as though the LinkedListStreamSerializer is in fact supported now, which is great, but not the HashMap one.
I'm wondering if there is any reason why not and should I be concerned about continuing to use the example one from the documentation.
You should be fine with the HashMapStreamSerializer.
It's now tricky to add a new serializer into Hazelcast due backward compatibility - as older clients wouldn't be able to deserialize blobs serialized with the new serializer.

Pagination using custom payloads option with Java driver 3.1 and Cassandra

I am using cassansra 3.7 and Java Driver 3.1. i have written a java code to connect cassandra and fetch data from database.
I found that pagination will be possible using custom payload option by following this url http://datastax.github.io/java-driver/manual/custom_payloads/
But i did not find any example to use custom payloads to achieve pagination.
Can anybody please let me know how to use this option.
Thanks in advance.
Custom payloads are not used for pagination. They only mention paging there as a note on how custom payloads are handled during paging. Custom payloads are only used when you're integrating with a custom QueryHandler on the server side.
Paging is done implicitly by the driver. Please see the documentation here for paging with the java driver.

Resources