One thing, although I’m not sure if it’s an issue with companion or asteroid, but whenever I try to use the get all block, companion crashes. I only have about 4 records in the db.
Get All block only returns all tags, no records. To get all records use Get Data block.
Also I don’t think AsteroidDB extension causes a crash because it only has few libraries, “Async HTTP request” and “org.json” library. And it didn’t happen on my device.
You can try these:
- See if this crash comes from extension by testing as APK.
- If it even crashes in APK, you can send a logcat report. With logcat, we can see what happens in your device.
If this crash comes from my extension, I want to know that and fix it as soon as possible
Ok, I figured out what the problem was. The URL that I put in was incorrect. Instead of calling the error event, it just crashed the app.
Don’t worry. Will be fixed in next update.
I got a crash when trying to access the DB without setting URL and password. I think it should have triggered the AsteroidDB.OnError event but it just force stopped the app. This is the same, right?
Another thing, could it be that on Android 9, this extension crashes? We are testing an app and in 3 phones with Android 8 or lower run perfectly while the one with Android 9 crashes and opens the send report notification
Yeah, it was just because of not adding a simple try catch
. It will be fixed in next release. Let me know if you encounter any errors except than this.
Update v1.1
New “Version” block
Version block now returns your AsteroidDB instance version, so you can learn if your instance is outdated and needs to be updated.
This is a new method from AsteroidDB, so you need to update your AsteroidDB instance by pulling latest commits from AsteroidDB repository to use this method. I made a guide for that:
How to update to the latest version?
Bug Fixes
Now calling AsteroidDB without setting URL
property fires OnError
event instead of app crash.
You can get the latest version of extension from first post.
Thank you!
Is it possible add theese functions to AsteroidDB?
- Append to list block(add new item to list )
- Counter value (Simple increase/decrase value by +1 / -1 or provided number(+5 , +10) for statics )
- Sort support ( for custom leaderboards)
- Secure Database ( encryption with sha or any other encryption algorithms)
Questions:
- What is the store limit of the single value? Can i store List with 10.000 item in single value?
- Any Heroku alternative hosting provider?
- 20 Connection = 20 active app user? Can i disconnect when i dont need database( for deincrease connection count)?
4.Is it use HTTPSecure connection? As you know Http is unsecured option
Too many questions and request Have a nice day
It should be done from client (app).
Let’s see what time says
AsteroidDB is a 2 column data which is tag and value. So it can only store string values. You can combine your data with CSV or JSON value, so you can store them in one column.
AsteroidDB is a simple Flask and PostgresSQL app which written in Python. And especially made for Heroku.
However, you can host AsteroidDB in any hosting provider which support these packages. As I can only test Heroku, I only made a guide for Heroku, but if you have a VPS, you can probably install AsteroidDB on.
AsteroidDB is a Web API, so when you do a request, you will be automatically disconnected from database when request is completed. So it means only 20 people can fetch data at the same time, but probably you won’t pass connection limit as requests only takes 1-2 seconds.
And you can pay for Heroku if your app has a lot of users.
Hosting provider decides that. Not AsteroidDB. But if you are hosting on Heroku, Heroku offers free HTTPS for free apps. And you can even connect your custom domain if you want.
Row limit is 10.000 in free plan. This means you can store 10.000 different tags/value pairs in AsteroidDB. However, you can store all values in one row if you need a lot of space. But I just don’t recommend as it can give a bad experience.
Thank you for the update!
Hi,
I’ve installed Python and started a Python Server on my test computer. What needs to be completed on the server side to allow connections using AsteroidDB in an app? Do I need to install something else?
Thank you
You need to install Flask, Flask_SQLAlchemy, gunicorn and psycopg2 with pip
. After that run the app.py
, and you will able to use AsteroidDB.
OK, thanks. I’ll give it a try.
how can we make login signup with this and get vale from this like firbase
This is not especially made for login / register systems, so I recommend using Firebase Auth as it has methods to sending password reset mail, verify mail and more. AsteroidDB is just a key-value pairs database. Maybe you can create a login system with it, but it is not made for it.
I’m assuming this is more secure than Firebase in test mode? which seems to be the only way I can get my app to access Firebase. I don’t have unique users that need separate read/write access. How difficult has anyone found changing to this over firebase? can I enter data as a tree as well? I store information for vehicles and hardware like who it’s assigned to and ID numbers.
Let me explain about security.
Firstly, all apps created on Heroku can’t be accessed from another websites (without any proxy) because of CORS (Cross Origin Request Sharing), nobody can access your database’s data by creating a website. Apps are working on local, so it is only way to access your database.
Secondly, I added a password record to AsteroidDB, it just creates an record with “dbpass” key, however it is hidden to everyone to prevent showing the password. Also you can’t modify / delete password record with Store, Delete methods for security.
Lastly, as AsteroidDB source is open source and written in Python, you can add your own security library by just forking the repository and editing the code.
I can’t say Firebase or AsteroidDB is better because Firebase is cloud service and AsteroidDB is just a Python app.
Thank you. I’m’ still trying to get Firebase working since it’s used pretty extensively in my app, but if all else fails I know I can go this route instead.
this is similar to TinyWebDB, so you can check this tutorial
A login template by eiXerITS
Taifun