3 Replies - 420 Views - Last Post: 05 September 2017 - 10:41 AM

#1 Cplusplus_and_furious  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 24-August 17

Would you say, in this particular use case, C++ has no edge over Java?

Posted 01 September 2017 - 12:34 AM

Hello, as a project lead, I'm plotting a scheme to deploy a server cluster for IoT set up.

The thing is, we are planning on starting small. We will be working on some really tight budget and see if the ship sails or simply... sinks.

So performance is crucial as you can understand.

Oh but what on earth do we do, really? Well, we use IoT devices to upload data periodically. The mean time between 2 uploads in on the magnitude of one to several hours. And here is the problem: we are going to have lots of such devices and we have no control over when they will be uploading the data. So there could be the scenario in which 100+ devices are swarming in to get their data uploaded and waiting for acknowledgement.

Other than the spikes of workload that has no way of detecting a pattern (and it is quite meaningless to do that to begin with), there is nothing fancy about these servers, we may migrate them to some cloud server for later, that is, if we managed to get the project rolling, took off, soaring in the sky and we find that 5 towers aren't enough to get the job done... and based on my limited experience, it's not at all surprising that 1 tower is enough to handle and store the data collected from an area the size of a medium city. Also, it's not my idea to house actual, physical servers in the company building... the higher ups kinda think it's imperative to do business that way, I'm just a monkey that get paid to dance.

With all the background information above, here's my worries: I could go with this solution: Java + spring (may not even be necessary)+ Oracle. Viola!

But then again, a little voice keep droning in my head: go with C++ + Oracle! C++ is closer to the metal and faster! Your budget project could use the extra juice!

Then again, I keep hearing people telling me the difference is minuscule and unless you have like 100+ servers and running a major website you won't be able to notice the difference.

But then again's then again, java runs on a virtual machine which was written in C++ and last time I checked, unlike some embedded processor, neither intel nor AMD has features specifically catering java.

Also, my iFruit released in the same year as my android phone with almost identical specs runs notably faster. This also serves as an unfortunate emotional reminder of how slow java is capable of being.

Not to mention if things went smoothly, I could be someday deploying the whole ordeal to some remote VPS provider who usually do whatever they can to oversell and cut corners. I don't want to make any strategic mistake, at least nothing major. At least not something will be coming around and bite me right in my buttcheek because I owned a great deal of debt in technological karma.

So I'm here doing my homework on this. And this question is part of the homework. What is your expertly opinion on this? Am I overthinking this to oblivions? Spoiler: as far as my search and research goes, most developers favor Java, and so does the market. But still, I wanna be sure, as sure as possible.

Is This A Good Question/Topic? 0
  • +

Replies To: Would you say, in this particular use case, C++ has no edge over Java?

#2 ArtificialSoldier  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 1842
  • View blog
  • Posts: 5,796
  • Joined: 15-January 14

Re: Would you say, in this particular use case, C++ has no edge over Java?

Posted 01 September 2017 - 10:46 AM

Java and C++ are both very popular, but the final word on something like this is stress testing and benchmarking. When you say "tower", are you talking about an entire rack of servers, or a single machine, like one inside an ATX tower case? There's nothing wrong with hosting your own servers, as long as you have the bandwidth to support what you need to do. The reason why we co-locate our servers in a professional data center is because they have multiple gigabit connections, and we don't. You can start with self-hosting as long as you're not saturating your bandwidth. I'm not sure how much data is in each upload and how long it takes to process, but you should be able to calculate how many simultaneous clients your internet connection can support (assuming you want to devote your entire connection to this process, and don't have a lot of people in the office trying to use the same connection).

If you're planning on moving to a hosting provider later on, and need to basically run your own server software, I would count on going with dedicated servers and not shared servers. I don't know exactly what your software needs to do, but you may also find that the common server-side languages may work for you based on your needs, anything from the .NET platform to PHP to Python. Using a language like those which is already commonly supported by web hosts would give you more hosting options later on versus writing a custom server in C++ or Java.
Was This Post Helpful? 0
  • +
  • -

#3 Cplusplus_and_furious  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 24-August 17

Re: Would you say, in this particular use case, C++ has no edge over Java?

Posted 04 September 2017 - 03:53 AM

View PostArtificialSoldier, on 01 September 2017 - 10:46 AM, said:

Java and C++ are both very popular, but the final word on something like this is stress testing and benchmarking...


Hi, I understand what you mean. But unfortunately we are not fancy or time-affluent for that, so I'm sticking with Java as it appears to be much "easier".

Anyway, that's what I'm doing for now until we get into some serious trouble.

I almost forgot: "tower" as in server blades racks. Haha, an ATX wouldn't get the job done.
Was This Post Helpful? 0
  • +
  • -

#4 ArtificialSoldier  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 1842
  • View blog
  • Posts: 5,796
  • Joined: 15-January 14

Re: Would you say, in this particular use case, C++ has no edge over Java?

Posted 05 September 2017 - 10:41 AM

Quote

Anyway, that's what I'm doing for now until we get into some serious trouble.

Well, like they say, you can either take the time to do it right, or make the time to do it over.

Quote

I almost forgot: "tower" as in server blades racks.

If you're using "tower" to say an entire rack, then I would hope that gets the job done. We have 7 servers in half of a rack and each server can handle hundreds of requests per second, we don't even have any load-balancing, they are each dedicated servers.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1