Timeseries db and flutter how to get started

I want to give MongoDB a try for a new app I am developing with Flutter. For now I need to store timeseries locally. What is the best way to start? Until now I cant understand what I should install on the device. And I want to use Dart/Flutter? What should I install on the device? No cloud for now please.

Thanks to anyone who can give me some clear guidance.

If you are using Flutter then take a dependency on realm - that is all you need to install for local use.

Next, create a schema by defining realm models as described here

Then, open a realm. For local only, use Configuration.local when creating your realm.

Now you are ready to work with realm objects.

In general I would recommend that you spend some time reading the official docs. They are intended to help people get started, and the docs team has worked hard and diligently to that end.

Reading over your original post again, it is not super clear to me, if you want to use Atlas Device SDK (formerly known as realm, and still so named on pub.dev), or if you want to work directly with MongoDB. My reply assumed the first, since we don’t have official support for the latter yet (ie. no dart driver yet)

Well, I think that is my first problem, I don’t exactly know which technology to use. What I want to do is very simple: I want to store timeseries data on the device where my app is running. I don’t want to store anything in the cloud or an external database. What technology is Mongo offering to do this? How should I start?

For a local embedded database MongoDB has Realm. It is part of the Atlas Device SDK offering. Realm comes with the option of synchronizing with MongoDB Atlas, but you don’t have to.

Using MongoDB Realm without sync is free - both from the beer and speak perspective. Obviously we hope you will find the sync offering appealing, as that is what drives revenue for us.

Again, I hope the docs can help you get started.

@Kasper_Nielsen1 has covered what your use-case involves.

Adding some resources here in case you want to learn more about our time-series offering with MongoDB available across Community, Enterprise Advanced, and Atlas.

Here are some resources in case you want to learn more:
a. Time-series docs page – https://www.mongodb.com/docs/manual/core/timeseries-collections/
b. Creating and querying time-series collection – https://www.mongodb.com/docs/manual/core/timeseries/timeseries-procedures/
c. MongoDB's New Time Series Collections | MongoDB

1 Like

My plan is to first start local and later on activate the synchronization for certain devices. I will start with testing Realm in the next week.

Thanks a lot for your responses. They clarify all my questions.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.