View previous topic :: View next topic |
Author |
Message |
mounty1 l33t
Joined: 06 Jul 2006 Posts: 942 Location: Queensland
|
Posted: Sat Oct 03, 2020 11:47 am Post subject: Developing for AWS Lambda on Gentoo: Java vs. C# |
|
|
I'm planning a new project which will be hosted on AWS Lambda. I'm evaluating whether to use C# or to use Java. I'm not interested in the other supported languages. Although I've not used it seriously before, I'm inclined to C# because its designers had the opportunity of hindsight to see what worked well, and what not so well, in Java, and therefore almost by definition it should be better, and from the comparisons I've seen, it seems to be so, a little. However, support for Java in the OSS world in general, and Gentoo in particular, seems to exceed that of C#. For Java, one can build ones functions under Netbeans as a Maven project for example and deploy directly to AWS. For C#, it seems to be necessary to install (and pay for) Visual Studio. I have looked at Mono but cannot see how to deploy C# assemblies built with it to Lambda.
- Do you develop in C# under Gentoo or other Linux, and deploy to AWS? If so, how?
- Do you have anything useful to add to my summary analysis above?
Thanks etc. _________________ Michael Mounteney |
|
Back to top |
|
|
Banana Moderator
Joined: 21 May 2004 Posts: 1734 Location: Germany
|
|
Back to top |
|
|
mounty1 l33t
Joined: 06 Jul 2006 Posts: 942 Location: Queensland
|
Posted: Sat Oct 03, 2020 8:22 pm Post subject: |
|
|
Banana wrote: | At the end of the day it depends what you can and want to do. If you have more knowledge in one world, start with it. If you come across problems, learn and fix em. If you are good enough then you might consider a different world. | Your completely pointless response now means that my question is not seen as unanswered. Reported. _________________ Michael Mounteney |
|
Back to top |
|
|
ff11 l33t
Joined: 10 Mar 2014 Posts: 664
|
Posted: Sat Oct 03, 2020 8:47 pm Post subject: |
|
|
mounty1 wrote: | Banana wrote: | At the end of the day it depends what you can and want to do. If you have more knowledge in one world, start with it. If you come across problems, learn and fix em. If you are good enough then you might consider a different world. | Your completely pointless response now means that my question is not seen as unanswered. Reported. |
I'm watching this as I'm interested in how others handle this type of posting. But I must say that Banana's response wasn't pointless. And he is prepared to respond more, in case you say what you want to do with more information.
You started with a title with "Java vs. C#", but even after admitting that Java is best for you, you will still clearly use C#. So what do you need to decide or discuss here? Wouldn't it be better to just start posting C# questions in Portage & Programming? _________________ | Proverbs 26:12 |
| There is more hope for a fool than for a wise man that are wise in his own eyes. |
* AlphaGo - The Movie - Full Documentary "I want to apologize for being so powerless" - Lee |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22657
|
Posted: Sat Oct 03, 2020 9:23 pm Post subject: |
|
|
mounty1 wrote: | Banana wrote: | At the end of the day it depends what you can and want to do. If you have more knowledge in one world, start with it. If you come across problems, learn and fix em. If you are good enough then you might consider a different world. | Your completely pointless response now means that my question is not seen as unanswered. Reported. | If you would like, I could split Banana's response off to a separate thread, so that your complaint about his response is the answer to your thread.
Also, note that not everyone uses the "Unanswered posts" search to find things to read. Getting a response, even one you consider useless, does not guarantee you will not get a later response that is more helpful. However, responding to an initial response, even one you consider useless, in the way that you did may well deter other respondents from posting advice. Yes, it's true that you might miss someone seeing your thread now that it is answered, but that same risk applied if you got an initial response that you found desirable, and then a hypothetical later respondent misses your thread and fails to post an even better answer. I often try to reshape threads where a poster self-responds and defeats the unanswered search query, on the basis that a self-response adding more information about the question is not an answer, but I don't go around removing every imperfect first-response in hopes that a later poster will provide a better response.
As for your original question:- No, I don't use C# on Gentoo. It's not properly packaged.
- I think your analysis is a bit simplistic. C# was designed later, but AWS support for Java covers relatively recent JVM versions, which themselves are much newer than the first iterations of C#. Assuming that modern C# is better than modern Java because C# v1.0 was developed after Java v1.0 implicitly assumes that neither language was able to substantially improve over any design mistakes made in their respective initial versions.
|
|
Back to top |
|
|
mounty1 l33t
Joined: 06 Jul 2006 Posts: 942 Location: Queensland
|
Posted: Sun Oct 04, 2020 12:59 am Post subject: |
|
|
Hu wrote: | As for your original question:- No, I don't use C# on Gentoo. It's not properly packaged.
- I think your analysis is a bit simplistic. C# was designed later, but AWS support for Java covers relatively recent JVM versions, which themselves are much newer than the first iterations of C#. Assuming that modern C# is better than modern Java because C# v1.0 was developed after Java v1.0 implicitly assumes that neither language was able to substantially improve over any design mistakes made in their respective initial versions.
| That is a response which does answer the question. You have some experience and some knowledge, and you share it. Banana's response was just zero-value hand-wavey man-in-the-pub generalisation. _________________ Michael Mounteney |
|
Back to top |
|
|
mounty1 l33t
Joined: 06 Jul 2006 Posts: 942 Location: Queensland
|
Posted: Sun Oct 04, 2020 1:27 am Post subject: |
|
|
ff11 wrote: | but even after admitting that Java is best for you, you will still clearly use C#. | Not really; Java is more familiar to me, by far, but I would like to know if it's worth my while to learn C#; i.e., is it enough of an improvement over Java to be worth learning, and to be worth setting up the development system for it?
For example, C# does not by default let pointers take the null value, whereas Java does. Yes, I know that's a gross simplification, but you know what I mean. So my Java code is plastered with @NotNull annotations, which I recently found are not actually enforced at runtime anyway. So to me that's a point in favour of C#, but not enough by itself to justify switching-over.
My question was help me find out how much harder it is to do C# to AWS Lambda deployment than it is to do Java to AWS Lambda deployment. Obviously, I have to decide for myself if C# is a sufficiently superior language to Java (if it is superior at all) to decide whether the extra setup/dev. cost of C# is worth it. _________________ Michael Mounteney |
|
Back to top |
|
|
mounty1 l33t
Joined: 06 Jul 2006 Posts: 942 Location: Queensland
|
Posted: Sun Oct 04, 2020 2:18 am Post subject: |
|
|
Hu wrote: | If you would like, I could split Banana's response off to a separate thread, so that your complaint about his response is the answer to your thread. | That still leaves my thread answered, but it is getting some useful attention now anyway thanks.
For a long time I've thought that it should be possible for an OP to delete an answer. That would deter frivolous or lazy answers, ISTM. _________________ Michael Mounteney |
|
Back to top |
|
|
mounty1 l33t
Joined: 06 Jul 2006 Posts: 942 Location: Queensland
|
Posted: Sun Oct 04, 2020 3:26 am Post subject: C# on Gentoo is too hard |
|
|
After multiple steps, I'm giving up after Code: | # emerge -1 monodevelop
>>> Verifying ebuild manifests
>>> Running pre-merge checks for dev-lang/mono-6.10.0.104
* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Found sources for kernel version:
* 5.7.2-gentoo-6
>>> Emerging (1 of 8) dev-lang/mono-6.10.0.104::gentoo
>>> Installing (1 of 8) dev-lang/mono-6.10.0.104::gentoo
>>> Emerging (2 of 8) sys-devel/automake-1.11.6-r3::gentoo
>>> Installing (2 of 8) sys-devel/automake-1.11.6-r3::gentoo
>>> Emerging (3 of 8) dev-dotnet/gtk-sharp-2.12.45::dotnet
>>> Failed to emerge dev-dotnet/gtk-sharp-2.12.45, Log file:
>>> '/var/tmp/portage/dev-dotnet/gtk-sharp-2.12.45/temp/build.log'
*** Resuming merge...
* emerge --keep-going: dev-util/monodevelop-6.0.0.4761 dropped because it
* requires >=dev-dotnet/gtk-sharp-2.12.21:2, >=dev-dotnet/gtk-sharp-2.12.21:2
>>> Emerging (1 of 4) dev-dotnet/xdt-for-monodevelop-2.8.1-r2::dotnet
>>> Installing (1 of 4) dev-dotnet/xdt-for-monodevelop-2.8.1-r2::dotnet
>>> Emerging (2 of 4) dev-dotnet/referenceassemblies-pcl-4.6::dotnet
>>> Installing (2 of 4) dev-dotnet/referenceassemblies-pcl-4.6::dotnet
>>> Emerging (3 of 4) www-servers/xsp-2014.12-r2014120900::gentoo
>>> Failed to emerge www-servers/xsp-2014.12-r2014120900, Log file:
>>> '/var/tmp/portage/www-servers/xsp-2014.12-r2014120900/temp/build.log'
*** Resuming merge...
>>> Emerging (1 of 1) dev-dotnet/nuget-2.8.7-r3::dotnet
>>> Failed to emerge dev-dotnet/nuget-2.8.7-r3, Log file:
>>> '/var/tmp/portage/dev-dotnet/nuget-2.8.7-r3/temp/build.log'
* Messages for package dev-dotnet/gtk-sharp-2.12.45:
* Ebuild doesn't contain USE_DOTNET= | Obviously the ebuilds aren't maintained and I can't be bothered to get involved and fix them. _________________ Michael Mounteney |
|
Back to top |
|
|
ff11 l33t
Joined: 10 Mar 2014 Posts: 664
|
Posted: Sun Oct 04, 2020 8:42 am Post subject: |
|
|
mounty1 wrote: | ff11 wrote: | but even after admitting that Java is best for you, you will still clearly use C#. | Not really; Java is more familiar to me, by far, but I would like to know if it's worth my while to learn C#; i.e., is it enough of an improvement over Java to be worth learning, and to be worth setting up the development system for it?
For example, C# does not by default let pointers take the null value, whereas Java does. Yes, I know that's a gross simplification, but you know what I mean. So my Java code is plastered with @NotNull annotations, which I recently found are not actually enforced at runtime anyway. So to me that's a point in favour of C#, but not enough by itself to justify switching-over.
My question was help me find out how much harder it is to do C# to AWS Lambda deployment than it is to do Java to AWS Lambda deployment. Obviously, I have to decide for myself if C# is a sufficiently superior language to Java (if it is superior at all) to decide whether the extra setup/dev. cost of C# is worth it. |
mounty1 wrote: | After multiple steps, I'm giving up after Code: | # emerge -1 monodevelop
...
* Ebuild doesn't contain USE_DOTNET= | Obviously the ebuilds aren't maintained and I can't be bothered to get involved and fix them. |
In this case, Banana's post is a perfect answer:
Banana wrote: | At the end of the day it depends what you can and want to do. If you have more knowledge in one world, start with it. If you come across problems, learn and fix em. If you are good enough then you might consider a different world. |
So just use Java, and use the AWS Lambda Discussion Forums to answer your specific questions.
Your approach to creating basic constraints in Java, like the one cited, isn't what you should be doing (regardless of language). You should be using design patterns like Factory Design Pattern or even something like the Null Object Pattern depending on what you plan to do with it. _________________ | Proverbs 26:12 |
| There is more hope for a fool than for a wise man that are wise in his own eyes. |
* AlphaGo - The Movie - Full Documentary "I want to apologize for being so powerless" - Lee |
|
Back to top |
|
|
dcrook Tux's lil' helper
Joined: 22 Jul 2004 Posts: 83
|
Posted: Wed Oct 07, 2020 12:54 am Post subject: |
|
|
The JVM normally has a pretty long start up delay which can give you performance problems when running on a serverless platform like lambda. You might want to look at microservice oriented Java frameworks like Quarkus or Micronaut. They are designed to run Java code on either the standard JVM or GraalVM which has a much faster start up time. I've done a couple projects with Quarkus and I liked it. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|