My requirement is to utilize 2 different database sources(persistent) and serve to frontend. To make api response faster can I utilize in-memory database like H2 or gemfire, to store data that is known to be frequently accessed (like a cron job at some time does that) and for other calls go to the databases. Here, the challenge for me is transferring the data from persistent to in-memory as Spring needs same 2 POJO's with different annotation(For e.g @Document for mongo, for h2,gemfire @Entity). as of now it does not make sense manually go through each record from an array received from mongo and save it in in-mem.
Can persistent databases and in-memory database work together?
335 views Asked by reelpro7on At
1
There are 1 answers
Related Questions in MONGODB
- MongoDb not connecting C#
- How do I link two models in mongoose?
- MERN Stack App - User Avatar Upload - 500 Error After Deployment on Render
- On the server side, it returns undefined but on the client side, logs the values no problem
- Laravel: Using belongsToMany relationship with MongoDB
- What are some MERN projects that will grow me from junior dev to senior
- Save Interface in DB golang
- findOneAndUpdate not updating value in mongodb?
- Get Type Error when using .countDocuments with mongoDB
- Getting a Large Error Output When Calling MongoDB/Mongoose Functions Without an Error Message
- How to enter data in mongodb array at specific position such that if there is only 2 data in array and I want to insert at 5, then rest data is null
- using Python to insert_one to my mongo_db, How do I pass key values into a function?
- SSL Certificate Verification Error When Scraping Website and Inserting Data into MongoDB
- connect ECONNREFUSED 43.205.72.30:27017 while connecting to Atlas
- Vite is probably changing my import path. What should I do?
Related Questions in SPRING-BOOT
- Multi Tenancy in Spring - Partitioned Data Approach
- I have created a spring boot application with spring data JPA, Rest ,oracle and i am getting this ORA-00933: SQL command not properly ended
- Springboot: How to get an entity optional property and check null?
- How to create jasper report in spring boot rest api with jpa
- JSON Body is Not Passing Certain Strings
- Unresolved reference error is showing up after adding the dgs codegen plugin successfully
- Transaction silently rolled back
- JPA buddy error when generating JPA Entities from DB
- Migrating Spring Boot 2 to 3 throws org.glassfish.jaxb.runtime.v2.runtime.IllegalAnnotationsException: 3 counts of IllegalAnnotationExceptions
- Hibernate SQL Error: Missing FROM-clause entry for table "th1_1"
- Appwrite and / or Spring Boot Backend
- Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. I'm using Postgresql
- Driver com.microsoft.sqlserver.jdbc.SQLServerDriver claims to not accept jdbcUrl, ${SPRING_DATASOURCE_URL}: GitHub Actions
- springboot class org.hibernate.mapping.Bag cannot be cast to class org.hibernate.mapping.SimpleValue
- Spring security causing 404 with message "No static resource login"
Related Questions in H2
- No qualifying bean of type 'com.example.dao.impl.UserDaoImpl' available: expected at least 1 bean which qualifies as autowire candidate
- I am trying to use h2 in-memory db from my spring boot application, my spring boot version is 3.1.10, but its not connecting to h2 properly
- spark use the metastore with H2
- Rollback to Savepoint with H2 Database
- Sum of grouped array column elements
- How does one convert a JSON string value to a VARCHAR value (excluding quotes) in H2?
- Why H2 tries to drop table upon adding a new column with Liquibase changeset?
- Unique constaraint not working properly in unit test script
- Mockito test does not trigger unique constraint violation in H2
- H2 spring boot test drop table
- Failed to start quarkus for tests. "Datasource '<default>' is not configured." YAML configuration problem
- H2 from version upgrade 1.3.176 - 2.2.224 Exception: Cannot find h2db client jar file, h2 jdbc driver will not be available by default
- null JsonNode object saved as "null" string using H2 DB
- Proper use of field reference on JSON column in H2 database query?
- how to use flyway + h2 + jooq codegen together?
Related Questions in IN-MEMORY-DATABASE
- Is it possible to append the data in Redis command
- Showing Console of hsqldb as H2, Spring Boot 3
- C# EF - How to unit test a SQLite file in memory?
- Best Practices for Handling Failures and Ensuring Data Consistency Across In-Memory DB, MongoDB, and Kafka in a Processing Pipeline
- Autofac Dependency Injection for Azure Table and EntityFrameworkCore InMemoryDb
- NpgsqlTsVector doesn't work using EF In Memory Database
- ApplicationDbContext instance is creating again and again
- Can't seed data in mocked InMemory db in Integration tests
- In-memory data store in the Ballerina: implementation, limitations, and scaling
- In-Memory database versus shared memory IPC
- About refreshDatabase trait in laravel unit testing
- Attach in-memory sqlite database to physical database connection in c#
- Postgres in memory for CI/CD purposes in node runtime
- Entity Framework : referencing other objects
- Can I rewrite this query to LINQ?
Related Questions in SPRING-DATA-GEMFIRE
- How to do SubString in gemfire Query?
- Using @Region with conditionals
- How to specify groups while creating a region using spring data geode?
- Is it possible to have 2 Gemfire clients in the same JVM?
- Fetch Last 24 hour data using Gemfire OQL
- PartitionOfflineException getting spring + geode + kubernetes
- Integration tests with Cucumber using embedded GemFire for a Spring Boot application deployed in an Apache Geode client/server topology
- Pivotal Gemfire: Cannot create GemfireCache; NoSuchMethodError Jgroups
- Unable to create Global region using Spring Data Geode/Gemfire
- CacheServerApplication unable to connect to Gemfire cluster running apart from localhost
- Spring Boot Data Geode Fails to Start Docker Container
- Can persistent databases and in-memory database work together?
- Geode Authentication implementation using TLS/SSL certificate
- <gfe:entry-ttl> and <gfe:entry-tti> elements are not allowed under <gfe:replicated-region>
- Issue with Spring Boot Gemfire Integration
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You can utilize the Spring Framework's Cache Abstraction and different forms of caching patterns when using Apache Geode (or alternatively, VMware Tanzu GemFire). See a more general description about caching starting here.
I also provide many Samples of the different caching patterns in action, Guide and Source included, which are reference in the relevant section in the reference documentation.
Finally, in the Spring Boot for Apache Geode project, I also have 2 test classes testing the Inline Caching Pattern, which you may refer to:
The primary, backend data store used in Inline Caching is made irrelevant since it uses the Spring Data Repository abstraction to interface with any data store (referred to as "modules" in the Spring Data portfolio; see here) supported by the SD Repository abstraction.
Caching is but 1 technique to keep relevant data in-memory in order to improve response times in a Spring (Boot) application using a backing data store, such as an RDBMS, as the primary System of Record (SOR). Of course, there are other approaches, too.
Apache Geode can even be configured for durability (persistence) and redundancy. In some cases, it might even completely replace your database for some function. So, you have a lot of options.
Hopefully this will get you started and give you more ideas.