I'm building a project that relies heavily on data read from a bunch Garmin eTrex HC devices, to do that I use the Garmin Communicator Plugin API, I have successfully found the device, read the data and uploaded it to a server where I will do further data manipulation.
However, I now want to delete the data I have read from the device, I have found nothing in the API reference provided by Garmin and now, I need to turn to you clever folks in order to solve my problem since I've been tearing my hair out all morning trying to figure this out.
I cannot rely on the person carrying the device to reset it properly since there is an angle of competition in the mix.
Any way I can delete the data from the device will be greatly appreciated, any solution that involves, deleting data, resetting the device or really, whatever.
If the community answer is "This cannot be done" I will have to accept that and do some fact checking on the server side (which I might do anyways) in order to prevent data uploaded multiple times.
It looks like garmin simply hasn't included this natively into the API, but...
When you delete data you're actually writing data.
It doesn't look like the JS file GarminDevice.js has any method for removing data. I would write zeros or otherwise into the data space.
Related
I want to use model-viewer or three.js to showcase some of my 3d models on a personal website. In order to display 3d models on the web, the client needs to fetch the files from the server (the 3d mesh and the texture images)
But I don't want my visitors being able to access any of these files. I hope you can point me in the right direction. Here are some ideas I had, but I don't think they'll work:
(1) Using something like crypto-js to encrypt and decrypt files
But when decrypting files on the frontend aren't users able to decrypt the files, too?
The key has to be transferred to the frontend code somehow, doesn't it?
(2) Splitting the files up into little pieces and recomposing them on the client
Same issue as with #1
The code for recomposition needs to sit on the client and can be used to access the files
When elaborating on those ideas, I am not quite sure if what I am trying to do is even possible 🤔
In case it is impossible... is there anything I can do to make it really hard for users to get access to the files?
The short answer is: If it is on a website, you don't stand a chance to protect it against a determined person with enough time on their hands. The only exception here was made for video-streams, which can use the 'Encrypted Media Extensions' API to get video to the screen without any parts of the browser being able to interact with raw data.
Whatever you do to protect the files, the code to read them needs to be sent to the browser as well. Eventually, the raw data will be somewhere in the memory of the js-runtime where it can be extracted using the built-in debugger. The same goes for any mechanism to somehow encrypt the code. It makes it more difficult, but not impossible. You could use WebAssembly to make that part of the code even harder to reverse-engineer, but I wouldn't need to do that:
In the end, the data needs to get to the webgl-api, so I could just use a browser-extension to intercept the relevant webgl-calls and obtain all the raw data there. You could go on and also encrypt the vertex-data in a way that can be decoded in the vertex-shader, but guess what: I can read the vertex-shader code as well.
And so the list goes on. There just is just no way to do it that cannot be somehow circumvented. But maybe you make it difficult enough for nobody to bother...
For me the most promising options seem to be:
use LoFi or partial models for rendering in the browser alongside renders of the full-resolution model. I've seen that on several sites for downloading CAD-/3D-models. They used merged models, sometimes reduced vertex-count, low-res textures and so on while providing images of what the final result will look like once I paid for it.
make up your own file-format or hide the file-format used in the network-view of the developer-tools. Google maps/earth for instance does that with their 3d-data (they are probably using something based on protobuf, but it's incredibly hard to reverse-engineer)
and yes, I guess you could also use the WebCrypto-API with a pre-shared secret so it is at least not too obvious which of the files contain the 3d-data.
I've been tinkering a bit on a small application which would show a limited amount of data to the viewer in a nicer way. I was thinking instead of opting for a database (be it SQLiteor / MongoDB) to have my data stored in a simple json file. It would have below characteristics:
Static data (will never have to be updated - 100-150 arrays)
Not private data - can be freely accessed by anybody which has access to the application
Offline application (not a single connection with internet)
Multiple users which would read only the data
JavaScript being used for this
What I am wondering about though is simultaneous reads. The application would never be used to update the data, it remains static. However there might be several people using the application simultaneously. As the tool will be stored on a shared drive, accessible by several other clients at the same time (only to read the file).
As I haven't touched anything with data or databases yet, I'd wanted to see if anybody already tried this out before I go into it deeper.
I am aware of the implications in terms of security however the data inside the application is not secure data and can be accessed by anybody freely. I only want to show it in a nice way. And as it is static anyway I was going to opt for a JSON file i/o starting to work with a database to speed up the development.
As far as I can see from your description, I think that there should be no conflict. You should be fine.
It's actually fairly common to use JSON-formatted files to store truly-static data.
I'm currently in the process of making an App using Javascroipt and Phonegap that needs to save a Database or something similar localy while offline until it is later synced with an external Database (not the main Problem).
So whats the best solution for managing relativly big chunks of data that have to be modified a lot during runtime, be able to delete entrys, add new entrys, read entrys using attributes and ids, sort entrys and be able to import and export data in a file (i.e give me a string or object that I can save in a file using phonegap)?
I already looked at TaffyDB (abandonned since 2 years) and pounchDB (seams to work using ajax and therefore require internet connection).
Its good that you have already tried pouchdb.js that is client side implementation of couchdb database and is supported and tested for all the major browsers and platforms.
indexeddb is actually latest web browser standard for storing large chunks of data in the form of objects.
All the major storage libraries including pouchdb are based on this only.
Kindly mark this answer if this is what you need or comment back for more explanations.
I would like to have a page where a restaurant can log in and see all of their current reservations/take-out orders, and I want this page to automatically update when someone (from another computer) makes a reservation or places an order. The idea is that the restaurant would leave this page open at all times to show their current status. What is the best way to do this? Can it be done without refreshing the page?
I wasn't even sure how to refer to a setup like this, so I wasn't really able to find much using Google. Is there a word for this type of setup?
I am using rails, and I am considering using AngularJS for the front end. Any suggestions?
There are two approaches to solving this.
The first, oldest, simplest is that your webpage contains some javascript that will poll the server at regular intervals (e.g. every 10-30 seconds), to check if something has changed and then add the changed data (e.g. reload a partial).
The second approach is a bit cleaner, and it allows the server to push the changed data to the connected clients, only when it is changed.
There are a few available approaches/libraries for this:
use websockets
use pusher
use juggernaut The author of juggernaut had deprecated it, in favor of using HTLM5 SSE (server sent events). Read more.
The advantage of using polling is that it is easy, works on every browser, but you have to write more code yourself, you will put some kind of load on your server, even if data has not changed (although the load is minimal).
The push-technologies are newer, work very clean, less code is needed. But some work only in newer browser (most of the times not really an issue), and some require extra support/setting up on your server-side.
On that note: pusher is really easy to get started with, and if your load is limited, it is free.
There are still a lot of others, but this should get you started in the right direction.
I have an iOS app in which I use parse.com as backend service. Now, I hired someone to do a website interface using HTML and CSS. I want to share the same data between iOS app and website, I know parse.com offers me a few ways to do this, including creating a javaScriptapplication. The problem is, my programmer doesn't have any experience in JavaScript, nor do I.
My question is: Is it possible to use what I have (objective-c, xcode) as far as retrieving data from parse.com and showing on website? Even if I need to code something new, is it possible to use objective-c together with HTML and CSS?
Thanks.
Parse has several APIs, one of which is REST. Your web developer should use the REST API to get data from Parse
https://www.parse.com/docs/rest
If there is will there is way, but you'll be making something really specific to your use and will be non standard and will be immediately hard to maintain, I recommend that you hire another developer and do things properly using the technologies given to you by parse !. if the cost will be high now I can promise you it'll be much higher if you went the path you're going to now.
So my answer is:
Yes, everything is possible and no, don't do it ! :)
Edit: Added an example to a possible way to do it to actually answer OP's question.
Example case:
1-Create a simple Mac Application in Xcode that fetches data exactly like you do it on iOS, and store the needed data into a database of your choice on your server
2-You now have access to the data you needed from parse, but on a local mirror. you will need some tool to fetch that data though, I recommend a simple PHP script.
Note that this will require an OSX server to always be running to fetch that data, you'll also need of find a way to fetch data on demand when a user needs it Vs. polling at specified intervals, this will hardly scale and will be costly as I said.