IntelligenceModding / Advanced-Peripherals-Features

A place for the feature request for Advanced Peripherals
0 stars 1 forks source link

SQLite block #75

Open scmcgowen opened 2 months ago

scmcgowen commented 2 months ago

Describe your idea

The Cryptographic Accelerator would provide CC computers with common cryptographic algorithms done on the Java side which is faster than implementing them in Lua, possible algorithms could be AES, RSA, and others, as well as a secure RNG, and some common hashing algorithms. (duplicated)

The SQLite block would provide access to an SQLite database on the peripheral, stored by ID similar to a computer. The databases would be stored in /world/computercraft/sqlite_block/[id].db

Describe alternatives you've considered if you've any

No response

Additional context

No response

Linked Issues

No response

zyxkad commented 2 months ago

bitcoin time!

zyxkad commented 2 months ago

What's the point for sqlite? IMO sqlite will be soo heavy with CC and lua.

Plus, concurrency on sqlite is terrible

scmcgowen commented 2 months ago

SQLite Databases could be useful to store persistent data for a program such as a chatbox service, especially considering the very limited space that CC computers have where this block wouldn't have that issue since it's a single dedicated DB

zyxkad commented 2 months ago

We must give a deep thought on SQLite:

  1. SQLite does not allow concurrency access. There is no point to use SQL without concurrency, file system + JSON will be enough (you have disks if you are out of space on computer).
  2. If you are going to create database for each block, the server will soon out of space if a player automatically place it.
scmcgowen commented 2 months ago

2 could be solved similarly to how CC computers are, where they only get assigned an ID once accessed (and therefore only get assigned a database once accessed)

zyxkad commented 2 months ago

2 could be solved similarly to how CC computers are, where they only get assigned an ID once accessed (and therefore only get assigned a database once accessed)

No, turtle can easily to automate that process you know

scmcgowen commented 2 months ago

No, turtle can easily to automate that process you know

There's a solution to players intentionally wasting space like that, it's called a ban hammer or /ban

zyxkad commented 2 months ago

The cryptographic is dup with #55

tehgreatdoge commented 1 month ago

This sounds fairly similar to the SirEdvin's Cloud Solutions mod. Also not certain how this has an advantage over a lua key-value store.