Comments (12)
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.
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.
more or less we should have something like https://moloquent.github.io/master/#configuration
from laravel-dynamodb.
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.
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.
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.
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- getSQLSTATE[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.
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.
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.
@baopham any news
from laravel-dynamodb.
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.
its okay, thanx for all ur help 👍
from laravel-dynamodb.
Related Issues (20)
- Idea to introduce a new trait that provides assertions for feature tests HOT 1
- whereNotIn not working HOT 1
- Query gives no result when there is huge amount of data in DynamoDB table HOT 1
- How to connect DynamoDB via VPC endpoint HOT 1
- Combination of wherIn() and update() not working HOT 2
- I can't sort the items on a query HOT 3
- Could you fix this code? (PHP5.6 FatalError Analyzer.php ) HOT 1
- Issue using Nested attributes HOT 1
- Could I use AssumeRole with baopham dynamodb? HOT 2
- Force KeyCondition when filtering by only partition key in a table with a composite key HOT 1
- Add DAX Client HOT 1
- Pagination HOT 3
- DynamoDbModel constructor is not calling the `initializeTraits()` method like the parent HOT 1
- Unable to update data using where() HOT 6
- dynamodb.php not recognized HOT 1
- How to use 'Sort descending' HOT 1
- How to query List\Map Key-Value field HOT 2
- Invalid Query or Scan syntax with "single-table design" indexes HOT 1
- How can we use API resources?
- Expecting RequestInterface, given RulesetEndpoint HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-dynamodb.