GithubHelp home page GithubHelp logo

spacecloud-io / space-cloud Goto Github PK

View Code? Open in Web Editor NEW
3.9K 3.9K 212.0 68.03 MB

Open source Firebase + Heroku to develop, scale and secure serverless apps on Kubernetes

Home Page: https://space-cloud.io

License: Apache License 2.0

Go 98.35% Dockerfile 0.05% Shell 0.24% Scala 1.28% PowerShell 0.08%
baas database event-driven firebase graphql kubernetes microservice microservices mongodb mssql mysql paas postgres realtime serverless

space-cloud's People

Contributors

10allday avatar akshayjj1997 avatar aliabbasmerchant avatar atharva29 avatar ayan4m1 avatar heyitsjs avatar high-functioning-sociopath avatar inconnu08 avatar ivanoats avatar jcs98 avatar kaivalya97 avatar kavishshah09 avatar khannaabhi avatar khushalpshah avatar ledex avatar michael-orzel avatar nicknonis avatar prakashmishra1598 avatar prithvi081099 avatar rushikesh-kulkarni avatar sarveshkargutkar avatar sharadregoti avatar shreyalaheri avatar shubham4443 avatar sosiska avatar suyash16999 avatar thienpow avatar u5surf avatar vedantparanjape avatar yourtechbud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

space-cloud's Issues

Need logging in Space Cloud

Currently space cloud doesn't provide any logging. We need a proper logging mechanism with configurable levels.

Add joins to all supported databases

We need to add support for doing joins. In SQL databases it would be a native join while in Mongo it would be an application side join.

The concern I have here is, how will the where (find) clause be applied on the joints table.

API for CRUD needs to be updated

The API for CRUD needs to be updated to make it short and more intuitive.

Here's the current API for javascript:

// Insert one / all:
db.insert(col).one(doc).then(res => ...).catch(ex => ...);
db.insert(col).all(docs).then(res => ...).catch(ex => ...);

// Get one / all:
db.get(col).where(whereClause).one().then(res => ...).catch(ex => ...);
db.get(col).where(whereClause).all().then(res => ...).catch(ex => ...);

// Update one / all:
db.update(col).where(whereClause).set(obj).one().then(res => ...).catch(ex => ...);
db.update(col).where(whereClause).set(obj).all().then(res => ...).catch(ex => ...);

// Delete one / all:
db.delete(col).where(whereClause).one().then(res => ...).catch(ex => ...);
db.delete(col).where(whereClause).all().then(res => ...).catch(ex => ...);

In the new API there should not be explicit one() and all() method. The API should take the default operation type to be all since one is used very rarely and also one is not available on SQL. However, the user should be able to change the op by calling an optional op method. The method apply will actually trigger the request.

This is the new proposal:

// Insert all:
db.insert(col).docs(docs).apply().then(res => ...).catch(ex => ...);
// Insert one:
db.insert(col).doc(doc).apply().then(res => ...).catch(ex => ...);

// Get all:
db.get(col).where(whereClause).apply().then(res => ...).catch(ex => ...);
// Get one:
db.getOne(col).where(whereClause).apply().then(res => ...).catch(ex => ...);
// Get count:
db.count(col).where(whereClause).apply().then(res => ...).catch(ex => ...);
// Get distinct:
db.distinct(col).where(whereClause).apply().then(res => ...).catch(ex => ...);

// Update all:
db.update(col).where(whereClause).set(obj).apply().then(res => ...).catch(ex => ...);
// Update one:
db.updateOne(col).where(whereClause).set(obj).apply().then(res => ...).catch(ex => ...);
// Upsert:
db.upsert(col).where(whereClause).set(obj).apply().then(res => ...).catch(ex => ...);

// Delete all:
db.delete(col).where(whereClause).apply().then(res => ...).catch(ex => ...);
// Delete one:
db.deleteOne(col).where(whereClause).apply().then(res => ...).catch(ex => ...);

Typo mistake in Readme

The main reason Space Cloud was born was to simplify the app / web development process. Right from making simple CURD CRUD operations to syncing data reliably in a distributed environment, everything must be as simple as a function call.

The docs styles isn't proper

I noticed some styling issues with the docs specifically for the code tags. Can we make the long code lines wrap automatically?

Also, it would be great if the width of the docs would be larger on the browser.

Pub sub module

Problem faced right now

There's no way in SC to let users sync data easily without touching the Database module

How can we solve it

We can have a pub sub module built into Space Cloud which lets users to publish and subscribe data.

We need to make sure the security rules are enforced for each object published. Also the consistency level needs to be tunable.

For example, if a client looses the connection due to connectivity issues at the time a data point was published, should he be delivered the message or not?

Loads of things to consider to do this right!

What sample apps can we create as use cases for Space Cloud

We should definitely create some use cases. Need ideas on what we can do!

Here are some to get started

  • Realtime chat app with "last seen" and "is typing" feature
  • An IoT Fleet management system
  • a markdown editor where multiple people can collaborate in real time (google docs for markdown
  • an e-commerce portal
  • a social media platform

Even the most craziest of ideas are welcome!

Typo mistake in Readme

The main reason Space Cloud was born was to simplify the app / web development process. Right from making simple CURD CRUD operations to syncing data reliably in a distributed environment, everything must be as simple as a function call.

unsafe password handling

actual plaintext passwords being sent in user management, really unsafe thing to do. Standard way is to salt the passwords and the compare the hashes, not plain text passwords

The config file used in the example can be more elaborate

I thing the config file provided in the example here should cover all the possible configuration. Maybe we can put the defaults of each module (enabled = false)?

Also it will be of great help if the config file has helpful comments. The config file should be self documenting.

Schema validation

The problem faced right now

There's no way to enforce a schema for schemaless databases(like MongoDB) in SC.

How can it be solved

Allow SC to accept a schema via Mission control for various collections. This schema should have the following field level config optons:

  • Data type (int, string, bool etc)
  • Default value
  • Required
  • Optional encryption / hash / bcrypt operation

Need to rename transaction to batch in http and gRPC endpoints.

The transaction support we have added works more like a batch. Let's make that more explicit. This will require us refactoring:

  • The https endpoint (url)
  • The gRPC rpc name.
  • The CRUD interface in crud.go and operations.go
  • the func name in sql and mongo packages

Ability to put raw MongoDB where query in the mongo client sdk !

We are already sending out the where clause as a MongoDB query to the backend. Why not let the user put the raw query directly?

I know this is a request for the client libraries. But lets put it here to keep track. The updates of it being done on individual clients can be done here.

Request to allow hosting static files.

It would be really useful if space-cloud allowed the user to host static files as well.
Adding this feature will definitely help space-cloud lift up above the others.

AllRequest may be redundant

Currently, server.proto defines BatchRequest in the following way:

message AllRequest {
  string col = 1;
  bytes document = 2;
  string operation = 3;
  bytes find = 4;
  bytes update = 5;
  string type = 6;
}
message BatchRequest {
  repeated AllRequest batchrequest = 1;
  Meta meta = 2;
}

Instead of AllRequest we can directly use the already defined CreateRequest, ReadRequest, etc

message BatchRequest {
  repeated CreateRequest cr = 1;
  repeated ReadRequest rr = 2;
  repeated DeleteRequest dr = 3;
  repeated UpdateRequest ur = 4;
  repeated AggregateRequest ar = 5;
  Meta meta = 6;
}

To be considered:

  1. This new method will remove the AllRequest message.
  2. The predefined messages will be used. This will help to segregate and identify the specific components in the batch request. This may also make it easier to implement in the client modules.
  3. The meta field may be repeated, but we can always omit it in the component CreateRequest, ReadRequest, etc.

Need to improve the docs and quick start

The docs are not good enough. People new to the project won't be able to understand its aim and where it fits. Also the quick start seems to be a bit scattered and doesn't paint a clear picture regarding what it does.

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.