Go concurrency in Ruby [closed] - ruby-on-rails

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I wish to use threads and concurrency features of Go language in my Ruby on Rails project. I have several alternatives, one of them is jRuby. But, I don't like Java (personal preference). I have heard that Go Lang is a perfect replacement for Java. Its even more faster & secure than Java. I saw people comparing its speed to C++ as some of its part is in Assembly itself. People can even write a complete web server like Apache from scratch in Go.
What I am really planning for is: All the low level stuff in Go and rest of it Ruby on Rails. I still want to have the ease of development that RoR has to offer.

Starting in Go 1.5, there is a build mode called c-shared, which allows you to build C shared libraries in Go. These can then be loaded into Ruby using FFI and used in your Rails app. See this brief introduction to the concept.

Related

Are there any RoR projects exploring the use of web components? [closed]

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 3 years ago.
Improve this question
This might not be an acceptable question for Stack Overflow but I didn't know where else to ask the question.
Web Components has been "about to happen" for a very long time. It now appears that most browsers have most of the required pieces natively instead of using polyfills (which always worried me).
I'm wondering if Ruby On Rails is planing on moving to it or if there are any projects creating web components as well as Rails server code to take advantage of them.
I'm wondering if Ruby On Rails is planing on moving to it or if there are any projects creating web components as well as Rails server code to take advantage of them.
The webpacker gem makes it easy to include some of the JS frameworks for non-native web components like Vue or React, but you can also use it with Polymer to support native web components. We do this at my work, and we don't necessarily use webpacker for it right now but I can assure you it's a very good gem.
Here's more info: https://github.com/rails/webpacker
Here's how you'd initiate a new rails project with webpacker set up for VueJS for instance:
rails new myapp --webpack=vue
I'm not sure if rails is going to implement web-components as a built-in feature or not but the motive behind adding webpacker as default in rails 6 is to improve the integration of front-end/javascript libraries. So, you can use vue-js, react-native easily along with your rails app and build components in it.
I'm personally using many vue-js components in rails projects and having no issue with that.
P.S: Same as the question this might not be an acceptable answer :P

Is Nix Php-ready? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I'm new to Nix and quite excited about it (I've been using it so far for Haskell).
I'm planning to use it to deploy Php applications. However, how Nix deals with
Php packages (installed normally or with pear).
Working with PHP webapps generally requires several running services (php-fpm, httpd, mysqld, redis, etc). The answer depends on how you manage the services -- which, in turn, depends on whether you use:
(a) The full NixOS: NixOS provides a service-management layer - you edit a config file, twiddle some flags, and turn on the services. I haven't done this myself, and I think it needs a more pointed tutorial for folks coming from a PHP webdev background, but the system does exist.
(b) The crossplatform nix/nixpkgs: There does not appear to be a canonical service-management option here. nix basically just gives some binaries (php-fpm, mysqld, etc) which you can launch yourself. It's somewhat daunting for typical PHP developer.
Full disclosure: To try to improve the situation for crossplatform nix+PHP, I've written an example project locolamp. It won't help much with learning NixOS, but it may help get your toes wet with nix+php in cross-platform usage. See:
https://github.com/totten/locolamp
After spending a week trying to configure a LAMP platform and giving up (mainly because I couldn't make PHP send emails), I concluded that Nix is not ready for developping easily PHP application in production.

(temporarily)using and learning ruby on rails without internet [closed]

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 8 years ago.
Improve this question
So I'm about to leave for africa for 2 weeks where i will for the most part not have an internet connection, during which i am going to start learning ruby on rails so that i can implement it in the social network i am going to start building when i get back. Im planning on saving the tutorials from rubyonrails.org to my computer before i go so that i can still use them but it seems like almost all of them are dependent on me being able to download files from the internet(for example won't "$ rails new blog" pull that info from the rails server?), does anyone know of a way i could use ruby (in particularly these tutorials) without the internet (like maybe i just need to pre-install a bunch of gems or something?)
I have basically no experience with rails so sorry if my interpretation of ruby and these tutorials is incorrect.
Theoretically, yes, practically, no. Sure, you can fire up a local web server and write code, but you obviously don't want to write everything yourself, you want to take advantage of ruby's gem package system. This will, obviously require an internet connection.

Is it a good idea to use Rails 4.1 Beta in production? [closed]

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 9 years ago.
Improve this question
Is it a good choice to use the beta in production?
My Pro: I currently have to implement a lot of features in 4.1 manually or with a bunch of gems. Using 4.1 would really simplify that.
Are there any cons?
Update
Using 4.1 by itself is great -- but I ended up sticking with 4.0 because there are lots of gems that won't work with 4.1 right now. Unless you aren't using other 3rd party gems, probably wait for a while for production projects.
The question: is a edge version raising up performance/security of your application?
So the words i'v trust so far at this question are from rails blog:
In fact, we're already running beta1 in production for Basecamp, so you know it's been taking a good beating. This helped us catch a couple of performance regressions, and we've verified that everything is still spiffy fast on Basecamp.
The obvious con is that something you implement in production may break when Rails 4.1 goes out of beta. Your choices are to delay these features, or implement them using a bunch of gems and then re-do it all later, or risk damaging credibility with customers who are relying on your service to be stable. Personally, I wouldn't go with that last choice.
(Using any version of Rails for production at all is another issue entirely. Personally I prefer LAMP, but am using Rails now in my current job.)

jRuby or Groovy for a new project? What is the best option? [closed]

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 9 years ago.
Improve this question
I'm starting a new project and i want to make it using some language that runs on top of JVM and i'm thinking to use jRuby/RoR or Groovy/Grails.
What is the best option?
Thank you.
"Best Option" is very subjective. Everyone has his their own preferences and set of acceptable tradeoffs. That said I'll write about my opinion and please don't start language wars here.
So, it depends a lot on what you and your team is already familiar with. If you have done Rails stuff a lot, JRuby/Rails make sense. Keep in mind, you still need to understand a fair amount of JVM ecosystem in order to have rails app running on JVM. Some of gems that utilize native code wont work here.
Groovy/grails stands on solid foundation of stable java framework and productive a language called Groovy. It's very easy to pick up if you have done even some Java earlier.
Groovy is a native JVM language (that means, it was made to run with JVM/Java interoperability in mind) while JRuby is a Ruby port on JVM. That brings Groovy in a better position for me on JVM. Again Your mileage may vary.
Both Grails and Rails are tested and stable frameworks. Rails has better ecosystem than Grails. But Grails is better choice if you have to stick with JVM.

Resources