foam-framework / foam

Feature-Oriented Active Modeller
Apache License 2.0
787 stars 55 forks source link

C++ platform #535

Closed 6D65 closed 8 years ago

6D65 commented 8 years ago

Hi,

Are the any plans to add a C++ platform?

Thanks

kgrgreer commented 8 years ago

Maybe. A developer on Chrome is hoping to revive some C++ work we did in early 2012 which generates part of Chrome using FOAM. However, I doubt this would be a full FOAM platform, just whatever subset is needed for the parts of Chrome that he's working on.

We are generally not proactive with FOAM, and only implement what features are needed for the projects that we work on or support. If we land a C++ project or customer, then we'll add C++ support. If however you want to add C++ support yourself, then we would be happy to provide guidance and support. Looking at FOAM's Java and Swift support would be a good starting point. Maybe we should write a FOAM porting guide.

What particular C++ platforms would you be targeting? What parts of FOAM would you be interested in: models, dao's, templates, GUI's, graphics, animation, etc.?

We were even toying with the idea of creating FOAM/C as a simpler alternative to C++.

6D65 commented 8 years ago

My initial thoughts were that Java is too heavy from a memory consumption standpoint for the server side. What I was thinking was a C++ backend(I guess Models and DAO), and Java/Swift apps for the front end.

I thought since C++ is so widely used at Google(from what I've heard), there are plans for a C++ backend.

That being said, the more I think the more a GUI framework in C++ wrapping Skia makes sense. This could be used to make both desktop apps(probably is not Google's main priority) and crossplatform mobile apps.

I need to look into the project more. I like the concept, though if I were to try to add a platform myself it would probably be Rust or Go.

Also a FOAM/C sounds like a really nice idea. I still fail to estimate how much work is required to add a feature let's say in C(of course it depends on the developer's productivity).

Thanks

kgrgreer commented 8 years ago

This system is written in Java using the immediate predecessor to FOAM: http://www.redknee.com/about_us/news_events/in_the_media/events05241201.aspx

The next closest system is only 80% as fast using twice the hardware. It supports 250M users and performs >10M DB ops/sec. One of the reasons that it's so fast is that it keeps all but two of the >1000 tables fully cached in the Java heap. It uses Java's String.intern() feature to deduplicate common values, which saves a lot of memory. Memory is cheap these days and Java supports very large heaps, so I think that memory consumption isn't an issue for very close to 100% of servers. Java GC actually helps to make the system faster, as once the first major GC is hit, the app suddenly becomes faster because of better data co-location which improves cache efficiency.

C++ is used a lot at Google, but the only servers that we've been considered for so far are in either Java or Go (or Node.js, which we've already done).

FOAM Swift support was recently added by another team at Google, and they were always saying that they were surprised how little work it was and how quickly the effort paid for itself. However, they did have pretty good support-from / access-to the core FOAM team.

On 3 February 2016 at 06:28, The Dude notifications@github.com wrote:

My initial thoughts were that Java is too heavy from a memory consumption standpoint for the server side. What I was thinking was a C++ backend(I guess Models and DAO), and Java/Swift apps for the front end.

I thought since C++ is so widely used at google(from what I've heard), there are plans for a C++ backend.

That being said, the more I think the more a GUI framework in C++ wrapping Skia makes sense. This could be used to make both desktop apps(not that this is google's main priority) and crossplatform mobile apps.

I need to look into the project more. I like the concept, though if I were to try to add a platform myself it would probably be Rust or Go.

Also a FOAM/C sounds like a really nice idea. I still fail to estimate how much work is required to add a feature let's say in C(of course it depends on the developer's productivity).

Thanks

— Reply to this email directly or view it on GitHub https://github.com/foam-framework/foam/issues/535#issuecomment-179177244 .

6D65 commented 8 years ago

Ok, I guess it makes sense to try the the system, and see if it fits.

And the think about the performance issues if there are any. Will try and see how it goes with a Android/Java app for the frontend and nodejs for the backend.

And thanks for the link, it's really an interesting read.

Thanks