Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm at the start of a project to create a customer support system. For this system I've looked at Meteor.js, which looks very interesting. The thing is that we want to build the rest of our system using Cassandra.
So my question is as follows; can meteor.js also be used with Cassandra instead of MongoDB? Are there any ready pieces of code to do this, or would we need to write a substantial amount of compatibility code ourselves?
You can use any database you want with Meteor, but you'll lose three of the seven key benefits of the framework:
Database Everywhere. Use the same transparent API to access your
database from the client or the server.
Latency Compensation. On the client, use prefetching and model
simulation to make it look like you have a zero-latency connection to
the database.
Full Stack Reactivity. Make realtime the default. All layers, from
database to template, should make an event-driven interface available.
I use Redis and Postgres with Meteor, in addition to MongoDB. I use Meteor Methods to expose functions on the client to create, read, update and delete records in other databases.
Official support for Redis and other databases is on the Meteor roadmap, currently targeted for version 1.1. Meteor is currently at version 0.7.0.1, so that's probably not going to happen soon.
If you want to integrate another datastore like Cassandra more tightly with Meteor, you would probably start with Meteor's mongo-livedata module.
There have been a few attempts to use Meteor with other DBs, see meteor-sql for the most interesting I know of. Generally, it shouldn't be difficult to create a wrapper for your DB that covers querying and takes care of reactivity. It's a large bit of work, but fairly easy one.
The difficulty rises significantly when you also want to use your DB for user accounts. Meteor account system uses Mongo heavily, and is blends with the rest of the platform so much that it would be quite difficult to replace it. So you'd need a workaround: either low-level wrapper that would convert Mongo queries to Cassandra queries, or dual DB (Mongo for users, Cassandra for data), or something similar.
This is asking opinion rather than any real question so I would expect your question to go away as being very off-topic.
If you had really looked at Meteor.js then you would be aware that aside from the server side implementation, there is a good deal of work done on the client side code to emulate the server side interaction with MongoDB in order to keep both client and server patterns under a familiar model for the programmer. And that it's ambitious and far from perfect, but a pretty good show.
That kind of shoots, "I want to use Cassandra as a back-end" in the foot.
All said, feel free to fork and create your own Cassandra version of Meteor. Really, give it a go, and maybe you'll get some traction from others who are interested.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I developed a Node.js Application that I would to like to sell to my clients on monthly charges.
I'm looking for solutions to:
Keep my source code safe
Easy client installation
Serial code solution for activation
Application update method
Any advise will be appreciated.
Similar Question: Secure distribution of NodeJS applications
Your goals
Keep my source code safe
The only way you can do it is by making it a Web application that is used as a service instead of being distributed to the client. Don't trust anyone who tells you about code obfuscation or encryption as this is inherently impossible.
Easy client installation
Nothing easier than a Web application.
Serial code solution for activation
For a Web application you don't even need that. And for any application that you distribute to the client it will be trivial to circumvent and there is no way around it.
Application update method
Web application is always up to date. For a distributed application you can take a look at the Electron auto updater.
Any advise will be appreciated.
General advice
My general advice would be to keep in mind that any Node application that is distributed to the client will be very easy to analyze the source code and to circumvent any activation features that you implement. The only thing you can rely on in that case is law, not technology. Make sure that the licence is enforceable and the terms are clear. Distributing the source code doesn't mean that it has to be open source. The license is what's important, not the visibility of the code.
Your options
Depending on what the application does and how the interface looks like, something that you said nothing about in your question, you have few options:
Distribute the application as is and rely on the license to protect you but understand that anyone could be able to analyze your source code no matter what you do. Here you need to manage updates for every change. People will be able to circumvent your activation code feature.
Make it a web application and keep its inner workings completely to yourself. Here you have no updates problems or source code visibility. No need for activation code, you can give access only to paying customers.
Make it a service and keep all the important logic in your backend API and distribute only a thin client that uses that API. You only need to manage auto updates of the client, the backend code is always up to date. You don't need to implement activation codes, people can just log in to the account on your system in the client program and your backend will know who is a paying customer and who's not. The only source coude visible to the client is the client side code which can be minimal and doesn't have to include any critical logic.
Of course it all depends on the nature of your application which you said nothing about.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
When developing single page applications I always question myself which is the best way to design my project. Should I de-couple client and backend? Should my client application be in the same server as my backend code? Should I invest in multiple hosting plans for client and server ? So I'm asking, which is the best approach to organize and develop a single page app?
When I was first getting started, this is a question I had and it was hard to find a complete answer online. Generally speaking, although this will be an oversimplification, here is how companies move through this process.
Monolith: An application where the back-end and front-end code live within the same project.
What this means: The codebase is easy to maintain because it is all right there. There are less complexities initially and much less time to production because it is easier to get "out the door". You don't have complexities such as how different parts of the "system" talk to each other, etc. All start-ups start here.
The cons here are that eventually the code base becomes very unmaintainable as developers cram new features and ideas into it. Also, your API is not exposed, so it can only be used for this application (more on this below).
Front-End & API: An application where the front-end code and API live separately in different codebases. The API provides just the data, usually in a JSON format in which the front-end code consumes and displays this data.
What this means: Now that you've broken out the API and front-end code bases, you can use the API to provide data for ANY front-end application that needs it. For instance, think web vs. mobile. They can both use the same API. For a larger app, this becomes much more maintain able and now you can build teams around both back-end and front-end processes. You can now achieve better scaling and efficiencies too as the project grows.
The cons here are that you now have two separate codebases to maintain, up-keep, make updates too, make sure are in sync, etc.
FEBE & Micro-services: An application where all parts of the "system" live in very siloed codebases, architecture, etc. A FEBE is a "front-end, back-end" and a micro-service is a service (could be an API) that serves a VERY specific function within the business logic. The front-end in this world may need to consume several micro-services to accomplish its goal.
What this means: This is where successful, larger companies land eventually, if they make it. Again, oversimplification, but all of the major companies are running infrastructures in this realm. This architecture is much more for teams than for coding or development. Companies with hundreds of engineers can give them each a piece of the system to own and maintain, enabling them to release at their own pace to production, etc.
The cons here are that the system is now broken into hundreds of pieces and without the man-power becomes extremely difficult to maintain. Again, the reason companies do this is because it allows teams to operate extremely efficiently and independently.
All companies as a start-up generally migrate down this list, starting with the monolith, as they survive, turn revenue, become profitable, hire more people, etc.
My advice to you is this: Start with a monolith using a Node.js (Express) back-end and either an React.js or Angular front-end.
I say this because Node.js is the future and is very easy to learn and either React or Angular are good starting places in terms of frameworks.
When you move to Phase 2 (the front-end and API), stick with Node.js and probably React at that point OR if it were me, I would just consume my API's data in Handlebars and be done with it (not using a front-end framework at all).
Hope this helps. I replied because I know how frustrating this was for me when I was searching for an answer years ago.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm writing a small gambling site where you can gamble with bitcoins.
As on the large currency exchange sites i want the user to log in. He then can create a new bitcoin address and send a amount of coins to that address.
When the transaction is six times confirmed the site should know about this status and give the user the sent amount of money on the site.
Now my question ist: Which Framework do i use.
The site will be written in Node.js. I have experience in working with the Blockchain Websocket API, but i think it is not reliable enough, so i looked into bitcoinjs.
What do you guys think? Which Framework is the best for determine these things?
Unless you are planning to use blockchain.info as your casino's wallet, I would stay away from their (or any other external) wallet management services, APIs, etc.
The traditional way of interfacing with bitcoin is by running bitcoind on your server, which is a fully fledged bitcoin client (and would need a full copy of the blockchain, so prepare for a big download there). You can communicate with it through its JSON RPC and it will keep track of different wallets/addresses you have & their balances, as well make payments when that is necessary.
That said, there appears to be a native nodejs bitcoind alternative ("bitcoinjs" that you mentioned as well) which would probably be easier to set up. My personal recommendation would be against using an unofficial/alternative implementation. Bitcoind is bitcoin, you can't go wrong with it. Bitcoinjs is far more likely to have bugs than bitcoind, and will presumably be behind bitcoind on updates, which are sometimes crucial.
Here's a getting-started-in-PHP tutorial. I know you aren't going to use PHP, but the principles are all the same. Hope it helps.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm looking to build a web app (online simple game) with javascript / HTML5 but I want a structured code.
I have do some research and Angular look like a good MVC framework.
http://angularjs.org/
Have you see other framework ? Angular is it a really good framework ?
Thanks
Edit:
Maintain javascript code is not easy and quickly becomes unreadable without an architecture that helps to develop properly.
I have a simple little web project, players are by team and have some kind of action that infuence the actions of other players.
I want a framework that allows to manage all data easily.
A little way to flex and AS3, ca would be to create the component and integrate easily into the html code.
Backbone js seems to be effective for the data binding with epoxy.
or http://docs.angularjs.org/guide/dev_guide.templates.databinding
I'll do more research because my question is too broad ...
I think this is a very broad question that simply choosing a particular library won't solve. AngularJS is great, but I think it's important to understand how to scale a javascript application. Here is a video of a presentation given by Nicholas Zakas. http://www.youtube.com/watch?v=7BGvy-S-Iag
Another good resource http://addyosmani.com/largescalejavascript/
Knowing these concepts will allow you to build an application that is capable of dropping modules in and out seamlessly. You will be able to change a module without affecting any other module because your program will be loosely coupled. Additionally, should you choose to switch from Angular to something else, this framework will allow you to swap the base library easily and without breaking very much of your code.
Also, using modules and a mediator will make your code easier to test. Testing is important in any non-trivial application. I hope this helps!
If you're looking to just quickly create a web server that can serve your javascript application, I highly recommend Rails. You can get a server up and running in just 15 minutes. Another good MVC framework is NodeJs with Express. Almost as easy to use as Rails and it's purely Javascript whereas rails is Ruby.
Here is a list of common MVC frameworks and you can choose one based on the complexity of you app and data models.
List of common MVC frameworks
if you really want to build a structured App using Angular Js Use the directory structure of ng-boilerplate
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm building my first (and rather big) NodeJS application. I need excellent performance since it's a big all AJAX (AngularJS) interface with a lot of requests from a lot of users.
I'm building the login system, and I need to choose which storage engine I will use. I narrowed down my search to 4 choices :
connect-mongo : read a lot of nice things about it, but requires the installation of MongoDB
connect-redis : read a lot of nice things about it, but requires the installation of Redis
connect-pg : don't know the performance but that's the DB we're using so no additional installation needed
cookieSession : according to this post is very fast, but I'm a bit confused at to why it's so fast and everywhere I look people seem to ignore this option
Which setup should give me the best performance possible? Without of course impacting functionality.
Thanks!
The right answer is clear by following your links and looking at the number of stars and forks. cookieSession is unacceptable because it doesn't work across multiple machines, which you will absolutely need. connect-mongo doesn't make any sense because it's not worth installing and maintaining mongo just for cookies.
connect-pg would probably be fine for you, but why risk slowing down your database when there is no need. Redis is an incredibly well-written, easily installable, highly regarded piece of software. It's free and universally available. It's also the most popular option on Github. Go with connect-redis.
This question is asked all the time in the big-data world and there are a lot of biased opinions about the merits of each. I recommend using whichever one you are most comfortable with.
With that said, I prefer Mongo with Node because of the ease of conversion from JS objects to MongoDB rows and back.