Giter Club home page Giter Club logo

Comments (12)

baopham avatar baopham commented on August 16, 2024

am using dynamo in local

If you're using local dynamodb, you don't need a key and secret, but the credential and region will determine the DB filename (see: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html)

I assume you have setup local dynamodb correctly according to its docs? Make sure to run the jar to spin up your local dynamodb.

It's hard to know your issue exactly. But first thing first, make sure local dynamodb setup correctly or connect to the one on AWS with your key and secret. Then setup your models according to the README in this repo.

from laravel-dynamodb.

ctf0 avatar ctf0 commented on August 16, 2024

here is what i have

# DYNAMODB_KEY=
# DYNAMODB_SECRET=
DYNAMODB_REGION=us-west-2
DYNAMODB_LOCAL_ENDPOINT=http://localhost:8000
DYNAMODB_LOCAL=true

i have ran java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb from
vendor/baopham/dynamodb/dynamodb_local and the console ran without any issues.

now for the db part, from what i understand that Dynamo works as a DB not as a side service so i believe the config should be in database.php not services.php and unless we do so the user will have to have a second connection for the pdo or we would get an error because laravel needs a db connection to operate

from laravel-dynamodb.

ctf0 avatar ctf0 commented on August 16, 2024

more or less we should have something like https://moloquent.github.io/master/#configuration

from laravel-dynamodb.

baopham avatar baopham commented on August 16, 2024

because laravel needs a db connection to operate

This is not necessarily true. Laravel can work just fine without a DB providing that you don't have any DB models or something that needs a DB connection.

As for where to put the config, it's not on my immediate todo list right now.

You should download the local dynamodb separately. The one in this repo is only for the tests.

I suspect you have the default User model and that it's looking for the default DB connection.

from laravel-dynamodb.

ctf0 avatar ctf0 commented on August 16, 2024

Laravel can work just fine without a DB

okay, how how would u use dynamo with migration and seeders ?

I suspect you have the default User model and that it's looking for the default DB connection.

nop, i have changed all the models to extend dynamo instead of laravel model

from laravel-dynamodb.

baopham avatar baopham commented on August 16, 2024

how how would u use dynamo with migration and seeders

This is not supported. You will need to roll your own scripts unfortunately.

You will need to provide more info on the logs and your setup in order for me to know the issue. E.g. steps to reproduce.

from laravel-dynamodb.

ctf0 avatar ctf0 commented on August 16, 2024

am testing with a new laravel so

1- laravel new somthing
2- comp req ur package
3- add the config
4- change the model for user & post (something to test with)
5- get SQLSTATE[HY000] [2002] No such file or directory because laravel needs a working db connection

if its possible maybe u could follow the above steps and if u got it working, u can send it to me to cross-reference and see what am missing ?

on a side note, am kinda fuzzy on how to save data & retrieve it from dynamo if its not used as db or am i missing something ?

from laravel-dynamodb.

baopham avatar baopham commented on August 16, 2024

if its possible maybe u could follow the above steps and if u got it working, u can send it to me to cross-reference and see what am missing ?

Sure... but I can't say I would be able to do it anytime soon. End of next week maybe.

on a side note, am kinda fuzzy on how to save data & retrieve it from dynamo if its not used as db or am i missing something ?

It is used as a DB but it will be on AWS so the feel might be a bit different than working with MySQL, etc.... have you played with it on AWS console?

from laravel-dynamodb.

ctf0 avatar ctf0 commented on August 16, 2024

have you played with it on AWS console?

honestly i was using mysql then started playing with mongo "i even made a tool for it https://github.com/ctf0/MysqlToMongoDb" but the scaling in mongo is agonizing to say the least so i thought i would try dynamodb,
the issue is from what i read from the examples on aws that its a key-value db "more like redis" but lots of articles says its more similar to mongo & that's why i thought i would play with it locally first,

  • see what it can and cant do
  • the differences between it and mysql
  • try it with an already made live code that works perfectlly on mysql "the same i did when trying mongo which aid in rapid understanding of the db"

and if all went well then take the next step which using the aws console it self and learn more about the scaling capabilities "more of learn to walk b4 running"

from laravel-dynamodb.

ctf0 avatar ctf0 commented on August 16, 2024

@baopham any news

from laravel-dynamodb.

baopham avatar baopham commented on August 16, 2024

It would be easier for me to see what you currently have instead of the other way around. I have limited time right now.

from laravel-dynamodb.

ctf0 avatar ctf0 commented on August 16, 2024

its okay, thanx for all ur help 👍

from laravel-dynamodb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.